[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Query with variable fields

Teotti Enrico

1/15/2003 5:18:00 PM

Hi,
if I had a query and I don't know how many fields are in
my SELECT clause, could I retrieve them?
An example is a query defined as SELECT c1, c2, c3 ... but
it may be defined also as SELECT c1, c2, c3, c4 ...
Could I know (with an ODBCDataReader) how many fields are
in my query after have execute it?
Thanks in advance,
Enrico
2 Answers

(Hussein Abuthuraya(MSFT))

1/15/2003 10:45:00 PM

0

The ODBCDataReader has a property called FieldCount should give you the number of columns per row. That number should correspond to the number of columns in your
select query. Is that what you were looking for or have I missed something in your question?



Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.co....


Teotti Enrico

1/16/2003 9:42:00 AM

0

That is exactly what I was looking for. Thanks for your
help Hussein.
Have a nice day,
Enrico

>-----Original Message-----
>The ODBCDataReader has a property called FieldCount should
give you the number of columns per row. That number should
correspond to the number of columns in your
>select query. Is that what you were looking for or have I
missed something in your question?
>
>
>
>Thanks,
>Hussein Abuthuraya
>Microsoft Developer Support
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>Are you secure? For information about the Microsoft
Strategic Technology Protection Program and to order your
FREE Security Tool Kit, please visit
>http://www.microsoft.co....
>
>
>.
>