.....................
+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
2010-08-12 06:14:26
thank u ..........
sujatha
2010-08-12 10:29:51
atleast do upvote or accept if it work for you
Pranay Rana
2010-08-12 10:46:23