From the beginning to learn the computer, we have been using SQL database. This time I contacted the Access database and I will create a connection from access to share my gains in the Access database.
The difference between a SQL database and an Access database: (from Baidu)
So how do you link an Access database with vb.net?First, create an Access database fileMy is WIN8.1 system, directly in the corner of the desktop swipe, in the search bar search access, directly open the office comes with access, if you do not have Office installed on your PC, also want to use Access also do not worry, you can go directly to the site to search a download, you can download separately we want to The version of Access you want.Second, create a new Access database, follow me~1. Click on "Blank Desktop database"2. Determine the file name and save location, click "Create"3. Generate table automatically generate a blank table, in the table data data, click Save, CREATE table name Table_student, of course, here can also build multiple tables.The next time you open the table, double-click the name of the table to see the contents of the table you created.
third, add a data sourceSelect a data source type Select a database model change the database connection type
always click "Yes" or "next" until you select "table" and "View" and click Done.
Four, the testuse vs in theDataGridView Test, first connect vs
Same as the table we created in the Access database.
Summary:What is the difference between establishing a connection without using an ODBC data source, and directly establishing a relationship with the table? Why are there differences between. mdb and. accdb in an Access database? To know the answer, see my next blog decomposition ~
Use vb.net to connect to an Access database under the VS2013 platform