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

file dsn

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how do i create a file dsn and then where do i put it on the web server. I have a sql database and i am making asp html pages for it.
 
hi,
got to
Start > Settings > ControlPanel > Odbc..
and create a file DSN this should be done on the server itself.
OR
u want to create this on the fly i.e during runtime ???

[cheers]
Niraj [noevil]
 
hi,

1.]
firstly u would not require to create it at runtime as it's always a better optoin to do it before hand. but still if need be, u would do it thru vb and create a coomponent or so and use it in ur ASP page. Exampple in VB ->


2.] Easier way to do it is refer to the file DSN like ->

Set ConLog = Server.CreateObject("adodb.connection")
ConLog.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\user.mdb;pwd=sauser001"
Set rs = ConLog.Execute("select * from table")
u will have to check for proper name for SQL server (ummmm i think it's "SQL Server") pls check.

Hope this helps.

[cheers]
Niraj [noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top