Results 1 to 2 of 2

Thread: "User-defined type not defined" -error

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Location
    Ikaalinen, Finland
    Posts
    26

    Post

    Hello all!

    I'm learning to use ODBC with my databas programming now. I copied one example from the VB Help. But when I'm trying to run that copied example, I'll get an error "User-defined type not defined" at first program line.

    Here is the example:

    Private Sub rdoColumnButton_Click()
    Dim cl As rdoColumn
    Dim rs As rdoResultset
    Dim sSQL As String
    Dim cn As rdoConnection
    Dim connect As String

    connect = "uid=;pwd=;database=pubs;"

    Set cn = rdoEnvironments(0).OpenConnection(workdb, _
    rdDriverNoPrompt, False, connect)

    sSQL = "Select Pub_ID, Max(Price) BestPrice " _
    & " from Titles Group by Pub_ID"

    Set rs = cn.OpenResultset(sSQL, rdOpenForwardOnly, _
    rdConcurReadOnly)

    With rs
    For Each cl In .rdoColumns

    Print cl.Name; "-"; cl.Type; ":"; cl.Size, _
    cl.SourceTable, cl.SourceColumn
    Next cl
    Print
    Do Until .EOF
    For Each cl In .rdoColumns
    Print cl.Value,
    Next cl
    Print
    .MoveNext
    Loop
    End With
    End Sub

    ****

    So, the error appears on line "Dim cl As rdoColumn".

    What's matter, can someone help me!!! I have VB5 (Enterprise), WIN98...

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Garden Grove, CA, Orange
    Posts
    55

    Post

    Goto project => References... and select
    Microsoft Remote Data Object 2.0

    Joon


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