submitting data to a database using asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • giwababatunde
    New Member
    • Nov 2006
    • 2

    submitting data to a database using asp

    hi,

    can anybody put me through on how to use asp to submit data into the date base.

    thanks and God bless
    Last edited by giwababatunde; Nov 12 '06, 12:26 AM. Reason: typing error
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by giwababatunde
    hi,

    can anybody put me through on how to use asp to submit data into the date base.

    thanks and God bless
    Hi. You will have to learn about ADO connections and recordsets. This is quite a lot to learn so give yourself some time :)

    Comment

    • vabsjava
      New Member
      • Oct 2006
      • 22

      #3
      HI!
      You should try this.......
      but for the explanation u should refer some book


      set conn= Server.CreateOb ject("ADODB.Con nection")
      set RS = Server.CreateOb ject("ADODB.Rec ordset")
      db.Open "DSN=mydsn;UID= username;PWD=pa ssword“
      SQL = "select * from tb_usr“
      set rs = conn.execute(SQ L)
      rs.MoveFirst
      do while NOT rs.eof
      Response.Write rs("usrid") & “," & rs("usrpwd") & "<br>"
      rs.MoveNext
      loop
      set conn = nothing
      set RS = nothing

      Have a nice Day


      Originally posted by giwababatunde
      hi,

      can anybody put me through on how to use asp to submit data into the date base.

      thanks and God bless

      Comment

      • willakawill
        Top Contributor
        • Oct 2006
        • 1646

        #4
        Originally posted by vabsjava
        HI!
        You should try this.......
        but for the explanation u should refer some book


        set conn= Server.CreateOb ject("ADODB.Con nection")
        set RS = Server.CreateOb ject("ADODB.Rec ordset")
        db.Open "DSN=mydsn;UID= username;PWD=pa ssword“
        SQL = "select * from tb_usr“
        set rs = conn.execute(SQ L)
        rs.MoveFirst
        do while NOT rs.eof
        Response.Write rs("usrid") & “," & rs("usrpwd") & "<br>"
        rs.MoveNext
        loop
        set conn = nothing
        set RS = nothing

        Have a nice Day
        Unfortunately the question is about submitting data to a database and not writing data from a database to a page.

        Comment

        • karthi84
          Contributor
          • Dec 2006
          • 270

          #5
          this code should help u
          Code:
          strConn1="PROVIDER=SQLOLEDB;SERVER=servername;UID=userid;PWD=pass;DATABASE=dbname"
          Set objConn1= Server.CreateObject("ADODB.Connection")
            objConn1.Open strConn1
          strSQL1 = "insert into table_name set Credit_Notes="Credit_Notes", Last_Update_By="Last_Update_By              
          
          
          objConn1.Execute(strSQL1)
          any problem with the code post me a personal message so that i can help you

          Comment

          Working...