Problem with ODBC Connect!!!! 
Author Message
 Problem with ODBC Connect!!!!

Well, this is the little problem I have:
    Form: collects userid and password from user, after user enters data and
hits ok the following code should run:

Private Sub OKComando_Click()
    On Error GoTo ErrorCatcher
    Dim mydb As Database
    Dim theset As QueryDef
    Dim theone As Recordset
    Dim strsql As String
    Dim myUserid As String
    Dim myPswd  As String
    myUserid = Me![userID]
    myPswd = Me![Password]
    Set mydb = CurrentDb()
    Set theset = mydb.CreateQueryDef("quer11")
    theset.Connect = "ODBC; DSN = eldb2con; DATABASE = eldb2con;uid=" &
myUserid & ";" & "pwd=" & myPswd & ";"
    theset.SQL = "select * from sysdba.tsa_file_dly where cmpl_dt =
'980115'"
    Set theone = mydb.OpenRecordset("quer11")
    Do While Not theone.EOF
        Debug.Print theone!host_id & " " & theone!cmpl_dt
        theone.MoveNext
    Loop:
    Set mydb = Nothing
Login_mcr_cancel_Exit:
    Exit Sub
ErrorCatcher:
    MsgBox Error$
    Resume Login_mcr_cancel_Exit:
End Sub

But I get stucked in the ODBC connect part, can somebody shine some light on
this problem

Thanks
Skar



Sun, 09 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. problem: ODBC always takes the last user for connect

2. VB3 Problem connecting to Oracle via ODBC

3. VB4 ODBC connect to SQL Server problem

4. VB4 Oracle7 ODBC - Problems connecting from VB IDE

5. Problem connecting to SQL server via ODBC

6. Access ODBC with VB4 connect problem

7. ODBC connect problems

8. Help: Problem connecting VB3 app to Access 2.0 w/ODBC in Win-OS/2

9. Problems connecting to Sybase via ODBC

10. HELP: Simple ODBC Connect Problem

11. ODBC to Sybase connect problems

12. Problem connect VB to SQL Server ODBC

 

 
Powered by phpBB® Forum Software