Article View: borland.public.cppbuilder.database.ado
Article #1445Re: SQL Functions through ADO
From: Heinz Ketchup
Date: Sun, 13 Jun 2004 21:42
Date: Sun, 13 Jun 2004 21:42
70 lines
3074 bytes
3074 bytes
Thanks a lot V.V.
It worked perfectly!
Heinz
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:40c98277$1@newsgroups.borland.com...
> Return data into ADODataSet and get result as
>
> ADODataSet1->Fields[0]->Value (or AsInteger).
>
> Do not connect this ADODataSet to DBGrid.
>
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
> "Heinz Ketchup" <heinz_like_the_ketchup@n0spam.h0tmail.c0m>
�������/��������
> � �������� ���������: news:40c90d84$1@newsgroups.borland.com...
> > Thanks everyone for your help!
> > I have definitely learned quite a bit.
> >
> > Is it possible to make use of SQL Functions?
> > Min / Max / Sum / Count / Average?
> >
> > Whenever you make a call (ExecSQL / Open)
> > It returns Data usually to a DBGrid / Table
> > What if we just want to message box the results?
> > or
> > Store it in a variable for something else?
> >
> > Should I even consider trying to use a TDecisionCube?
> > It appears to make use of some of the SQL Functions
> > I need.
> > Min / Max / Sum / Count / Average.
> >
> > <example of some of the things I've tried / didn't work>
> > SELECT COUNT(*)
> > FROM TableName
> > INTO :COUNTERVARIABLE
> >
> > SomeVariant = ....->ParamByName("COUNTERVARIABLE")->Value;
> >
> > Anything to assign a value to a variable would be really nice.
> > I can always do it the hardway, which is to code in functions, but that
> > defeats the purpose of SQL Functions.
> >
> > PS: The only one that currently works in respect to COUNT
is ->RecordCount
> > (But that is only after a Dataset has been opened on a query)
> >
> > Hopefully, these are all the questions I'll need to ask.
> > ***Hopefully***
> >
> >
> > Thanks for the help everyone.
> > It really has been great.
> >
> > Heinz
> >
> >
>
>
Technical Details
Message-ID:
<40ccca38$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40c90d84$1@newsgroups.borland.com> <40c98277$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,169627c1f4340994 X-Google-Attributes: gid10698b,public From: "Heinz Ketchup" <heinz_like_the_ketchup@n0spam.h0tmail.c0m> Newsgroups: borland.public.cppbuilder.database.ado References: <40c90d84$1@newsgroups.borland.com> <40c98277$1@newsgroups.borland.com> Subject: Re: SQL Functions through ADO Date: Sun, 13 Jun 2004 15:42:17 -0600 Lines: 72 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 209.89.134.140 Message-ID: <40ccca38$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087162936 209.89.134.140 (13 Jun 2004 14:42:16 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail