Sign in to follow this  
Followers 0
Ghost21

UPDATING SQL RECORD.. ?

2 posts in this topic

#1 ·  Posted (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 by Ghost21

Share this post


Link to post
Share on other sites



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¦¦+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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0