Hi there I wanted to insert a record into a database using javascript, such as
However, I get the error Server Undefined?
Any ideas?
Code:
function InsertSP()
{
var strConn = 'Driver={SQL Server};Server=**;Database=**;Uid=**;Pwd=*;';
var oConn = Server.CreateObject("ADODB.Connection");
oConn.Open(strConn);
var oRS = Server.CreateObject("ADODB.Recordset");
oRS.ActiveConnection = oConn;
oRS.CursorType = 3;
oRS.LockType = 3;
oRS.CursorLocation = 3;
oRS.Source = "INSERT INTO tblName(StoredProcedure) VALUES ('Test')";
oRS.Open();
oRS.Close();
}
However, I get the error Server Undefined?
Any ideas?