VB .NET ADO Can't open Access DB 
Author Message
 VB .NET ADO Can't open Access DB

Hello, All!

1. VB .NET
2. ADO (Reference: Microsoft ActiveX Data Objects 2.7 Library)
3. Access 2000; testdb.mdb without any passwords

Dim cn As ADODB.Connection
Dim ConnectionString As String
Dim rs As ADODB.Recordset

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User
ID=Admin;Data Source=D:\Txt\My_Basic\DB\Access\testdb.mdb;Mode=Share Deny
None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry
Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet
OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet
OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False"

cn = New ADODB.Connection()
cn.ConnectionString = ConnectionString
cn.Open()  'Here error: "Authentication failed"

rs = cn.Execute("select * from people")
rs.Close()
cn.Close()

Full text of error message:
"An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in Access.exe
Additional information: Authentication failed."

Naturally, there is not a password!
What reason of this problem?

The same work fine for MS SQL 2000!
(but with another ConnectionString = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=sa;Initial Catalog=Northwind;Data Source=(local);Use
Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
ID=UHR;Use Encryption for Data=False;Tag with column collation when
possible=False")

With best regards, Sergey.



Sun, 12 Jun 2005 16:56:29 GMT  
 VB .NET ADO Can't open Access DB
Almost everybody here is using VB6 or lower. While you may get a stray
answer to VB.NET questions here, you should ask them in newsgroups
devoted exclusively to .NET programming. Look for newsgroups with the
word "dotnet" in their name.

For the news.devx.com news server, try these

vb.dotnet.discussion
vb.dotnet.technical

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

There are some others, but these should get you started.

Rick - MVP


Quote:
> Hello, All!

> 1. VB .NET
> 2. ADO (Reference: Microsoft ActiveX Data Objects 2.7 Library)
> 3. Access 2000; testdb.mdb without any passwords

> Dim cn As ADODB.Connection
> Dim ConnectionString As String
> Dim rs As ADODB.Recordset

> ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User
> ID=Admin;Data Source=D:\Txt\My_Basic\DB\Access\testdb.mdb;Mode=Share
Deny
> None;Extended Properties="";Jet OLEDB:System database="";Jet
OLEDB:Registry
> Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet
> OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet
> OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password="";Jet
> OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet
> OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without
Replica
> Repair=False;Jet OLEDB:SFP=False"

> cn = New ADODB.Connection()
> cn.ConnectionString = ConnectionString
> cn.Open()  'Here error: "Authentication failed"

> rs = cn.Execute("select * from people")
> rs.Close()
> cn.Close()

> Full text of error message:
> "An unhandled exception of type
> 'System.Runtime.InteropServices.COMException' occurred in Access.exe
> Additional information: Authentication failed."

> Naturally, there is not a password!
> What reason of this problem?

> The same work fine for MS SQL 2000!
> (but with another ConnectionString = "Provider=SQLOLEDB.1;Persist
Security
> Info=False;User ID=sa;Initial Catalog=Northwind;Data
Source=(local);Use
> Procedure for Prepare=1;Auto Translate=True;Packet

Size=4096;Workstation

- Show quoted text -

Quote:
> ID=UHR;Use Encryption for Data=False;Tag with column collation when
> possible=False")

> With best regards, Sergey.



Sun, 12 Jun 2005 17:03:20 GMT  
 VB .NET ADO Can't open Access DB

Hi Did you ever found the fix to this problem?

Thanks,
Koichiro

Originally posted by Sergey Klokov

Quote:
> Hello, All!

> 1. VB .NET
> 2. ADO (Reference: Microsoft ActiveX Data Objects 2.7 Library)
> 3. Access 2000; testdb.mdb without any passwords

> Dim cn As ADODB.Connection
> Dim ConnectionString As String
> Dim rs As ADODB.Recordset

> ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User
> ID=Admin;Data
> Source=D:\Txt\My_Basic\DB\Access\testdb.mdb;Mode=Share Deny
> None;Extended Properties="";Jet OLEDB:System database="";Jet
> OLEDB:Registry
> Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet
> OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet
> OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
> Password="";Jet
> OLEDB:Create System Database=False;Jet OLEDB:Encrypt
> Database=False;Jet
> OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact
> Without Replica
> Repair=False;Jet OLEDB:SFP=False"

> cn = New ADODB.Connection()
> cn.ConnectionString = ConnectionString
> cn.Open()  'Here error: "Authentication failed"

> rs = cn.Execute("select * from people")
> rs.Close()
> cn.Close()

> Full text of error message:
> "An unhandled exception of type
> 'System.Runtime.InteropServices.COMException' occurred in Access.exe
> Additional information: Authentication failed."

> Naturally, there is not a password!
> What reason of this problem?

> The same work fine for MS SQL 2000!
> (but with another ConnectionString = "Provider=SQLOLEDB.1;Persist
> Security
> Info=False;User ID=sa;Initial Catalog=Northwind;Data
> Source=(local);Use
> Procedure for Prepare=1;Auto Translate=True;Packet
> Size=4096;Workstation
> ID=UHR;Use Encryption for Data=False;Tag with column collation when
> possible=False")

With best regards, Sergey.

--
Posted via http://dbforums.com



Thu, 28 Jul 2005 17:33:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB .NET ADO Can't open Access DB

2. VB .NET ADO Can't open Access DB

3. Can't open secure Access 2.0 DB from VB 4.0

4. ADO/ADO.NET to Access db question

5. Direct 'net db access from vb app?

6. 'Canned' data in VB program

7. Can't access db in Access 2000 using ADO

8. Using ADO to open a password protected Access DB.

9. How to Open an Access DB in ADO?

10. Why can't I open an Access DB in VBA

11. Access DB Field's opening problem (Error 6, Overflow)

12. Compacting open Access DB's

 

 
Powered by phpBB® Forum Software