BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how does one access "non field" values (datepart)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases
View previous topic :: View next topic  
Author Message
BeemerBiker
Guest





PostPosted: Tue Mar 29, 2005 1:06 am    Post subject: how does one access "non field" values (datepart) Reply with quote



select datepart("dd",MyDate) from table where ....

works just fine useing the database explorer. For a particular month I
can retrieve (for example)

COLUMN1
-------
2
3
5
24

showing me there are 4 days from that month in the database for that
particular year in the query.

problem is I cannot seem to cleanly get those results back into my C++
code, inspecting MySqlQuery-> showed me the fields, fieldnames and
values but i dont what those. I want the values that are listed under
"COLUMN1" ie: the 2,3,5 and 24 plus it would be nice to know there are
4 of them.

MySqlQuery->SQL = "select datepart(\"dd\",MyDate) from MyTable";
MySqlQuery->ExecSQL();
.....????....

where can i extract the fact that there are 4 items whose values are
2,3,5 and 24?? If worse comes to worse, I assume one can fetch each
record and pull out the "day" field, but I would think that the sql
query object would have those values somewhere already. Maybe not???


...thanks in advance..


Joseph "Beemer Biker" Stateson
http://ResearchRiders.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.