Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1862
  • Last Modified:

error when connecting to DB2 data via IBM OLEDB using ASP.net

I'm trying to connect to new database called TEST10 through ASP.net and I'm getting the error: System.Data.OleDb.OleDbException: CLI0124E  Invalid argument value. SQLSTATE=HY009

The database I use to connect to was called TEST and that works without any errors.  Here is my web.config file.  The only change I made was calling the Data Source TEST_TMW10.  It was TEST_TMW.

from web.config....
            <add name="TEST_TMW" connectionString="Provider=IBMDADB2.DB2COPY1;Data Source=TEST_TMW10;Persist Security Info=True;Password=pppp;User ID=uuuu" providerName="System.Data.OleDb"/>

I have a Data Source in Windows ODBC called TEST_TMW10 and I can connect to it there using the connect button.

Any help would be greatly appreciated.

Thanks,
Steve Cross
Fairrington
0
fairrington
Asked:
fairrington
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi  fairrington,

Some simple things to check:

 - Is the database set up to answer connections? (Can you connect with other tools)?
 - Is the database name unique in your network? (Do you have identical production and test databases)?
 - Are you connecting with the database name or alias name?  (Life will be easier in the long run if you connect via the alias name.


Good Luck,
Kent
0
 
fairringtonAuthor Commented:
Thanks for responding to my question. This morning when I tried connecting it worked, so I'm not sure why it was giving me the error yesterday.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now