Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    Argentina
    Posts
    1

    Unanswered: 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

  2. #2
    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

    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

Posting Permissions

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