Using SQL connection string (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Topic Starter -> Using SQL connection string (11/28/2001 20:00:00)

I am coding in ASP using a SQL database for the 1st time. I am having a problem using the FP Connection string.

This is my code:

var conDB = Application("eCast_ConnectionString");
conDB.ConnectionTimeout = 2;
conDB.CommandTimeout = 2;
conDB.CursorLocation = 3;
conDB.Open("eCast", "", "");

szSQL = "SELECT * FROM Users";
var rs = Server.CreateObject("ADODB.Recordset");
rs.open(szSQL, conDB, 3, 3);

Response.Write("<p>");
Response.Write("username="+Request("uname")+"<br>password="+Request("password")+"<p>");

rgFields = new Array("szName","szPassword","szAddress","szCreditCardNumber");
rgValues = new Array(Request.Item("uname"), Request.Item("password"),"None","1111");
rs.addNew(rgFields, rgValues);
rs.Update();

rs.Close();
conDB.Close();

And this is my error:

Microsoft JScript runtime error '800a01b6'

Object doesn't support this property or method

/ecast/PublishEservice/Publish_CommitNewAccount.asp, line 19

Whats up????





Spooky -> RE: Using SQL connection string (11/28/2001 22:16:00)

Jscript?

Is the server default perhaps wrong?
I dont do jscript, but it looks mostly VB to me (apart from using + instead of &)

Which is 19?





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125