#33331 - 2002-11-23 01:44 AM
Update data in MsAccess DB
|
kjohansen.dk
Lurker
Registered: 2002-11-23
Posts: 3
|
I have a script today that creates a new entry in a MsAccess Db everytime a user logs on, but now i would like to update the existing entry instead.
It has to check if @USERID exist and if it does update the fields, if it does not do nothing !
Could anyone help me with this.
Thanks
Kenneth Johansen [ 23. November 2002, 01:52: Message edited by: kjohansen.dk ]
|
|
Top
|
|
|
|
#33333 - 2002-11-23 01:55 AM
Re: Update data in MsAccess DB
|
kjohansen.dk
Lurker
Registered: 2002-11-23
Posts: 3
|
Why not, that's the kind of questions i get every day... my computer responds in a different way that i'm used to, WHAT is the problem.. you know i can't live with this.. and then when you ask a user of what he has been doing with his pc, he allways replies "nothing"... my reply.. WHY did you turn it on if you didn't use it for anything
Sure... sorry how stupid of me.. here it is..
$var1 = @WKSTA $var2 = @USERID $var3 = @FULLNAME $var4 = @LSERVER $var5 = @CPU $var6 = @MHZ $var7 = @IPADDRESS0
$db = "\\dks002\k-drev\edb\inv.mdb" $cn = CreateObject("adodb.connection") $cn.connectionstring = "data source=$db; provider=microsoft.jet.oledb.4.0;persist security info=false" $cn.Open() $rs = $cn.Execute("insert into inv(UserID,FuldtnavnID,LogonServerID,NetbiosNavnID,OfficeVersionID,StyreSystemID,ServicepackID,IEversionID,IPadrID,Processor_typeID,CPU_hastighedID,NAV_version,RunDate,RunTime) values ('$var2','$var3','$var4','$cname','$fileversion','$Productname','$csdversion','$IEversion','$var7','$var5','$var6','$NAV_VERSION','@date','@time')") $cn.Close() $cn = 0 [ 23. November 2002, 02:26: Message edited by: kjohansen.dk ]
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 978 anonymous users online.
|
|
|