| | |
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 |
"crystal .net .net2005 30minutes 2008 access add advanced application array assignment basic binary box button buttons center click code combo connectionstring convert cpu data database databasesearch datagrid datagridview design designer dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity pan peertopeervideostreaming picturebox picturebox2 port print printpreview record regex reports" reuse right-to-left save savedialog search serial socket sorting sqldatbase sqlserver storedprocedure string temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf xml





