Article View: borland.public.interbase.sql
Article #647Insert using TIBDataset and InsertSQL
From: dkeene
Date: Thu, 18 Oct 2007 22:09
Date: Thu, 18 Oct 2007 22:09
21 lines
1459 bytes
1459 bytes
Hi, Folks I have used interbase with delphi for a while and I am stuck trying to insert a record in a table. MyTable contains a field MID which is a unique identifier generated by an appropriate trigger and generator. I am trying to insert a blank record using a TIBDataset. I have set the InsertSQL statement to INSERT INTO MyTable (MID) VALUES (GEN_ID(MyTable_GENERATOR, 1)) Then I open the dataset MyDataset.Open; MyDataset.Insert; MyDataset.Post; I get the error "Field MID must have a value" Can anyone suggest the proper way to insert a new record and link the Generated number to the field? Thank you Doug
Technical Details
Message-ID:
<4717d98a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,f2331f6236805a9,start X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "dkeene" <dk@mc.com> Newsgroups: borland.public.interbase.sql Subject: Insert using TIBDataset and InsertSQL Date: Thu, 18 Oct 2007 18:09:17 -0400 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 129.44.165.157 Message-ID: <4717d98a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1192745354 129.44.165.157 (18 Oct 2007 15:09:14 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail