Results 1 to 5 of 5

Thread: [ODBC Driver Manager] Data source name not found and no default driver specified

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    [ODBC Driver Manager] Data source name not found and no default driver specified

    I am trying to display oracle DB into DataGrid and facing some problem

    Code:
    Private Sub Command2_Click()
        Dim oconn As ADOconnect
        Dim rs As Recordset
        Dim strSQL As String
        
        strSQL = "SELECT * FROM ZZZJUNKPERSON"
        Set oconn = New ADOconnect
        Set rs = New ADODB.Recordset
        oconn.Open "ODBC;DSN=SSSS;UID=SSSSS;PWD=SSSSS;DATABASE=SSSSS"
        rs.CursorType = adOpenStatic
        rs.CursorLocation = adUseClient
        rs.LockType = adLockOptimistic
        rs.Open strSQL, oconn, , , adCmdText
        Set DataGrid1.DataSource = rs
             
    End Sub
    when I compile the code I get error.
    I am new to VB.
    Last edited by hoho46; Mar 7th, 2013 at 04:55 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width