|
add record Posted: 25 Jun 2003
u can try this:
set objConn = Server.CreateObject("ADODB.Connection") strConnection = "Data Source = yourDSN;" strConnection = strConnection & "User ID = username; Password = yourPassword;"
objConn.open strConnection
set objRS = server.CreateObject("ADODB.Recordset") set objRS.ActiveConnection = objConn
fldmid = request("mid") fldtopic = request("topic") fldauthor = request.Cookies("user") fldmessage = request("reply_message")
strQ = "INSERT INTO messages (author, topic, message, date_entered, status, message_parent_id) VALUES('"&fldauthor&"','"&fldtopic&"','"&fldmessage&"', '"&now()&"','reply','"&fldmid&"')" objConn.Execute strQ
|