By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

database connection through ASP

P: 2
I am creating a table in Microsoft Access.

Table Name: dp_reg

Field Data type
cno (primary key) number
offic number
des text
da Text
ia Text
po Text
allg Text
lno Text
ldt Date
midt Date
remk text

Details of Database
Database name: C:\Documents and Settings\Administrator\My Documents\ disc.mdb
DSN name=rhit.dsn

In ASP, the following two approach is used for connection.
Approach :1
Expand|Select|Wrap|Line Numbers
  1.        dim conn
  2.        set conn=server.createobject("adodb.connection")
  3.        conn.ConnectionString = "DSN=rhit.dsn" 
  4.        conn.Open
  5.  
Then following error is displayed.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.


Approach :2
Expand|Select|Wrap|Line Numbers
  1.     dim conn
  2.     set conn=server.createobject("adodb.connection")
  3.     conn.ConnectionString ="DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=C:\Documents and Settings\Administrator\My Documents\ disc.mdb" 
  4.     conn.Open

Then following error is displayed.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xbe8 Thread 0x460 DBC 0x1957a7c Jet'.
Jun 29 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.