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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to sql Server

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
All i'm trying to do is bring back some data from a table in SQL Server

I am running a .asp file through IIS which contains the following code:

Set objConnection=server.CreateObject("ADODB.Connection")
objConnection.open "Driver={SQL Server};Server=servername;Database=dbname;uid=uid;pwd=password"


It seems to connect fine using the above code.. i then get the error :

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

when trying to run this syntax:

set rsEmployee = server.CreateObject ("ADODB.Recordset")
mySQL = "Select firstName, lastName FROM table"
rsEmployee.Open mySQL,cntBPstr,adOpenForwardOnly,adLockReadOnly



Gotta be somert really simple?

Cheers for any help!

 
Oops! :)

just ignore that last post, apart from none of the attributes matching up n everything! i got it working!

i took out the adOpenForwardOnly,adLockReadOnly on the open of the recordset tingy bit and it works fine! are these attributes not supported or somert?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top