I have a table called GRN with MS Access Database as shown below
grn_id (Autonumber)
grn_number (Text)
grn_date (Date/Time)
invoice_number (Text)
invoice_date (Date/Time)
voucher_number (Text)
supplier (Text)
I have created a data set with VB.Net Visual Studio 2012 in the data Set I have created a table adapter and a query with the following code
SELECT grn_id, grn_number, grn_date, invoice_number, invoice_date, voucher_number, supplier
FROM grn
WHERE (grn_number = ?)
And named it as FillByGRN
In the form I have added the following code
Me.GrnTableAdapter.FillByGRN(dataTable:=Me.DocmanDataSet.grn, grn_number:=finfo.Text)
When I Run The application and Give the textfield finfo a value and click on my button to fill is is not working and stopped on the line of filling the table adapter.
Any Solution Please
Considering the exception you mentioned, you don't seem to have Jet Database Engine driver installed on your machine. Either download and install that driver, or in case you're running against Access 2010 or later, use ACE.OLEDB
connection string instead of the old-school Jet.OLEDB
.
The connection string looks like this:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<Access Database Path>;
Persist Security Info=False;
You can read more about OLEDB connection strings here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.