BartW Posted July 28, 2011 Posted July 28, 2011 HI all, This is my first post so be gentle. I am using autoit fore a few months now whit great success but I have a problem and I going in circles to find what I am doing wrong. What I am attempting to do is to create a SQLite function that Update’s a value in a Colum. The SQL string is "UPDATE Tabel SET Columname = 'value' WHERE Columname = ' value ';" So the first thing I did is Just use a test example check if autoit understates what I am trying to do. It looks like this _SQLite_Exec (-1, "UPDATE aTest SET c = 'test1' WHERE b = '3';" This works well so I went forward to the next step and that is using variables in the string. It looks like this. $sTable = "aTest" $sColumChange = "b" $sValueChange = "3" $sColumFind = "c" $sValueFind = "test1" _SQLite_Exec (-1,"UPDATE "&$sTable&" SET "&$sColumChange&" = '"&$sValueChange&"' WHERE "&$sColumFind&" = '"&$sValueFind&"';") End now it not working any more I have try putting the string in a new varibel and that is not working as well . It looks like this $sTable = "aTest" $sColumChange = "b" $sValueChange = "3" $sColumFind = "c" $sValueFind = "test1" $SQLFINDSTRING = string("UPDATE "&$sTable&" SET "&$sColumChange&" = '"&$sValueChange&"' WHERE "&$sColumFind&" = '"&$sValueFind&"';") _SQLite_Exec (-1,$SQLFINDSTRING) I don’t understand where I am going wrong. Can some point me in the ride direction?
BartW Posted July 28, 2011 Author Posted July 28, 2011 Hi all, I have the fix fore my problem. I was using the wrong values in the wrong Colum . Sorry to bother all of u “I need a vacation” Thax fore yore time
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