ASP and SQL Server Recordset

Discussion in 'ASP General' started by Aaron Bertrand - MVP, Jan 21, 2004.

  1. DON'T MULTI-POST.
    Aaron Bertrand - MVP, Jan 21, 2004
    #1
    1. Advertising

  2. Aaron Bertrand - MVP

    Erik Guest

    I'm using ASP 3.0 and SQL Server 2000. I keep getting this error:

    a.. Error Type:
    ADODB.Recordset (0x800A0BB9)
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.
    /databaseconect.asp, line 22

    It seems to have to do with the lock or cursor type in SQL Server. Here is
    my code. Please help

    <%@ Language=VBScript %>
    <%
    strText = Request.Form("textfield")
    Dim objconn1 'Connection Object
    Dim strconn1

    Set objConn1 = Server.CreateObject("ADODB.Connection")
    strconn1 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
    Info=False;Initial Catalog=Northwind;Data Source=SERVER\SERVER"
    objconn1.Open strconn1

    ''Recordset Info
    Set rs1 = Server.CreateObject("ADODB.Recordset")

    rs1.Open "SELECT customername FROM Customer", objconn1, adOpenDynamic,
    adLockOptimistic, adCmdText
    rs1.AddNew
    rs1.Fields("textfield") = strText
    rs1.Update
    %>
    Erik, Jan 21, 2004
    #2
    1. Advertising

  3. Tom Kaminski [MVP], Jan 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hung Huynh
    Replies:
    8
    Views:
    289
    Bob Barrows
    Sep 24, 2003
  2. Darren Smith
    Replies:
    2
    Views:
    148
    Darren Smith
    Jan 28, 2004
  3. Ola Tuvesson
    Replies:
    4
    Views:
    188
    Ray Costanzo [MVP]
    Sep 29, 2004
  4. AlanMF
    Replies:
    6
    Views:
    240
    AlanMF
    Nov 15, 2005
  5. CrazyAtlantaGuy
    Replies:
    2
    Views:
    131
    CrazyAtlantaGuy
    Nov 30, 2005
Loading...

Share This Page