Commit changes to a table immediatly

Results 1 to 2 of 2

Thread: Commit changes to a table immediatly

  1. #1
    Rajkumar Guest

    Default Commit changes to a table immediatly

    Hi,<BR> I have a problem, when I make a change to a table via<BR>ADO, like SQL="Delete from table where IdNo=12345", and say<BR>RecordSet.Open SQL,,,adCmdTable, the changes are not getting commited to the table immediatly. If I refresh the webpage, it is getting displayed properly. Am I doing something wrong, or is it an issue in the browser.<BR><BR>i tried giving Recordset.Update in the asp code and it does not seem to work. PLease provide me with a workaround to the problem<BR><BR>Thanks in Advance<BR>Rajkumar

  2. #2
    gh Guest

    Default RE: Commit changes to a table immediatly

    Your ADO usage is incorrect. <BR><BR>First of all, you don&#039t specify a connection for the Recordset Open so how would it connect to the database? All you give it is the SQL statement unless you aren&#039t showing all the code. If you have a connected ADODB.Connection object it would go in the 2nd parameter position.<BR><BR>You don&#039t want the adCmdTable switch unless your SQL string consists only of the table name. <BR><BR>Since you are using SQL command text, you would use adCmdText. But you really shouldn&#039t be opening a recordset unless the SQL statement returns results. Use the Execute() method of the connection object to run the query. You don&#039t need or want a Recordset object at all.<BR><BR>You might be better off checking the simple ADO examples in the links on the left side of this page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts