nicole101
nicole101

Reputation: 187

Import csv file to access database using visual basic

I'm very new to visual studio and visual basic.

I already studied the basics of visual basic so I tried stepping up a little and play with database in visual basic. I'm using visual studio 2010.

I first made an access database. I followed the instructions that I searched on the net on how to connect it to your visual basic program. Data>Show Data Source>Add Data Source> ...

But when I search on how to do it, I became really confuse because of these things:

  1. Is vba and vb the same?

  2. all the tutorials are for access but why do they still need to have a stringconnection when they already connect it using what I did?

  3. they are searching for .mdb but the extension of my access database is .accdb?

  4. they have an sql query for inserting the datas from the csv file but the pc that will be using the program don't have sql installed but mysql. Will it still work?

I'm still noob in these things so please if anyone can shed some light in these questions, thank you very much. >.<

Upvotes: 0

Views: 1794

Answers (1)

Jaroslav Kubacek
Jaroslav Kubacek

Reputation: 1447

  1. VBA and VB 6.0 are almost the same. Main difference is that VBA is intended to be host in application like Excel, Word .... BUT language you probably use with VS 2010 is VB.NET and that is something different. VB.NET is object oriented language which target .NET Runtime and Framewor. See Difference between Visual Basic 6.0 and VBA

  2. Connection string is a string that specifies information about a data source and the means of connecting to it. In .NET this describe (or can) path or location, provider, credentials and other informations. See MSDN Connection string in .NET

  3. If I'm correct MDB is older format and ACCDB is format used by Microsoft Office Access 2007 and newer. Here is post how to connect to access db file: SQL connection string for microsoft access 2010 .accdb But do you realy need to use acess database? There are better alternatives.

  4. There is no need of real database engine for your scenario. You wanna to use standalone file as a datasource, dataprovider will be responsible for interaction with datasource. E.g. OleDB provider

Upvotes: 1

Related Questions