🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
5 messages
5 total messages Started by Jan Mon, 22 Jan 2001 12:46
Query problem - > how to catch raw query results
#844
Author: Jan
Date: Mon, 22 Jan 2001 12:46
9 lines
1141 bytes
Hi there!

We do a query on a Sybase 6 .0 DB with the TQuery Component. Now we'd like
to display the result of the query in an Edit or Memo field. The only way we
saw is using a grid...:-((
So we need to know how to catch the "raw - result" of the query.
THX for helping me

Jan
Re: Query problem - > how to catch raw query results
#846
Author: nospam
Date: Tue, 23 Jan 2001 16:01
21 lines
1424 bytes
Jan,

You could use a bunch of TDBEdit objects on your form, but the TDBGrid 
component is easier and customizable.

John

Jan wrote:

> Hi there!
> 
> We do a query on a Sybase 6 .0 DB with the TQuery Component. Now we'd like
> to display the result of the query in an Edit or Memo field. The only way we
> saw is using a grid...:-((
> So we need to know how to catch the "raw - result" of the query.
> THX for helping me
> 
> Jan
> 
> 
> 
Re: Query problem - > how to catch raw query results
#850
Author: Mark Cashman
Date: Thu, 25 Jan 2001 04:42
14 lines
1420 bytes
Hi, Jan!

http://www.temporaldoorway.com/programming/cbuilder/basics/simpledbprogram.htm

shows a variety of data aware controls in use.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: Query problem - > how to catch raw query results
#852
Author: Jerry Bloomfield (TeamB)
Date: Fri, 26 Jan 2001 02:35
30 lines
1824 bytes
On Mon, 22 Jan 2001 12:46:25 -0000, "Jan" <J.Pielhau@alphasoft-gmbh.de>
wrote:

>We do a query on a Sybase 6 .0 DB with the TQuery Component. Now we'd like
>to display the result of the query in an Edit or Memo field. The only way we
>saw is using a grid...:-((
>So we need to know how to catch the "raw - result" of the query.
>THX for helping me

Are you asking for something like:

Query1->Open();

Query1->First();
while ( ! Query1->Eof ) 
{
    int f1 = Query1->FieldByName("FieldOne")->AsInteger;
	...

	Query1->Next();
}

Which will allow you to move through each row of the results set and access
the returned fields?

Jerry Bloomfield (TeamB)
-- 
http://www.teamb.com                                      JersWork@wwa.com
Please do *NOT* send private e-mail without prior permission (my anti-spam 
filters will probably just delete it anyway <g>)
Re: Query problem - > how to catch raw query results
#853
Author: Jan
Date: Fri, 26 Jan 2001 11:34
40 lines
2048 bytes
Yep, you're right, now everything workes fine with displaying query
results...

THX a lot,

Jan


Jerry Bloomfield (TeamB) schrieb in Nachricht ...
>On Mon, 22 Jan 2001 12:46:25 -0000, "Jan" <J.Pielhau@alphasoft-gmbh.de>
>wrote:
>
>>We do a query on a Sybase 6 .0 DB with the TQuery Component. Now we'd like
>>to display the result of the query in an Edit or Memo field. The only way
we
>>saw is using a grid...:-((
>>So we need to know how to catch the "raw - result" of the query.
>>THX for helping me
>
>Are you asking for something like:
>
>Query1->Open();
>
>Query1->First();
>while ( ! Query1->Eof )
>{
>    int f1 = Query1->FieldByName("FieldOne")->AsInteger;
> ...
>
> Query1->Next();
>}
>
>Which will allow you to move through each row of the results set and access
>the returned fields?
>
>Jerry Bloomfield (TeamB)
>--
>http://www.teamb.com                                      JersWork@wwa.com
>Please do *NOT* send private e-mail without prior permission (my anti-spam
>filters will probably just delete it anyway <g>)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads