View Single Post
  #3 (permalink)  
Old 11-21-2008, 7:23 AM
Nader Nader is offline
VB.NET Forum Enthusiast
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Oct 2008
Posts: 49
Reputation: 20
Nader is on a distinguished programming path ahead
Default

I'm using thie code in module and called from Sub. Your way will not service me.

Here is the solution

Dim sql AsString = "Select Name,Company FROM TBaccount"

Dim cmd AsNew OleDbCommand(sql, conn)
Dim dr As OleDbDataReader
conn.Open()
dr = cmd.ExecuteReader
DoWhile dr.Read
Form1.TextBox1.Text = dr("Name")
Form1.TextBox2.Text = dr("Company")
Reply With Quote