Ghost21 Posted February 28, 2008 Share Posted February 28, 2008 (edited) Having trouble updating records with MsgBox(0, "", "UPDATE ACTIVE SET PC = '" & $PC & "'" & ", LASTUPDATED = '" & $LASTUPDATED & "'" & ", USER = '" & $USER & "'" & ", PING = '" & $PING & "'" & " WHERE PC = '" & $PC & "');") I used the above msgbox to show my results and it all looks correct Is this Statement with the $oConn.Execute right ?? $oConn.Execute("UPDATE ACTIVE SET PC = '" & $PC & "'" & ", LASTUPDATED = '" & $LASTUPDATED & "'" & ", USER = '" & $USER & "'" & ", PING = '" & $PING & "'" & " WHERE PC = '" & $PC & "');") Does anyone have an example of an update statement .. I feel I'm relly close just missing something ... Thanks Edited February 28, 2008 by Ghost21 Link to comment Share on other sites More sharing options...
rudi Posted February 28, 2008 Share Posted February 28, 2008 Hello. Having trouble updating records with MsgBox(0, "", "UPDATE ACTIVE SET PC = '" & $PC & "'" & ", LASTUPDATED = '" & $LASTUPDATED & "'" & ", USER = '" & $USER & "'" & ", PING = '" & $PING & "'" & " WHERE PC = '" & $PC & "');")oÝ÷ Ûú®¢×ß×kyÊ&éݶ(Æzv{*.$JÚâ§iV«¦åy8^Äåí+(âÝý±ø§z¦¦+bÚ2¢êÒ@»ax¢ë¬yÛ½êÚz-ç²Æ«Ê«¨µ©©ªê-|¨º·±¦·¬²*'ç¢Ûhëm¢h bë2¢çºÞjIbë.²)àªê-ªê-jëh×6#include <date.au3> Dim $PC = "PC01" Dim $LASTUPDATED = _NowCalcDate() Dim $User = "root" Dim $PING Dim $SQLstring $PING = Ping($PC) $SQLstring = "UPDATE ACTIVE SET PC = '" & $PC & "', LASTUPDATED = '" & $LASTUPDATED & _ "', USER = '" & $USER & "', PING = '" & _ $PING & "' WHERE PC = '" & $PC & "';" MsgBox(0,"My SQL string",$SQLstring) Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now