Pls help..ado recordset not updating table properly.
I am using simple sql statement to update an oracle table from vb6 application. some how it doesn't update the table and it doesn't throw any error either.
This is 2 line code I am using
sSQL = "UPDATE A.TABLE1 SET UPDATE_DATE = " & "to_date('" & Format(dCurrentDateTime, "DD-MMM-YYYY HH:MM:SS") & "', 'DD-Mon-YYYY HH24:MI:SS')"
oRS.Open sSQL, cnn, adOpenForwardOnly, adLockPessimistic
when I look in the immediate window, I see
cnn as Provider=MSDAORA.1;Password=tradeu$3r;User ID=at_user;Data Source=cdb.world;Extended Properties="ConnectString=Provider=OraOLEDB.Oracle"
and I also checked the cnn (connection status is open). I am really shocked why this is happening.
Pls throw some ideas ...
thanks
nath :mad:
Re: Pls help..ado recordset not updating table properly.
You need a command object and use its execute method for non select queries (insert, update,d elete). And if its recordset returning (in your case not) set an rs = command.execute result
Re: Pls help..ado recordset not updating table properly.
bnathvbdotnet,
When you post your SQL statement post one with all the values filled in. Use Debug.Print after to create the SQL statement and then post what is in your Immediate window. It generally solves stupid oversight things.