|
-
October 5th, 2001, 02:12 AM
#1
how to connect to access?
okay, I'm a SQL Server user, using an access database for a client's web project since the host does not support SQL Server. I have this error coming up:
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.
using an oledb connection like this one:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & PathToDB
I've also tried a DSN, but no luck....help!!!
-
October 5th, 2001, 02:58 AM
#2
Re: how to connect to access?
Check out that the database is opened, if opened close it.
check out the driver also.
Regards,
Shivakumar G.M.
-
October 5th, 2001, 07:11 AM
#3
Re: how to connect to access?
It does not matter if db is open. You can connect to the open database.
Iouri Boutchkine
[email protected]
-
October 6th, 2001, 02:19 AM
#4
Re: how to connect to access?
Hi,
If the data base file is opened at the time of running of the program the above error will come. Try connecting to database through program by closing the data base file
all the best
sunil
-
October 6th, 2001, 09:38 PM
#5
Re: how to connect to access?
Hello:
Is the table and database password and userid protected? You might need to get the password and userid to get in.
Good Luck
-
October 8th, 2001, 03:24 AM
#6
Re: how to connect to access?
I am finding now that my connection string works (without changing it) if I do a simple:
rs.open query, conn, adopenforwardonly, adlockreadonly
but if I do a rs.open query,conn, adopenkeyset,adlockbatchoptimistic
with a clientside cursor it gives me this error. I usually use this as a standard db method, since it allows me to use a global function:
RetrieveRS(Query as string,optional PageSize as integer,optional PageNum as integer) as adodb.recordset
that all of my methods can call to have it return a disconnected recordset so that the whole recordset is returned in one call to the database, rather than row by row.
Can I not do this with access?
-
October 9th, 2001, 03:21 AM
#7
Re: how to connect to access?
I find all freshmen here. All you need to do is a small change like this :
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & PathToDB & "'"
good luck! Remember to give me some good comments .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|