Question Implementing Database access (MS Access) using VB2008 express

nnick

Member
Joined
Apr 14, 2009
Messages
5
Programming Experience
Beginner
I am new to VB and downloaded the VB 2008 Express recently. Am following the "Beginning VB2005 databases" book to learn as I go along.
I have hit a snag where the book example is initializing a new instance of the data access base class as "Using objData as new WDABase", however the VB 2008 does not recognize WDABase as a valid class.
How can I work around this issue.
Also where can I get sample programs implement SQL queries to access MS Access databases for VB2008 express edition?
 

newguy

Well-known member
Joined
Jun 30, 2008
Messages
611
Location
Denver Co, USA
Programming Experience
1-3
After you build a Db in access, you simply need to add the Db to your project, select the 'Data' tab and then 'Add New Data Source...', select Database, select 'add connection string', select Access Db, and browse for the DB, it will make the connection string for you and save it in My.Setting.<SomeConnectionStringName>. The you will use the OleDb objects to access your Db in code. FYI After you add the Db you will not be able to change the tables, unlike SQL tables(SQL2008Express).
 

nnick

Member
Joined
Apr 14, 2009
Messages
5
Programming Experience
Beginner
Thanks for your reply @newguy. However, the intent is to update the tables in the MS Access database that I am using. Is there any way to manipulate the data in MS Access databases using VB 2008? I haven't come across any information as to how to go about that.
 

newguy

Well-known member
Joined
Jun 30, 2008
Messages
611
Location
Denver Co, USA
Programming Experience
1-3
By changes I mean while in the designer(VB2008). You can add/delete/update records, query, and things like that. You just can't change the table structure in the designer, unlike SQL. Which can be handy at times. Google 'vb.net oledb' and you will find plenty of links to get you started.
 
Last edited:

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,052
Programming Experience
10+
nnick, read the DW2 link in my signature, carefully noting any pages that are more relevant to your version of VS/.NET (3.5) in the top right

Start with the Creating a Simple Data App tutorial
 
Top Bottom