| | |
Need Help
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 38
Reputation:
Solved Threads: 0
EASY 
First, before defining the class write imports system.data.oledb
Second, inside your sub, you need to define a connection to the data base (for ex. Dim con as new oledbconnection)
then write the following:
con.ConnectionString = "provider=microsoft.jet.oledb.4.0; data source=C:\DB.mdb"
ofcourse instead of C:\DB.mdb you will write the drive where you saved the db and its name
then open your connection (con.open())
then define the command (dim cmcontact as new oledbcommand)
inside the command you will write the sql statement like insert to insert to the db also update or select
write the following 2 statements:
cmcontact.Connection = con
cmcontact.ExecuteNonQuery()
con.Close()
that is it my friend
Happy Coding

First, before defining the class write imports system.data.oledb
Second, inside your sub, you need to define a connection to the data base (for ex. Dim con as new oledbconnection)
then write the following:
con.ConnectionString = "provider=microsoft.jet.oledb.4.0; data source=C:\DB.mdb"
ofcourse instead of C:\DB.mdb you will write the drive where you saved the db and its name
then open your connection (con.open())
then define the command (dim cmcontact as new oledbcommand)
inside the command you will write the sql statement like insert to insert to the db also update or select
write the following 2 statements:
cmcontact.Connection = con
cmcontact.ExecuteNonQuery()
con.Close()
that is it my friend
Happy Coding
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: RS232 File Transfer Problems
- Next Thread: Reference types
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic binary bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





