Article View: borland.public.cppbuilder.database.ado
Article #3811How to INSERT a record ?
From: Uros Obradovic
Date: Fri, 31 May 2002 02:37
Date: Fri, 31 May 2002 02:37
24 lines
1537 bytes
1537 bytes
Hi guys,
I have a DBEdit control on my form. Now I want to add a new record on button
click. This is the part of the code
PersonSet->Insert();
PersonSet->FieldByName("LName")->AsString = LName->Field->AsString;
PersonSet->Post();
it seems like caching it, it adds and everything, but when I close my
program, nothing is uploaded to the database, there is no new records.
I tried adding the following line
PersonSet->ApplyUpdates(-1);
but I'm getting an error that transcation is not enabled.
What should I do ? Please help
Uros
Win 2000
BCB 6.0
MySQL
Technical Details
Message-ID:
<3cf6e3b6$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,b17a44cc11f5a56c,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-05-30 20:10:08 PST Reply-To: "Uros Obradovic" <ouros@hotmail.com> From: "Uros Obradovic" <ouros@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: How to INSERT a record ? Date: Thu, 30 May 2002 19:37:40 -0700 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 134.71.141.37 Message-ID: <3cf6e3b6$1_2@dnews> X-Trace: dnews 1022813110 134.71.141.37 (30 May 2002 19:45:10 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews