Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   Creating an Access Database programmatically... (http://www.programmingforums.org/showthread.php?t=10161)

Carl Jun 3rd, 2006 2:33 PM

Creating an Access Database programmatically...
 
I've got Visual Studio .NET 2003 and I'm exploring VB at the moment. I haven't used VB since version 4 so you can imagine the uphill struggle I'm facing.

I'm used to using the DAO for data access but now have to use ADO. I've worked out how to open an Access database, but how on earth can I create one in code? Do I have to use SQL as most of the code snippets I've found on the Internet or is there another way?

It's not for a project specifically, just something that I'd like to know how to do.

Carl

lectricpharaoh Jun 3rd, 2006 5:19 PM

Quote:

Originally Posted by Carl
Do I have to use SQL as most of the code snippets I've found on the Internet or is there another way?

I believe so. However, I don't believe you can (easily) create the database. However, you can add tables to it, so you could start with an empty database, and essentially build it in code. I think you'd be stuck with SQL, but why is that a problem?

Carl Jun 4th, 2006 6:12 AM

Quote:

Originally Posted by lectricpharaoh
I think you'd be stuck with SQL, but why is that a problem?

It's not really a problem, I just wondered if there was another way to do it. I've been doing a few google searches on DAO to ADO conversion. I tried opening a VB4 project in to 2003, but it said that the project is not a valid VB6 project. Guess I can't do from 4 to 7 easily.

Oh well, onwards and upwards :D

Carl


All times are GMT -5. The time now is 6:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC