Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 256E2632746 for ; Sat, 10 Oct 2009 12:50:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91594-01 for ; Sat, 10 Oct 2009 15:50:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from em-p00-ob.rzone.de (em-p00-ob.rzone.de [81.169.146.224]) by mail.postgresql.org (Postfix) with ESMTP id D1331632C5C for ; Sat, 10 Oct 2009 12:50:46 -0300 (ADT) X-RZG-AUTH: :JWICemCsfvxZCRVKIHsCviXB94MHrk+ZID/A75+ipJ0MMLCdCZjn5w== X-RZG-CLASS-ID: em00 Received: from post.webmailer.de (bel.store [192.168.41.68]) by scum-em-01.store (RZmta 22.1) with ESMTP id a067aal99IshWo for ; Sat, 10 Oct 2009 17:50:45 +0200 (MEST) Received: (from httpd@localhost) by post.webmailer.de (8.13.7/8.13.6) id n9AFojeK026598 for pgsql-odbc@postgresql.org; Sat, 10 Oct 2009 17:50:45 +0200 (MEST) Date: Sat, 10 Oct 2009 17:50:45 +0200 (MEST) Message-Id: <200910101550.n9AFojeK026598@post.webmailer.de> To: pgsql-odbc@postgresql.org From: "Klaus Ummenhofer" Subject: Re: Problem with C# TableAdapter X-Priority: 3 X-Abuse: 251614 / 217.238.11.59 X-RZG-MBID: 0AA/Rra2jHxjlOSRd/sZWLXwBnBId5VWmsbqBRxLzQ== MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/18 X-Sequence-Number: 10043 AFAIK the NpgSQL .Net data provier does not support IDE integration but ODB= C should. So it is more difficult to establish a strong typed database acce= ss. But indeed some third party .Net data providers support IDE integration= . They may be an option for me. Please correct me if I am wrong with the th= ings I wrote above. Klaus On Sat, 2009-10-10 at 16:33 +0200, Klaus Ummenhofer wrote: > Hello community, >=20 > I try to access a PostgreSql database with C# and have some problems=20 > creating a TableAdapter. This doesn't answer your question, but why are you not using the .Net drive= r? Joshua D. Drake >=20 > The problem is that a new TableAdapter does only create the SELECT=20 > command but not the commands for UPDATE, INSERT and DELETE. I am using=20 > the ODBC driver PSQLODBC30A.DLL 8.04.01.00, PostgreSql 8.4 and VS2005. >=20 > I found some information affecting my problem which are related to=20 > primary keys. So far I am aware of needing a primary key in order to=20 > generate these commands. Please could someone inspect the CREATE=20 > scripts below which are not working properly and let me know, how I=20 > should change them. >=20 > What else could I do in order to use the database via a TableAdapter=20 > object? >=20 > Thank you. >=20 > Klaus >=20 > CREATE TABLE films ( > code char(5) CONSTRAINT firstkey PRIMARY KEY, > title varchar(40) NOT NULL, > did integer NOT NULL, > date_prod date, > kind varchar(10), > len interval hour to minute > ); >=20 >=20 > CREATE TABLE script > ( > id serial NOT NULL, > "name" character varying(10) NOT NULL, > script_data text, > CONSTRAINT script_pk PRIMARY KEY (id) > ) > WITH ( > OIDS=3DFALSE > ); > ALTER TABLE script OWNER TO postgres; >=20 --=20 PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consultin= g, Training, Support, Custom Development, Engineering If the world pushes l= ook it in the eye and GRR. Then push back harder. - Salamander --=20 Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pg= sql-odbc No virus found in this incoming message. Checked by AVG - www.avg.com=20 Version: 8.5.421 / Virus Database: 270.14.9/2427 - Release Date: 10/10/09 0= 6:39:00