Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 697C7632947 for ; Sat, 10 Oct 2009 11:45:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 94907-07 for ; Sat, 10 Oct 2009 14:45:03 +0000 (UTC) X-Greylist: delayed 00:11:55.097572 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 E0B646328F9 for ; Sat, 10 Oct 2009 11:45:12 -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 snori-em-03.store (RZmta 22.1) with ESMTP id 20751el99FEGfs for ; Sat, 10 Oct 2009 16:33:15 +0200 (MEST) Received: (from httpd@localhost) by post.webmailer.de (8.13.7/8.13.6) id n9AEXEHN021287 for pgsql-odbc@postgresql.org; Sat, 10 Oct 2009 16:33:14 +0200 (MEST) Date: Sat, 10 Oct 2009 16:33:14 +0200 (MEST) Message-Id: <200910101433.n9AEXEHN021287@post.webmailer.de> To: pgsql-odbc@postgresql.org From: "Klaus Ummenhofer" Subject: 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/16 X-Sequence-Number: 10041 Hello community, I try to access a PostgreSql database with C# and have some problems creati= ng a TableAdapter. The problem is that a new TableAdapter does only create the SELECT command = but not the commands for UPDATE, INSERT and DELETE. I am using the ODBC dri= ver PSQLODBC30A.DLL 8.04.01.00, PostgreSql 8.4 and VS2005. I found some information affecting my problem which are related to primary = keys. So far I am aware of needing a primary key in order to generate these= commands. Please could someone inspect the CREATE scripts below which are = not working properly and let me know, how I should change them. What else could I do in order to use the database via a TableAdapter object= ? Thank you. Klaus 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 ); 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;