pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Problem with C# TableAdapter 3+ messages / 2 participants [nested] [flat]
* Problem with C# TableAdapter @ 2009-10-10 14:33 Klaus Ummenhofer <info@deciphe-it.com> 2009-10-10 15:37 ` Re: Problem with C# TableAdapter Joshua D. Drake <jd@commandprompt.com> 0 siblings, 1 reply; 3+ messages in thread From: Klaus Ummenhofer @ 2009-10-10 14:33 UTC (permalink / raw) To: pgsql-odbc 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; ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Problem with C# TableAdapter 2009-10-10 14:33 Problem with C# TableAdapter Klaus Ummenhofer <info@deciphe-it.com> @ 2009-10-10 15:37 ` Joshua D. Drake <jd@commandprompt.com> 0 siblings, 0 replies; 3+ messages in thread From: Joshua D. Drake @ 2009-10-10 15:37 UTC (permalink / raw) To: Klaus Ummenhofer <info@deciphe-it.com>; +Cc: pgsql-odbc On Sat, 2009-10-10 at 16:33 +0200, Klaus Ummenhofer wrote: > Hello community, > > I try to access a PostgreSql database with C# and have some problems creating a TableAdapter. This doesn't answer your question, but why are you not using the .Net driver? Joshua D. Drake > > 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; > -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering If the world pushes look it in the eye and GRR. Then push back harder. - Salamander ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Problem with C# TableAdapter @ 2009-10-10 15:50 Klaus Ummenhofer <info@deciphe-it.com> 0 siblings, 0 replies; 3+ messages in thread From: Klaus Ummenhofer @ 2009-10-10 15:50 UTC (permalink / raw) To: pgsql-odbc AFAIK the NpgSQL .Net data provier does not support IDE integration but ODBC should. So it is more difficult to establish a strong typed database access. 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 things I wrote above. Klaus On Sat, 2009-10-10 at 16:33 +0200, Klaus Ummenhofer wrote: > Hello community, > > I try to access a PostgreSql database with C# and have some problems > creating a TableAdapter. This doesn't answer your question, but why are you not using the .Net driver? Joshua D. Drake > > 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; > -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering If the world pushes look it in the eye and GRR. Then push back harder. - Salamander -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.9/2427 - Release Date: 10/10/09 06:39:00 ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2009-10-10 15:50 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2009-10-10 14:33 Problem with C# TableAdapter Klaus Ummenhofer <info@deciphe-it.com> 2009-10-10 15:37 ` Joshua D. Drake <jd@commandprompt.com> 2009-10-10 15:50 Re: Problem with C# TableAdapter Klaus Ummenhofer <info@deciphe-it.com>
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