If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Insert and update problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-03, 06:02
Cos Cos is offline
Registered User
 
Join Date: Sep 2003
Posts: 6
Red face Insert and update problems

Hi

First i wanna say hi since this is my very first post in this forum.

Now let's get to the subject.

I have some problems with my scripts and I hope to get an answer here. My script supposed to make an easy task. An insert into a table. And it worked very well until I changed the ODBC drivers into OLEDB drivers.

This is the part of the script where I get the error:

-----------
set objNouvCde = Server.CreateObject("ADODB.Recordset")
objNouvCde.Open "DRW01FIC.DRTCDE", objConn, 2 , adLockPessimistic, adCmdTable
objNouvCde.AddNew
....

-------------

It works very well with this connection string :

"Provider=MSDASQL.1;Password=***;Persist Security Info=True;User ID=user;Data Source=DSN1"

but when I am using the OLEDB driver the connection string gets :

"Provider=IBMDA400.DataSource.1;Password=***;Persi st Security Info=True;User ID=user;Data Source=DSN2"

The error I get is

"ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."

Can anyone help? Is there some driver limitation and I can't get Dynamic cursor or stuff like that?

I am on a Windows 2000 server with IIS 5.0 and the DB is DB2/AS400

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-23-03, 02:33
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Perhaps try changing this:
objNouvCde.Open "DRW01FIC.DRTCDE", objConn, 2 , adLockPessimistic, adCmdTable

To be something more like this instead:
objNouvCde.Open "DRW01FIC.DRTCDE", objConn, 3 , adLockOptimistic, adCmdTable

And here's a related resource:

Cursor & LockType Performance Report - 6/27/1999
http://www.4guysfromrolla.com/webtec...3.report.shtml
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #3 (permalink)  
Old 09-23-03, 03:17
Cos Cos is offline
Registered User
 
Join Date: Sep 2003
Posts: 6
Unhappy

Thanks, but nope. I tried all the combinations of locktype and cursor types. I am affraid that it is some kind of incompatibility with this OLEDB driver.... (proider = IBMDA400.DataSource.1) Evthing works great withthe ODBC driver (but much slower)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On