Page 1 of 1 1
Topic Options
#90642 - 2002-12-19 10:18 PM Seek update field
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Guys: [Razz]
I am using a sript to write a table with the addnew method and works fine. I would like to know how to update only one fiel. In Acces would look something like this.
code:
Resordset.seek "id" <-----positioning
Recodset.edit
Recodset.fields().value
Recorset.update

I asked the same question in Kixtart Helpdesk while the korg was down and Lorenko suggested me.
code:
Resordset.seek("id")  

Wich didnt work out. Thanks indeed Lorenko.
_________________________
Life is fine.

Top
#90643 - 2002-12-19 10:22 PM Re: Seek update field
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You use different variables 'recordset' and recodset'.

BTW, I'd rather go the SQL way as in
code:
UPDATE Table SET Table.Field = "aaa";

_________________________
There are two types of vessels, submarines and targets.

Top
#90644 - 2002-12-19 10:41 PM Re: Seek update field
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
thanks for the reply or giving unhelpfull answer?
_________________________
!

download KiXnet

Top
#90645 - 2002-12-20 12:03 AM Re: Seek update field
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
thanks for the reply or giving unhelpfull answer?
----------------------------------
Sealeopard, I tried this. Is there something wrong in it cause does not update the field.
code:
	$Connection 				= CreateObject("ADODB.Connection")
$Connection.ConnectionString ="Driver={Microsoft Access Driver (*.mdb)}; DBQ=\\server\kixexe$$\database\Radimus2000.mdb"
$Connection.Open()
If NOT @error
$Command = CreateObject("ADODB.Command")
$Command.ActiveConnection = $Connection
$Recordset = CreateObject("ADODB.Recordset")
$Recordset.CursorType = 3
$Recordset.LockType = 3
$Recordset.ActiveCommand = $Command
$Command.CommandText = "UPDATE tbl_Users SET tbl_Users.Nombre='fart' where NtAccount='install'"

Thanks for the help.
_________________________
Life is fine.

Top
#90646 - 2002-12-20 05:08 AM Re: Seek update field
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Iou world.. [Roll Eyes] I am not good at query stuff yet have anybody done something like the avobe?
Che sealeopard ar you the always on database stuff? Thanks dude!
_________________________
Life is fine.

Top
#90647 - 2002-12-21 01:02 PM Re: Seek update field
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
What the f... [Mad] is this green donkey talking about if with a simple script you can update a field easily. Like this.
code:
         $cn = CreateObject("adodb.connection")
$cn.ConnectionString ="Driver={Microsoft Access Driver (*.mdb)}; DBQ=\\server\kixexe$$\database\Radimus2000.mdb"
$cn.Open()
$rs = $cn.Execute("UPDATE tbl_Users Set tbl_Users.Nombre='fart' where NtAccount='@USERID'")
$cn.Close()
$cn = 0

Ahhh..This new people are pissing me off!! They should leave the board. What u think.

Thanks sealeopard [Big Grin] [Big Grin]
_________________________
Life is fine.

Top
#90648 - 2002-12-22 04:59 PM Re: Seek update field
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Jose:

Why not use the prepackaged DB (DBConnOpen, DBConnclose,...) UDFs that are posted in the UDF Forum?

[ 22. December 2002, 17:00: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#90649 - 2002-12-22 06:40 PM Re: Seek update field
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
In the end will be much more better with the functions you are write (dinamicly), as I was just testing how to update I used the crude code.
Tenks [Razz]
_________________________
Life is fine.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.058 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org