-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Jigs
Message 6 in Discussion
New Message on MumbaiUserGroup
updating existing data in database by vb.net
Reply
Reply to Sender
Recommend
Message 5 in Discussion
From:
Jigs
New Message on MumbaiUserGroup
updating existing data in database by vb.net
Reply
Reply to Sender
Recommend
Message 4 in Discussion
From:
Jigs
Hi UKP, Here is the sample code to start with.
Cheers
Jignesh Desai - MVP
www.dotnetjini.com
NET Training starting next month.[ email @ [EMAIL PROTECTED] ] Imports System
Imports System.Data
Imports System.Data.OleDb
Try
'construct the command object and open a connection to the Contacts table
Dim cmdString As String = "Select ContactID, FirstName, LastName from Contacts"
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\contactmanagement.mdb"
Dim myConnection As OleDbConnection = New OleDbConnection(connString)
' Open connection
myConnection.Open()
'Create OleDbCommand object
Dim TheCommand As OleDbCommand = New OleDbCommand(cmdString, myConnection)
TheCommand.CommandType = CommandType.Text
' Create a DataReader and call Execute on the Command Object to construct it
Dim TheDataReader As OleDbDataReader = TheCommand.ExecuteReader()
While TheDataReader.Read()
System.Console.Write(TheDataReader("ContactID").ToString())
System.Console.Write(" ")
System.Console.Write(TheDataReader("FirstName").ToString())
System.Console.Write(" ")
System.Console.Write(TheDataReader("LastName").ToString())
System.Console.WriteLine()
End While
Catch ae As OleDbException
MsgBox(ae.Message())
End Try
View other groups in this category.
View other groups in this category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]