|
-
Apr 17th, 2000, 04:37 AM
#1
Thread Starter
Addicted Member
Hey,
Im in a very big hurry to figure this out.
Ive been trying to get this Getrows Function
to take a row from my Db and put it in a
array but I dont know how!!!!
I need the code really bad..
The info:
Db name = E:\ClientAlert\clients.mdb
Db recordsource = Clients
Db Row = closeing date
I need all the rows to be put into the array 'Dates()'
Please help!!
Evan
-
Apr 17th, 2000, 10:13 AM
#2
Here you go. This example is uding ADO, so add a reference to Microsft ActiveX Data Objects 2.x Library.
Code:
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim arrRec As Variant
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "E:\ClientAlert\clients.mdb"
rs.Open "Select [Closing Date] From Clients", cn, adOpenStatic
If Not rs.EOF Then
arrRec = rs.GetRows
End If
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
arrRec is now holding all records from your recordset.
P.S. note that your array is structured like this:
arrRec(Row, Col)
-
Apr 17th, 2000, 10:21 AM
#3
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|