Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2003, 07:40 AM
Cos Cos is offline
Registered User
 
Join Date: Sep 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Cos Send a message via MSN to Cos Send a message via Yahoo to Cos
Default Insert and update problems with OLEDB driver

Hi

First i wanna say hi since this is my very first topic 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 from M$ into OLEDB drivers from IBM.

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



Linux is like a wigwam : no windows, no gates, apache inside.
 
Old September 24th, 2003, 01:50 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RODEO
Default

I know that, in VB6 with standard ADO (not .NET), you had to specify a Command Object, with the following Properties

Quote:
quote:
'Constants
Public Const DBPROPVAL_UP_CHANGE = 1
Public Const DBPROPVAL_UP_DELETE = 2
Public Const DBPROPVAL_UP_INSERT = 4

'Connection, Command and Recordset objects
        sConnectionString = "Provider=IBMDA400;Data Source=" & System & ";Transport Product=Client Access;SSL=DEFAULT"
        With cn
            .CursorLocation = adUseServer
            .Open sConnectionString, UserID, PWD
        End With
    With cm
        .ActiveConnection = cn
        .Properties("Updatability") = DBPROPVAL_UP_CHANGE + DBPROPVAL_UP_INSERT + DBPROPVAL_UP_DELETE
        .CommandText = sSQL
    End With
    rs.Open cm.CommandText, cn, adOpenStatic, adLockReadOnly
I'm also still struggling with reproducing this in ADO.NET...:(

But then again, that's the fun of the job;)

The further away I get from the things I care about,
The less I care about how much further away I get
 
Old September 24th, 2003, 01:52 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RODEO
Default

LOL, opening the RS ADLOCKREADONLY would of course make little sense here :-)

The further away I get from the things I care about,
The less I care about how much further away I get





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update Recordset using oledb.command jmhemadri Classic ASP Databases 5 September 11th, 2008 03:46 PM
Insert/Update problem soheil BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 November 15th, 2007 11:18 AM
Problems with Text driver and SQL jrogers SQL Language 3 April 10th, 2006 05:33 AM
"Driver not found" e message, el problems cruzer JSP Basics 2 December 19th, 2004 02:13 AM
[ODBC Excel Driver]Syntax eror in update alinutza22 Classic ASP Professional 3 September 17th, 2004 04:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.