General discussion

Locked

ASP is getting connected to my Database

By abdul_basheer ·
<HTML>
<HEAD>
<TITLE>Student Records</TITLE>
</HEAD>
<BODY>
<%
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)


%>
</BODY>
</HTML>


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.

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by robo_dev In reply to ASP is getting connected ...

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

Back to Networks Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums