Article View: borland.public.cppbuilder.database.ado
Article #2176Re: How do I submit an SQL statement to an Access database using code?
From: Ted Byers
Date: Fri, 31 Oct 2003 20:06
Date: Fri, 31 Oct 2003 20:06
33 lines
2048 bytes
2048 bytes
Thanks,
This is greatly appreciated.
What exactly is the purpose of statements like:
> cat = null;
> conn = null;
I assume they're equivalent to:
// assuming Variant cat,comm;
// & assuming cat and conn are initialized as in our example code
cat = null;
conn = null;
Do you have an example of the SQL required to update a pair of tables
related to each other through an autoincremented index field like the two
shown in your example? For example, suppose I have the following
(deliberately using variable names matching the coresponding fields in the
two tables):
AnsiString Name("carrot"), col2(something else);
What would be the SQL statement to place the values held by these two
variables into the two tables in the database, while ensuring that the value
"carrot" is not duplicated in the table called JUNK?
Is there also a "ADODB.RecordSet"? If so, how does one determine if it is
empty, and how does one get the values for a given field using it when it is
not empty, and how does one iterate through it's records?
Thanks again,
Ted
Technical Details
Message-ID:
<3fa2c14e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fa29d35$1@newsgroups.borland.com> <3fa2b26b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,d26ef4716ff1429f X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-10-31 12:09:37 PST From: "Ted Byers" <r.ted.byers@sympatico.ca> Newsgroups: borland.public.cppbuilder.database.ado References: <3fa29d35$1@newsgroups.borland.com> <3fa2b26b@newsgroups.borland.com> Subject: Re: How do I submit an SQL statement to an Access database using code? Date: Fri, 31 Oct 2003 15:06:02 -0500 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 65.95.126.104 Message-ID: <3fa2c14e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067630926 65.95.126.104 (31 Oct 2003 12:08:46 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail