Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm using sometimes Access databases in .net too. Ok, MS-Access isn't the best database for this kind of application, I know. But the easy-doing complex queryes and the functional and well-knowed reports makes Access a good cost-benefit solution.</p> <p>I saw the link that you've indicated. This way was my first technique, but then I realized there was another easier and faster. I suggest you to do the linkage for Access database in a different way. </p> <ol> <li>Create a dataSet, if you already didn't it.</li> <li>Create a connection to the MS-Access database using database explorer.</li> <li>Drag and drop your desired tables on created DataSet (.net will create the designer code for you in backStage)</li> <li><p>On code, create an tableAdapter object and a table object: Supose that your dataSet name is DS1 and a table name is table01.</p> <p>language: VB.NET check intellisense autocomplete for your dataobjects</p></li> </ol> <p>creates a tableadapter object and table object (designed when you drop the database explorer objects in dataset)</p> <pre><code>dim table01_TA as new ds1Tableadapters.table01_tableAdapter dim table01 as new ds1.table01dataTable </code></pre> <p>loads the database data into the on-memory table table01</p> <pre><code>table01 = table01_TA.getData </code></pre> <p>do your opperations using table01 (add, update, insert, delete, queries) for automatic generation of scripts for update, insert and delete, make sure your table has primaryKeys and correct relationships. finally, update the table adapter. Unless you do it, the data will not be updated in the database.</p> <pre><code>table01_Ta.update(table01) </code></pre> <p>I suggest you use LINQ to query your data, and the datatable methods to adding and editing data. These methods are created automatically when you drop the databaseExplorer tables on dataSet and save it. Its worth to compact and repair Access database frequently.</p> <p>Contat-me if you have troubles.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload