pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Klaus Ummenhofer <info@deciphe-it.com>
To: pgsql-odbc@postgresql.org
Subject: Problem with C# TableAdapter
Date: Sat, 10 Oct 2009 16:33:14 +0200 (MEST)
Message-ID: <200910101433.n9AEXEHN021287@post.webmailer.de> (raw)

Hello community,

I try to access a PostgreSql database with C# and have some problems creating 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 driver 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=FALSE
);
ALTER TABLE script OWNER TO postgres;



view thread (3+ messages)  latest in thread

Message-ID: <200910101433.n9AEXEHN021287@post.webmailer.de>
Permalink:  ../200910101433.n9AEXEHN021287@post.webmailer.de/
Also on:    postgresql.org/message-id/200910101433.n9AEXEHN021287@post.webmailer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: info@deciphe-it.com
  Subject: Re: Problem with C# TableAdapter
  In-Reply-To: <200910101433.n9AEXEHN021287@post.webmailer.de>
  References: <200910101433.n9AEXEHN021287@post.webmailer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox