Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Undefined

Status
Not open for further replies.

HotBob

Programmer
May 26, 2006
37
GB
Hi there I wanted to insert a record into a database using javascript, such as

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top