goldenix Posted December 10, 2007 Posted December 10, 2007 (edited) This is where I got the script _sql.au3 can also be gotten from there.http://www.autoitscript.com/forum/index.ph...=51952&st=0This code there is really super, just 1 question, Why my database is not being updated if I run this?My table looks like this:column1 column2 101 127.0.0.1 101 127.0.0.1#include <_sql.au3> $con = _SQLStartup() _SQLConnect(-1,"localhost","test_db","sa","123456") $data = _SQLExecute(-1,"UPDATE Table1 SET column2 = '128.0.0.1' WHERE column1 = '101';") _SQLClose()EDIT: I figured it out...totally from the blue tho... looks like the sign & was missing see below$data = _SQLExecute(-1,"UPDATE Table1 SET column2 = '" & $PublicIP & "' WHERE column1 = '101';")to be more spesific:$data = _SQLExecute(-1,"UPDATE Person SET FirstName = 'Nina' " & " WHERE LastName = 'Rasmussen'";) Edited December 10, 2007 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
weaponx Posted December 10, 2007 Posted December 10, 2007 If this is the exact code you used your SQL syntax is wrong.$data = _SQLExecute(-1,"UPDATE Table1 SET column2 = '128.0.0.1' WHERE column2 = '101';")should be$data = _SQLExecute(-1,"UPDATE Table1 SET column2 = '128.0.0.1' WHERE column1 = '101';")
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