Jump to content

UPDATING SQL RECORD.. ?


Ghost21
 Share

Recommended Posts

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
Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...