Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005

    Question Unanswered: Help newbie error vb6 connect to db2 8.2 Express

    Okay am getting the following error...

    "ADMINISTRATOR.CATAGORY is an undefined name"
    In this code block on the .open statement

    Set oCommand = New ADODB.Command
    With oCommand
    .CommandType = adCmdText
    .ActiveConnection = oConnect
    .CommandText = "SELECT * FROM CATAGORY"
    End With

    Set oRecordset = New ADODB.Recordset
    oRecordset.Open oCommand, , adOpenStatic, adLockOptimistic
    txtId = oRecordset.Fields("ID")
    txtDescription = oRecordset.Fields("DESCRIPTION")
    The table is CATAGORY and the db connection appears to be working. This is my first attempt at db2 and vb6 for that matter so go easy.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    What is your schema? If you have used the default schema try qualifying the table like SELECT * FROM DB2ADMIN.CATEGORY

    You are the creator of your own destiny!

  3. #3
    Join Date
    Dec 2005
    Hey thanks guru worked like a charm For no apparent reason chose SQLJ (wasn't sure on which schema to use as am waiting on my IBM courses).

    Expect a few more newbie questions as l am used to the IBM u2 databases, this is all new to me.

    Once again thank you very much for your answer. This one is resolved, like a really resolved thing.

Posting Permissions

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