Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    some help needed

    can anyone help me fix this coding

    <%
    DIM objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    Server.MapPath ("MyData.mdb") & ";"
    objConn.Open
    %>

    <%
    DIM objRS
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.Open "tblContact", objConn, , adLockOptimistic, adCmdTable

    objRS.AddNew
    objRS("Email") = Request.Form("Email")
    objRS("FirstName") = Request.Form("FirstName")
    objRS("LastName") = Request.Form("LastName")
    objRS("Comments") = Request.Form("Comments")
    objRS("DateContacted") = Date()
    objRS.Update
    %>

    <p>
    <%
    DIM strFirstName
    strFirstName = Request.Form("FirstName")
    %>,<br>
    </p>

    <%
    objRS.Close
    Set objRS = Nothing
    objCONN.Close
    Set objCONN = Nothing
    %>

    I get the error message

    "ADODB.Recordset error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    /Sample/confirm.asp, line 13"

    edit*I copied the code on this site just so I can re-learn asp - http://www.aspwebpro.com/aspscripts/.../insertnew.asp

    edit*I just read on http://support.microsoft.com/default...;en-us;Q254517 that I should Use the actual constant values. How do I find the value of adCmdTable?
    Last edited by oneeyebrow; 03-11-2006 at 10:19 AM.

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    google adovbs.inc. Download the file when you find it and then you can "include" it in your files or if you want you can manually get the values out of it and use them. Include is better though.

    BaldEagle


  •  

    Posting Permissions

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