GenerateDBDirectMethods not being generated

GenerateDBDirectMethods not being generated

Postby amcalister » Thu 12 May 2011 20:09

I am working in VS 2005 trying to add a table adapter with the Table Adapter Configuration Wizard. Everything works except that the Insert, Update and Delete methods are not being generated. I am doing a select statement from a single table. It looks like this:

SELECT _rid, created, person_type, address_type, isprimary, actnum, "name", address1, address2, city, "state", zip, geo_confidence, geo_latitude,
geo_longitude, agent_visibility, client_visible, status, owner_type, owner_id, verified, verified_by_type, verified_by_id, verified_datetime, "source",
notes, first_update_submitted, integration_id, _last_updated
FROM ars.actaddresses

This table does have a primary key (_rid).

I have tried every combination of the advanced options without success. This worked with version 4.55 of dotconnect but I had to upgrade to fix a Reporting Services issue and now I have this problem. Please advise.

Version of Postgres is 8.4
Version of dotConnect is 5.10.96.0.
Version of Visual Studio 2005 is 8.0.50727.762 (SP.050727-7600)
.NET Framework version is 2.0.50727 SP2
XP Professional version 2002 SP 3 (32 bit)

I am using the using the Professional version of dotConnect. The name of the download file is dcpostgres510pro.exe.
amcalister
 
Posts: 8
Joined: Tue 07 Dec 2010 00:04

Postby Shalex » Fri 13 May 2011 11:51

I cannot reproduce the problem at the moment. Here are the steps I have followed:
1) created new WinForms project;
2) drag&drop-ed the PgSqlDataTable component from Tools to the Form designer;
3) initialized its Connection property;
4) opened PgSqlDataTable Editor:
a) inputted select command in the Select Text tab ("select deptno, dname, "loc" from public.dept" in my case);
b) opened the Command Generator tab and pressed the Generate Commands button - the Insert, Update, and Delete commands were generated successfully.

Please correct my steps for reproducing and send us the corresponding DDL/DML script for your query.
Shalex
Devart Team
 
Posts: 7792
Joined: Thu 14 Aug 2008 12:44

Postby amcalister » Fri 13 May 2011 18:10

Create a table with this script

CREATE TABLE test.actfile_billing_data
(
_rid serial NOT NULL,
_last_updated timestamp without time zone,
actnum character(7) NOT NULL,
xmldata character varying NOT NULL DEFAULT ''::character varying,
CONSTRAINT actfile_billing_data_pkey PRIMARY KEY (actnum),
CONSTRAINT actfile_billing_data_actnum_fkey FOREIGN KEY (actnum)
REFERENCES ars.actfile (actnum) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT actfile_billing_data__rid_key UNIQUE (_rid)
)
WITH (
OIDS=FALSE
);
ALTER TABLE test.actfile_billing_data OWNER TO postgres;
GRANT ALL ON TABLE test.actfile_billing_data TO postgres;


In a VB Windows Application project create a new class of type DataSet. Open this DataSet in design mode. Right click and add a TableAdapter. Select all columns in above table. Access the Advance Options window and make sure that the "Generate Insert, Update and Delete statements" checkbox is check. Click on Next. The Create Methods checkbox is unchecked and greyed out.
amcalister
 
Posts: 8
Joined: Tue 07 Dec 2010 00:04

Postby Shalex » Mon 16 May 2011 14:54

We have reproduced the problem when the "Create methods to send updates directly to the database (GenerateDBDirectMethods)" checkbox is not active. We will investigate this issue and notify you about the results as soon as possible.

Generally, Microsoft's DataSet Editor is not adjusted to work with PostgreSQL, and it doesn't parse the PostgreSQL's specific keywords like "limit" or schema names before the table name (e.g., "postgres"."public"."mytable"). We recommend using our DataSet Wizard.
Shalex
Devart Team
 
Posts: 7792
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Thu 19 May 2011 11:07

The bug with generating Insert/Update/Delete commands via TableAdapter Configuration Wizard is fixed. I will post here when the corresponding build of dotConnect for PostgreSQL is available for download.
Shalex
Devart Team
 
Posts: 7792
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Thu 02 Jun 2011 11:51

New build of dotConnect for PostgreSQL 5.30.165 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21150 .
Shalex
Devart Team
 
Posts: 7792
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL