TableAdapter Issues with .NET 2.0 and PostgreSQL Direct .NET 2.50.21

TableAdapter Issues with .NET 2.0 and PostgreSQL Direct .NET 2.50.21

Postby AaronTaylor » Tue 21 Nov 2006 19:34

Also I am using PostgreSQL version 7.3.4 residing on a Linux server.

The issues are many. First and foremost, I have a very simple single table lookup that is used, specifically for lookups. It consist of a few fields. SQL below.

Code: Select all
-- Table: pin

-- DROP TABLE pin;

CREATE TABLE pin
(
  pinid int4 NOT NULL DEFAULT nextval('pin_pinid_seq'::text),
  date date NOT NULL DEFAULT '0001-01-01',
  pin varchar(25) NOT NULL,
  identity text,
  CONSTRAINT pin_pkey PRIMARY KEY (pinid)
)
WITH OIDS;
ALTER TABLE pin OWNER TO lookup;


-- Index: pin_idx

-- DROP INDEX pin_idx;

CREATE INDEX pin_idx
  ON pin
  USING btree
  (pin);


As you can see, very simple. pinid is our primary key.

The first issue is that when I create a new table adapter in Visual Studio it does not create the UPDATE or DELETE codes which would be correct if we did not have a Primary Key. We do, however, so this is not the correct behavior. I have added and removed and re-configured the adapter many times and the required methods are not created. The only clue is that when I tell the TableAdapter and Dataset to make INSERT/UPDATE/DELETE commands I get this unusual error:

Configure TableAdapter Pin failed:

ERROR: Attribute "indnatts" not found.

------------------------

As frustrating as this is, I am able to get around the issue by actually overriding and creating the UPDATE and DELETE commands in a partial class just as if the designer would have created them. The code is not at all difficult. However, in the main class for this TableAdapter the UPDATE (not DELETE) command is created in 4 versions, all of which return a NULL tableAdapter. Very strange indeed.

Now, having gotten past this issue by creating my own overrides, one issue remains. Whenever I go to UPDATE a record on the PIN table, my UPDATE works with the exception of changing the pin to a new pin (note, I did not say pinid to a new pinid as this is the primary key. Pin is not.)

When I check my code, it is because although the tableAdapters RowState is Update for changing any other field, when I want to update the users pin to a new pin, the RowState is Added, not Update. This only occurs for updating PIN, no other field.

Admittedly I am not an experienced PostgreSQL user, however, the TableAdpater side of things, should know that updating a pin from one value to another is an UPDATE, not a new ROW.

Is there anyone that can help with any of these issues? Any ideas? For now I am making more and more kludgey code to fix this CoreLabs adapter which does not at all seem to be complete or fully working.

Thanks,

Aaron Taylor
Software Engineer V
AaronTaylor
 
Posts: 4
Joined: Tue 21 Nov 2006 19:17

Postby Alexey » Wed 22 Nov 2006 09:52

We are investigating this problem.
You will be notified on results as soon as possible.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby AaronTaylor » Wed 22 Nov 2006 13:13

Is there any possibility of a time frame. I have a very serious release that is in high risk due to this issue and I would love to provide a time frame to management.

Of note, your prior versions of the product when working with .NET 1.1 did not have so many issues. This was only noticed when upgrading our own product from .NET 1.1 to 2.0 and requiring the latest version of PostgreSQLDirect.

Thank you,

Aaron Taylor
AaronTaylor
 
Posts: 4
Joined: Tue 21 Nov 2006 19:17

Postby Alexey » Thu 23 Nov 2006 07:57

The issue is marked as fixed in our bug tracking system. We need to ensure it is indeed fixed. Then we will upload new build on our site. Please wait a bit.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby AaronTaylor » Fri 24 Nov 2006 18:16

Hello Alexey,

Thank you for your reply. We are in desperate need for this fix, and while I am personally patient, my management is less so. Is there any chance we can help BETA test this fix for you as well? I don't mind one bit to make sure it is cleared out.

Thank you very much,

Aaron
AaronTaylor
 
Posts: 4
Joined: Tue 21 Nov 2006 19:17

Postby Alexey » Tue 28 Nov 2006 08:52

New build is available for download now!
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby AaronTaylor » Tue 05 Dec 2006 16:13

Thank you Alexey, but all the versions I can reach for download are apparently Trial Versions of PostgreSQLDirect .NET Data Provider version 2.50.22. I need the actual full product. I have a license (or rather we do as a company.) Is there a place to download the full product?
AaronTaylor
 
Posts: 4
Joined: Tue 21 Nov 2006 19:17

Postby Alexey » Tue 05 Dec 2006 16:27

You should download one from the registered users area.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for PostgreSQL