Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using OLEDBCONNECTION

Status
Not open for further replies.

astrodestino

IS-IT--Management
Feb 19, 2005
179
0
0
AR
Hi! In VB 6 I use this sintax to open and read DBs:

Code:
AccessConnect = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & App.Path & "\mensajes.mdb"
Conn1.ConnectionString = AccessConnect
Conn1.Open AccessConnect
sqlstm = "SELECT * FROM enviados where datediff('d', fecha,now )> " & borrarviejos 
Set Rs1 = New ADODB.Recordset
Rs1.Open sqlstm, Conn1, adOpenDynamic, adLockOptimistic
ids(contador) = Rs1.Fields.Item("id").value
cuentas(contador) = Rs1.Fields.Item("cuenta").value

I had conectes to the DB via OLEDBCONNECTION in VB.NET how do I read data from the DB?

THank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top