Discussion Locked

ASP is getting connected to my Database

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Student Records

<%
Dim DB
Set DB = Server.CreateObject (ADODB.Connection)
DB.Mode = adModeReadWrite
DB.Open (dsn=bill)
Dim RS
Set RS = Server.CreateObject (ADODB.Recordset)
RS.Open "SELECT * FROM billmaster",DB, adOpenStatic, adLockPessimistic

Response.Write rs(0)

Response.Write rs(1)

%>

This is the code iam using to connect MS Access database , but iam facing lot of problems , my web server is IIs , is there any changes i need to do , please help me.

1 reply

by robo_dev

With Microsoft Active Data Objects (ADO) there are three or four connection methods. (see links below). Don't forget to close the database connection at the end of your script and use appropriate connection timeouts to avoid slowing your database to a crawl.

Here are some sites with connection string methods to try:
http://www.codeproject.com/database/connectionstrings.asp#Access
http://www.connectionstrings.com/
http://www.tnsites.com/support/s_databaseconn.asp
http://support.microsoft.com/?kbid=168336

This discussion is closed to new replies.