🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2164

Re: ADODataSet - CommandText missing

#2164
From: Palmetzhofer Dietmar
Date: Thu, 30 Oct 2003 10:20
47 lines
2384 bytes
Where does the error appear?  When opening the DataSet or when calling
Insert()?
Did you think of using TADOTable or TADOCommand?
Greetings,
Didi

"Mike" <mikeh@gmx.de> schrieb im Newsbeitrag
news:3fa00b93@newsgroups.borland.com...
> Hello,
>
> I use the ADODatSet component to build a connection using jet driver to a
> access file. this works fine. no i like to insert new data to the acces
db.
> here is my code:
>
> try
> {
> ADODataSet->Open();
> ADODataSet->Insert();
>
> // insert data
> ADODataSet->FieldByName("Contacname")->AsString = delivery_name;
> ADODataSet->FieldByName("Company")->AsString = delivery_company;
> ADODataSet->FieldByName("Adress")->AsString = delivery_street_address;
> ADODataSet->FieldByName("City")->AsString = delivery_city;
> ADODataSet->FieldByName("ZIP")->AsString = delivery_postcode;
> ADODataSet->FieldByName("State")->AsString = delivery_state;
> ADODataSet->FieldByName("Country")->AsString = delivery_state;
>
> ADODataSet->Post();
> ADODataSet->Close();
> }
> catch(...)
> {
> Beep();
> ShowMessage("Error");
> }
>
> Whe i run that code, there always is an error message that CommandText
> missing. But I have no sql code and do not know, why i need CommanText and
> do not know what to put there.
>
> Any ideas. Can anybody help me?
>
> Mike
>
>
Technical Details
Message-ID: <3fa0e4f5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fa00b93@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,9830a640977e1fdc
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-10-30 02:39:19 PST
Reply-To: "Palmetzhofer Dietmar" <dietmar.palmetzhofer@boku.ac.at>
From: "Palmetzhofer Dietmar" <dietmar.palmetzhofer@boku.ac.at>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3fa00b93@newsgroups.borland.com>
Subject: Re: ADODataSet - CommandText missing
Date: Thu, 30 Oct 2003 11:20:35 +0100
Lines: 49
Organization: Univ. f. Bodenkultur
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 62.46.233.33
Message-ID: <3fa0e4f5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067508981 62.46.233.33 (30 Oct 2003 02:16:21 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail