I set up a Data Connection to our database in the Server Explorer in Visual Studio 2010, using “IBM DB2 and IDS Data Provider for .NET”. From there, I can see the tables, views, and stored procedures. This looks correct. I then created an edmx file, and attempted to update the model from the database. This gives me the screen with the data objects, but if I select something and try to add it to the model , it fails, and I get this error:
Unable to generate the model because of the following exception: 'An error occurred while executing the command definition. See the inner exception for details.
ERROR 42703 IBMAS SQL0206N "SYSTEM_CONSTRAINT_SCHEMA" is not valid in the context where it is used.
Here’s the output from testconn40:
c:\temp\vsai\VSAI>testconn40 "database=usalid08;User ID=xxx;password=xxx;Server= usalid08:446 " Step 1: Printing version info .NET Framework version: 4.0.30319.239 64-bit DB2 .NET provider version: 188.8.131.52 DB2 .NET file version: 184.108.40.206 Capability bits: ALLDEFINED Build: 20111018 Factory for invariant name IBM.Data.DB2 verified Factory for invariant name IBM.Data.Informix verified IBM.Data.Informix from DbFactory is the Common Informix .NET provider Elapsed: 5.811 Step 2: Validating db2dsdriver.cfg against db2dsdriver.xsd schema file C:\ProgramData\IBM\DB2\IBMDBCL1\cfg\db2dsdriver.cfg against C:\Program F iles\IBM\IBM DATA SERVER DRIVER\cfg\db2dsdriver.xsd Elapsed: 0.206 Step 3: Connecting using "database=usalid08;User ID=xxx;password=xxx;Server=usal id08:446 " Server type and version: AS/400 06.01.0000 Elapsed: 2.364 Step 4: Selecting rows from QSYS2.SYSTABLES to validate existence of packages SELECT * FROM QSYS2.SYSTABLES FETCH FIRST 5 rows only Elapsed: 0.609 Step 5: Calling GetSchema for tables to validate existence of schema functions Elapsed: 29.991 Test passed.
I figure it's got to be a configuration issue, but I'm new to this driver, so any help would be appreciated!