|
-
Sep 30th, 2005, 01:54 PM
#1
Thread Starter
Hyperactive Member
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
-
Sep 30th, 2005, 02:28 PM
#2
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
-
Sep 30th, 2005, 04:20 PM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|