Help Visual basic 3.0 and Access 2.0 
Author Message
 Help Visual basic 3.0 and Access 2.0

Hello
        Could somebody please give me some hints on how to connect VB with Access for the following
1. Start a new database when something is activated in VB
2. Send data from VB to access dynamically, ie when VB program is working
3. Get back the calculated results from access, also dynamically to VB at the end of the program
Thanks a lot
Tom


Mon, 11 Aug 1997 05:15:56 GMT  
 Help Visual basic 3.0 and Access 2.0
Here's a snippet from a program I wrote.  Found out about it in the help
screen for ...

Sub StoreLocal_Click ()
    Dim db As Database
    Dim databasestring As String
    Dim connectstring As String
    Dim SQL As String
    Dim ds As dynaset
    Dim opendb_time As Double

    ' Setup for database connect string
    databasestring = "c:\seger\db\mls.mdb"
    connectstring = ""

    On Error GoTo Label3

    ' Create file to store timings
    Filenum = 3
    FName = "c:\seger\db\LocalFile"
    Open FName For Append As Filenum Len = 10000
    Write #Filenum, "Begin Timings Using Pass-Through Query Into A
DynaSet"
    Write #Filenum, "Data is retrieved from Local Database \013"

    ' Open DB and get data
    Set db = OpenDatabase(databasestring, False, False)
    opendb_time = GetTickCount()
    SQL = "SELECT mls_num,price FROM mls_list2 WHERE price > 100000 AND
price < 110000 "
    Set ds = db.CreateDynaset(SQL, 4)

    ' Make sure you have the data
    While Not (ds.EOF)
        MsgBox "Multiple Listing No. is" & ds!mls_num & "List Price is " &
ds!price
        ds.MoveNext
    Wend

    Exit Sub

Label3:

    MsgBox Error(Err)
    Exit Sub
End Sub

Hope this helps.

Mary V. Seger
Cap Gemini America
708-531-1300



Mon, 25 Aug 1997 01:41:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Visual basic 3.0 accessing Access 2.0 databases

2. Performance comparison Visual Basic 3.0 vs MS ACCESS 2.0

3. Access 2.0 and Visual Basic 3.0

4. Visual Basic 3.0 and Access 2.0

5. Porting Access 2.0 App to Visual Basic 3.0

6. Visual Basic 3.0 and Access 2.0

7. Performance comparison Visual Basic 3.0 vs MS ACCESS 2.0

8. Visual Basic 3.0 and Access 2.0

9. Visual Basic 3.0 - Access 2.0

10. Visual Basic 3.0 & Access 2.0

11. Visual Basic 3.0 and MS Access 2.0

12. Install Access 2.0 Cmpt Layer w/o Access 2.0 for VB 3.0

 

 
Powered by phpBB® Forum Software