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

Can't get information from a Database

Status
Not open for further replies.

MnM

Programmer
Nov 1, 2000
47
US
I am currently using PWS but trying to learn IIS. I am having a problem running my sql statements in my asp code using IIS. I have set up my DSN through the FILEDSN and now I am trying to pull some data out of a DB. I assumed the asp code would be the same whether I used PWS or IIS, here is what I have.

Code:
set conn = Server.CreateObject("ADODB.Connection")
conn.open "FILEDSN=test.dsn; SERVER=test; UIDsa; PWD"

strSQL = "Select * from test"
rs.open strSQL, conn
response.write rs("testID")
The error I get is "incorrect syntax near the word test" at the rs.open line.

What am I doing wrong, anybody have any clues???
 
Hi,

I think it should be

conn.open "FILEDSN=test.dsn; SERVER=test; UID=sa; PWD=;"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top