Page 1 of 1

GetValueOrDefault() missing after second configure

Posted: Fri 20 Mar 2015 07:42
by CNPSV
Hello. I use Visual Studio Professional 2013 with dotConnect for PostgreSql 7.3.359. I have this simple table:

Code: Select all

CREATE TABLE test
(
  id serial NOT NULL,
  name character varying(200) NOT NULL,
  data date NOT NULL,
  present boolean NOT NULL DEFAULT false,
  CONSTRAINT test_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE test
  OWNER TO postgres;
In VS I have a DataSet with a TableAdapter with a Fill and GetData:

Code: Select all

SELECT id, "name", "data", present FROM "public".test


Click the TableAdapter - Add Query - Use SQL statements - Select which returns a single value - Next -

Code: Select all

SELECT present FROM test where id=:id
- Next - Finish.

Now I can do:

Code: Select all

var taAdapter = new testTableAdapter();
var valueTest1 = taAdapter.GetPresent(2).GetValueOrDefault();
//GetPresent(2) returns ?bool


Now, if I go to the TableAdapter and reconfigure the SQL statement without modifying anything the GetPresent(2) returns object and thus I can't use GetValueOrDefault();

Am I doing something wrong or is this a little bug?

Thanks.

Re: GetValueOrDefault() missing after second configure

Posted: Tue 24 Mar 2015 13:10
by Pinturiccio
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Re: GetValueOrDefault() missing after second configure

Posted: Mon 06 Apr 2015 15:07
by Pinturiccio
We have investigated the issue. We think that this issue is not related to our product. After creating the dataset, you edit it with Microsoft "Automatic Editor Selector (XML)". When creating an editing a dataset with Microsoft wizard and editor, our product only passes metadata, and Microsoft tools do the rest.

We recommend you contact Microsoft support.