If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Help newbie error vb6 connect to db2 8.2 Express

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-05, 23:52
SoCalled SoCalled is offline
Registered User
 
Join Date: Dec 2005
Posts: 8
Question Help newbie error vb6 connect to db2 8.2 Express

Okay am getting the following error...

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

Quote:
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.
Reply With Quote
  #2 (permalink)  
Old 12-03-05, 07:16
db2guru1 db2guru1 is offline
Registered User
 
Join Date: Aug 2003
Posts: 106
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!
Reply With Quote
  #3 (permalink)  
Old 12-03-05, 17:50
SoCalled SoCalled is offline
Registered User
 
Join Date: Dec 2005
Posts: 8
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On