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 > Querying DB2 from C# and Ole db, packages problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-10-03, 12:54
Gnacio Gnacio is offline
Registered User
 
Join Date: Nov 2003
Location: Argentina
Posts: 1
Querying DB2 from C# and Ole db, packages problems

Hi all, this is my first post and I am a newbie in BD2 matters. Hope you can help.
I am connecting to a DB2 7 database on Win2000 from a C# application using the Ole DB provider from Microsoft. I can connect alright but when I make a SELECT query I get this error
"A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State. SQLSTATE: 51002, SQLCODE: -805"
From what I've read it means that it cannot create some sort of packages when I run the qery.
My question is, what are these packages and why do I need them? It seems that I have to create them in the server but how?
My connection string is:
String myConnectionString = "Provider=DB2OLEDB;Network Transport Library=TCPIP; Network Address=xxx.xxx.xxx.xxx; Network Port=50000;Initial Catalog=MUSIC;Package Collection=SYSCAT;Default Schema='';User ID=xxx;Password=xxx"

Any clues?
Thank you
Reply With Quote
  #2 (permalink)  
Old 11-11-03, 04:15
jsander jsander is offline
Registered User
 
Join Date: Apr 2003
Posts: 191
Re: Querying DB2 from C# and Ole db, packages problems

Hi,

packages are database specific libraries. Lots of applications make use of these.

Most of the time, when you use high level programming tools, they know what packages to create. In order to make them work with DB2, it is easiest to connect to DB2 with database administrators privileges. Then have the tools work, and they should create the packages for you.

Anyway, you should read up on packages so you know about when your software needs another creation run.

Johann

Quote:
Originally posted by Gnacio
Hi all, this is my first post and I am a newbie in BD2 matters. Hope you can help.
I am connecting to a DB2 7 database on Win2000 from a C# application using the Ole DB provider from Microsoft. I can connect alright but when I make a SELECT query I get this error
"A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State. SQLSTATE: 51002, SQLCODE: -805"
From what I've read it means that it cannot create some sort of packages when I run the qery.
My question is, what are these packages and why do I need them? It seems that I have to create them in the server but how?
My connection string is:
String myConnectionString = "Provider=DB2OLEDB;Network Transport Library=TCPIP; Network Address=xxx.xxx.xxx.xxx; Network Port=50000;Initial Catalog=MUSIC;Package Collection=SYSCAT;Default Schema='';User ID=xxx;Password=xxx"

Any clues?
Thank you
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