Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've recently made another question about connecting to MS-ACCESS database with .NET in C# or VB.NET. It worked just as intended with MDB, but with accdb it caused an exception in

conn.Open();

which follows:

alt text http://dl.dropbox.com/u/3045472/accdb_fail.png

Is there another way to do this? My original intention (like stated in the original question) is gathering some (actually, a lot of) fields.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
501 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use ACE 4 driver, download it here then use following connection string:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:marcelo.accdb;Jet OLEDB:Database Password=MyDbPassword;"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...