views:

36

answers:

1

.....................

+1  A: 

hope following code may help you

for more detail : Active Server Pages Tutorial

   <%

    Dim conn

    Set conn = Server.CreateObject("ADODB.Connection")

    conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = Northwind; User Id = sa; Password="

    If conn.errors.count = 0 Then

    set cm = Server.CreateObject("ADODB.Command")
        cm.ActiveConnection = conn 
    'Define SQL query
        cm.CommandText ="INSERT INTO Guestbook (TB1,TB2,TB3,TB4,MB1)
             VALUES (?,?,?,?,?)"
        'Define query parameter configuration information for guestbook fields
        set objparam=cm.createparameter(, 200, , 255, strTB1)
        cm.parameters.append objparam
         set objparam=cm.createparameter(, 200, , 255, strTB2)
         cm.parameters.append objparam
         set objparam=cm.createparameter(, 200, , 255, strTB3)
          cm.parameters.append objparam
        set objparam=cm.createparameter(, 200, , 255, strTB4)
         cm.parameters.append objparam
         set objparam=cm.createparameter(, 201, , iLenMB1, strMB1)
        cm.parameters.append objparam
         cm.execute
        response.write("Thank you!")

    End If

    conn.Close
   Set conn = Nothing
    %>
Pranay Rana
thank u ..........
sujatha
atleast do upvote or accept if it work for you
Pranay Rana