I have error in connection codefor coonect toMS access with OLEDB data source

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2006
Posts: 3
Reputation: mojal67 is an unknown quantity at this point 
Solved Threads: 0
mojal67 mojal67 is offline Offline
Newbie Poster

I have error in connection codefor coonect toMS access with OLEDB data source

 
0
  #1
Oct 18th, 2006
Hi ,I work with vb.net 2005 . I want to know if I want to connet to data base with Ms Access which data source i can use (ODBC or OLEDB)
I write the following code in form load event (by OLEDB) :

Dim conn As New OleDb.OleDbConnection("Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBdatabase Locking Mode=1;Jet OLEDBdatabase Password=;Data Source=C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb;Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDBystem database=;Jet OLEDBFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDBdon't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False")

Dim da As New OleDb.OleDbDataAdapter("select * from orders", conn)
Dim ds As New DataSet
da.Fill(ds)

and have an error that "OledbException was unhandled"
How can i solve this error or How can connect with ODBC data source to MS access data base.
I will happy if anyone can help me.
Thank You , MOJAL
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC