hobbes2103
Active member
- Joined
- Jul 10, 2003
- Messages
- 43
Hello!
Here is my code :
Dim myConnection As New OleDb.OleDbConnection
Dim myReader As OleDb.OleDbDataReader
Dim myConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\erco\erco.mdb"
myBase = New OleDb.OleDbConnection(myConnectionString)
myBase.Open()
Dim myCommand As New OleDb.OleDbCommand
Dim mySelect As String = "SELECT code,name FROM articles WHERE code=1"
myCommand = New OleDb.OleDbCommand(mySelect, myBase)
myReader = myCommand.ExecuteReader()
Dim str As String
While (myReader.Read())
str = myReader("name")
End While
myReader.Close()
Here is my code :
Dim myConnection As New OleDb.OleDbConnection
Dim myReader As OleDb.OleDbDataReader
Dim myConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\erco\erco.mdb"
myBase = New OleDb.OleDbConnection(myConnectionString)
myBase.Open()
Dim myCommand As New OleDb.OleDbCommand
Dim mySelect As String = "SELECT code,name FROM articles WHERE code=1"
myCommand = New OleDb.OleDbCommand(mySelect, myBase)
myReader = myCommand.ExecuteReader()
Dim str As String
While (myReader.Read())
str = myReader("name")
End While
myReader.Close()