Frustration on creating TableAdapter using CoreLab PostgreSQLDirect for .Net
Frustration on creating TableAdapter using CoreLab PostgreSQLDirect for .Net
I recently upgrade from Visual Studio 2003 to VS 2005 SP1 and upgrade the CoreLab PostgreSQLDirect provider to version 2.55.25 for VS2005. I find a very frustration problem:
Whenever I drag the table object from the Server Explorer in VS2005's dataset form, I receive the following message:
Failed to merge object(s).
Index was outside the bounds of the array..
The workaround method is to remove all primary keys and foreign keys from the PostgreSQL database. It should be fine if there are not too many tables in the database. This is annoying if I have many tables in the database. Can anyone here provide me better solution?
I am using PostgreSQL database version 7.4.17 running on Linux platform.
Thanks.
Whenever I drag the table object from the Server Explorer in VS2005's dataset form, I receive the following message:
Failed to merge object(s).
Index was outside the bounds of the array..
The workaround method is to remove all primary keys and foreign keys from the PostgreSQL database. It should be fine if there are not too many tables in the database. This is annoying if I have many tables in the database. Can anyone here provide me better solution?
I am using PostgreSQL database version 7.4.17 running on Linux platform.
Thanks.
This problem doesn't seem to be OS-related. I can't reproduce it on using PostgreSQL on Windows. Does same happen with fresh solution and fresh dataset?
Did you use default installation options of PostgreSQLDirect .NET?
Try to reinstall PostgreSQLDirect .NET.
Try to debug the error using another instance of VS IDE.
Did you use default installation options of PostgreSQLDirect .NET?
Try to reinstall PostgreSQLDirect .NET.
Try to debug the error using another instance of VS IDE.
I use the default installation options of PostgreSQLDirect .NET
I re-install PostgreSQLDirect .NET but does not help.
I created a new solution, a new dataset in VS2005. Then I created 2 new tables, table1 and table2 in PostgreSQL database. Table1 had a primary key and table2 had a foreign key reference to a column in table1. I found the following scenario:
1. If I dragged table1 from Server Explorer to the dataset, the table adapter for table1 was created without any errors. Then I put table2, the process failed and returned the error I mentioned.
2. Then I removed table1 table adapter from step 1 and dragged table2 first. It worked for table2. But when I dragged table1 to the dataset, it came up with the same error.
3. I removed table2 from step 2. Then I highlighted table1 and table2 from Server Explorer at same time and dragged them onto the dataset. It worked this time but no relationship was created. After I tried to drag a new table table3 on to the dataset which contained table1 and table2 table adapters, the same error displayed again. Note that table3 was an independent table.
4. At last, I installed PostgreSQL version 8.2.4 for Windows on my PC and repeat above steps, they all work well without any errors.
It looks like there is a bug in CoreLab PostgreSQLDirect for VS2005 when accessing the previous version of PostgreSQL database. I do not have this problem when I use VS2003 with CoreLab PostgreSQLDirect version 2.55.25.
I also tried your latest CoreLab PostgreSQLDirect version 3.0 trial, I got the same problem.
What version of PostgreSQL database do you use?
Any other ideas to resolve this problem?
I re-install PostgreSQLDirect .NET but does not help.
I created a new solution, a new dataset in VS2005. Then I created 2 new tables, table1 and table2 in PostgreSQL database. Table1 had a primary key and table2 had a foreign key reference to a column in table1. I found the following scenario:
1. If I dragged table1 from Server Explorer to the dataset, the table adapter for table1 was created without any errors. Then I put table2, the process failed and returned the error I mentioned.
2. Then I removed table1 table adapter from step 1 and dragged table2 first. It worked for table2. But when I dragged table1 to the dataset, it came up with the same error.
3. I removed table2 from step 2. Then I highlighted table1 and table2 from Server Explorer at same time and dragged them onto the dataset. It worked this time but no relationship was created. After I tried to drag a new table table3 on to the dataset which contained table1 and table2 table adapters, the same error displayed again. Note that table3 was an independent table.
4. At last, I installed PostgreSQL version 8.2.4 for Windows on my PC and repeat above steps, they all work well without any errors.
It looks like there is a bug in CoreLab PostgreSQLDirect for VS2005 when accessing the previous version of PostgreSQL database. I do not have this problem when I use VS2003 with CoreLab PostgreSQLDirect version 2.55.25.
I also tried your latest CoreLab PostgreSQLDirect version 3.0 trial, I got the same problem.
What version of PostgreSQL database do you use?
Any other ideas to resolve this problem?
We are working on providing a solution. Please wait a bit.Would you please tell me how long do you take to fix this problem?
Does this happen with PostgreSQL 7.x only?it does not create the insert, update and delete command automatically.
Insert command should be created in any case. Update and delete commands are to be created only if the table has a primary key. Please check this carefully.
This problem happens on PostgreSQL 7.x only.Alexey wrote:We are working on providing a solution. Please wait a bit.Would you please tell me how long do you take to fix this problem?Does this happen with PostgreSQL 7.x only?it does not create the insert, update and delete command automatically.
Insert command should be created in any case. Update and delete commands are to be created only if the table has a primary key. Please check this carefully.
If the table hasn't got primary key, it only generates SELECT command. I can only test the table without primary key because if there is a primary key, it fails to create the TableAdapter at all.
Albert
Unfortunately, I cannot reproduce this problem. Please provide me with your database objects definitions.If the table hasn't got primary key, it only generates SELECT command. I can only test the table without primary key because if there is a primary key, it fails to create the TableAdapter at all.
Sorry, I just find other problems.
1. The table adapter can be created only for the first table drag from Server Explore. The second table will generate the same error as mentioned, no matter the table has the relationship to the first table or not. It seems 2.55.27 build allow me to create one table adapter in one dataset only.
2. I can create more than one table adapters at a time. The trick is to select many table objects from Server Explorer and drag them to the dataset. Unfortunately, once those table adapters are created, I cannot create any other table adapters after.
3. The other problem is that the provider does not generate update and delete command in the table adapter even there is a primary key on the table.
Any ideas to resolve these problems?
1. The table adapter can be created only for the first table drag from Server Explore. The second table will generate the same error as mentioned, no matter the table has the relationship to the first table or not. It seems 2.55.27 build allow me to create one table adapter in one dataset only.
2. I can create more than one table adapters at a time. The trick is to select many table objects from Server Explorer and drag them to the dataset. Unfortunately, once those table adapters are created, I cannot create any other table adapters after.
3. The other problem is that the provider does not generate update and delete command in the table adapter even there is a primary key on the table.
Any ideas to resolve these problems?