Results 1 to 3 of 3

Thread: Pls help..ado recordset not updating table properly.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    Angry 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

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    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

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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
  •  



Click Here to Expand Forum to Full Width