🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ADODataSet - CommandText missing

#2163
From: Mike
Date: Wed, 29 Oct 2003 18:48
36 lines
1914 bytes
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: <3fa00b93@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,9830a640977e1fdc,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-10-29 11:00:08 PST
From: "Mike" <mikeh@gmx.de>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADODataSet - CommandText missing
Date: Wed, 29 Oct 2003 19:48:48 +0100
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 217.88.152.24
Message-ID: <3fa00b93@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067453331 217.88.152.24 (29 Oct 2003 10:48:51 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail