View Single Post
  #7 (permalink)  
Old July 24th, 2007, 06:23 AM
djgenesis djgenesis is offline
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi everyone!
This topic explained in a few lines, what I've been meaning to program for a week!

Although I would like to revive the topic and ask for advice.

On the server-side function here:

[code]
function dblookup()
{
    var myConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\\sdi.mdb";

    var ConnectObj = Server.CreateObject("ADODB.Connection");
    var RS = Server.CreateObject("ADODB.Recordset");
    var sql="SELECT * FROM employeespulled WHERE empid='1';";

    ConnectObj.Open (myConnect);
    RS.Open(sql,ConnectObj,adOpenForwardOnly,adLockRea dOnly,adCmdText);

    var fieldCount = RS.Fields.Count;
    Response.Write ("Field Count" + fieldCount);
    RS.Close();
    ConnectObj.Close();
}[code]

when I use
Code:
     var ConnectObj = Server.CreateObject("ADODB.Connection");
I get a
Quote:
quote: 'Server' is undefined
error.
Am i doing something wrong or do I have to include any libraries?

Reply With Quote