This relationship seems obvious, and a person would understand it right away. See how the third list uses words that appeared in the first two lists? A database is capable of understanding that the Dad and Oatmeal cookies in the Batches list are the same things as the Dad and Oatmeal in the first two lists. Because you're only making cookies you know the recipe for and you're only going to give them to your friends, this new list will get all of its information from the lists you made earlier. You decide to create a third list to keep track of the batches of cookies you make and who they’re for.
#Microsoft access database 2010 tutorial how to#
To explore this idea, let's go back to the simple database with two lists: names of your friends, and the types of cookies you know how to make. A relational database is able to understand how lists and the objects within them relate to one another. We call a database like the ones you’ll work with in Access a relational database. However, the thing that really sets databases apart from any other way of storing data is connectivity. Non-numerical data plays a significant role in almost any database, and it's important to be able to sort and analyze it. If a database is essentially a collection of lists stored in tables and you can build tables in Excel, why do you need a real database in the first place? While Excel is great at storing and organizing numbers, Access is far stronger at handling non-numerical data, like names and descriptions. In fact, you could build a similar table in Excel. 'DONE! 'Update / Deletes additions, you name it all use the same technology.If you are familiar with other programs in the Microsoft Office suite, this might remind you a lot of Excel, which allows you to organize data in a similar way. ^_^ I've placed a datagridview on the form called: DataGridView1
'Create a datatable to house the results from the query Dim DataTable As New DataTable( "SomeTable") Dim DataAdapter As New OleDb.OleDbDataAdapter(SQL) 'Use the dataadapter object to use the results from the query and bash them in a "DataTable" 'A datatable is an in memory table that is comparable with the adodb.recordset object you've 'previously used in vb6 or vba. 'The oledb.oleDBCommand object allows you to shoot some query over a connection and -do- 'something with it Dim SQL As New OleDb.OleDbCommand( "SELECT * FROM SomeTable", pCn) is the file on the right location? -> check connectionstring")Įnd Try If pCn.State = ConnectionState.Open Then 'you've got an open connection!!! Whohooo 'Do your magic over here.
MessageBox.Show( "Could not connect for some reason. Try 'try to open the connection Call pCn.Open() PCn = New OleDb.OleDbConnection( "Provider=.12.0 Data Source=C:\myFolder\myAccess2007file.accdb Persist Security Info=False ") 'this is also new the use of Try / Catch statements 'Check out over here: (VS.71).aspx Try 'on form load instantiate the connection object 'Once you instantiate the an nnection object you need to provide a connection string 'you can use *.udl files to create connection strings check over here: '(VS.71).aspx 'Or catch up on some reading over here: Private Sub Form1_Load( ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Read this wiki: 'I'm declaring a connectionobject within this class called pCn Private pCn As OleDb.OleDbConnection Most important difference between VB(A) and VB.Net is the use of 'ADO.Net. So you can do things over here 'that you previously could not do. You probably have used VB6 or VBA before.