Ms Access
-
hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..
-
hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..
Search this site, or even google and there are tons of examples. If you're 'really new' then perhaps it's too soon to worry about databases, the world is filling with people who can make a pretty form in VB, and will never be programmers.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Search this site, or even google and there are tons of examples. If you're 'really new' then perhaps it's too soon to worry about databases, the world is filling with people who can make a pretty form in VB, and will never be programmers.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Christian Graus wrote:
the world is filling with people who can make a pretty form in VB, and will never be programmers.
Very true :laugh:
-
hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..
I am certainly not going to damper your spirits and tell you not to strive for what you want. Look under the system.data namespace in MSDN library. This is the namespace where you can do all kinds of data manipulations using databases. There is something called an oledb provider. There for it should be system.data.oledb This is the only way you can access the Microsoft access database engine. You can use something like this 'OleDbConnection object used for connecting to a database Private _ConnectionObj As New OleDbConnection() 'OleDbCommand object used for executing a command Private _Command As OleDbCommand _connectionObj.ConnectionString = [Shared].ConnectionString _ConnectionObj.Open() _Command = New OleDbCommand("Select * From Registrants", _ConnectionObj) Where you see [Shared].ConnectionString, this is the string you should pass in Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Visual Studio Projects\AnnualMeetingRegistration\Database\Registrants.mdb;User Id=admin;Password=; Normally, you would want to store you connection string in the app.config file, but don't do that right now. Just use the string example I showed you. As you get more experienced, you will find better methodologies of programming. Then you open the connection object and pass the connection object to the command object. After, you have finished close the connection object. If you decide to use a data reader you will have to close that as well. Here is an excellent website for connection strings. http://www.connectionstrings.com/[^] I hope this helps, Tyquaun