|
-
December 20th, 1999, 08:57 AM
#1
HELP PLS
how to convert the access database to show in the visual basic? (i mean the code)
somebody pls help, i am a beginner here. thanks alot
-
February 9th, 2000, 09:03 AM
#2
Re: HELP PLS
Dim DB As Database
Dim RS As Recordset
Dim theData(100) As String ' when full, empty and continue
Dim counter As Long
Dim x As Long
Dim DB As Database
Dim RS As Recordset
Set DB = Nothing
Set DB = OpenDatabase("C:\accessdb.mdb", False, False, ";pwd=123456")
'opens database C:\ACCESSDB.MDB with password 123456
Set RS = DB.OpenRecordset("SELECT * FROM TheTable")
RS.MoveFirst
counter = 0
While Not RS.EOF
counter = counter + 1
theData(counter) = RS!Name
RS.MoveNext
Wend
RS.Close
DB.Close
For x = 1 To counter
MsgBox theData(x)
Next x
'This should display all "Name" in "TheTable"
'(But it only handles 100 before running out of
'room in the array)
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
|