newbie question

Discussion in 'ASP General' started by Auddog, Jan 7, 2005.

  1. Auddog

    Auddog Guest

    I'm passing a variable in a Request.QueryString and now I'm wanting to
    insert that variable into my database along with other information from the
    form. All the other inserts use something like this adoRS("fk_projectid") =
    Request.Form("title"). I just can't seem to get the varibale that I pass
    into the database. Below is my code

    <%
    DIM adoDB, adoRS, objConn, id
    id = Request.QueryString("id")
    ' Create the Database Object, and connect to it
    Set adoDB = Server.CreateObject("ADODB.Connection")
    adoDB.Open strConnection
    ' Create the Recordset Object
    Set adoRS = Server.CreateObject("ADODB.RecordSet")
    adoRS.Open "ShopLog", adoDB, adLockOptimistic, adCmdTable

    adoRS.AddNew
    adoRS("fk_projectid") = Request.Write("id")
    adoRS("sd_title") = Request.Form("title")
    adoRS("copies") = Request.Form("copies")
    adoRS("duedate") = Request.Form("duedate")
    adoRS.Update

    ' Tidy up afterwards
    adoRS.Close
    Set adoRS = Nothing
    adoDB.Close
    Set adoDB = Nothing
    %>
     
    Auddog, Jan 7, 2005
    #1
    1. Advertising

  2. Auddog

    McKirahan Guest

    "Auddog" <> wrote in message
    news:...
    > I'm passing a variable in a Request.QueryString and now I'm wanting to
    > insert that variable into my database along with other information from

    the
    > form. All the other inserts use something like this adoRS("fk_projectid")

    =
    > Request.Form("title"). I just can't seem to get the varibale that I pass
    > into the database. Below is my code


    [snip]

    adoRS("fk_projectid") = id
     
    McKirahan, Jan 7, 2005
    #2
    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. Jerry C.
    Replies:
    8
    Views:
    253
    Uri Guttman
    Nov 23, 2003
  2. Kruno Saho
    Replies:
    0
    Views:
    147
    Kruno Saho
    Apr 7, 2013
  3. Dave Angel
    Replies:
    0
    Views:
    128
    Dave Angel
    Apr 7, 2013
  4. rusi
    Replies:
    0
    Views:
    115
  5. Miki Tebeka
    Replies:
    0
    Views:
    86
    Miki Tebeka
    Apr 7, 2013
Loading...

Share This Page