How to check the field's name & data type?

How to check the field's name & data type?

Post by bbq » Fri, 07 Sep 2001 16:56:24



If I use
select * from table1

how can I know rs(0) 's field name & data type?

 
 
 

How to check the field's name & data type?

Post by Vaughan Powel » Fri, 07 Sep 2001 17:56:44


rs.fields(0).Name
rs.fields(0).Type

See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado2...

for more properties

Regards

Vaughan Powell
MCDBA, MCSD, MCSE
Internet Database Architect

Keybright Services Ltd
<http://www.keybright.co.uk/>

'Databases for the Internet'

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. SQL Server 'Text' Data Type Field

text is slow...use varchar

text will always block off that amount of memory no matter how much text is
actually in the field, such as if you allocate 500 characters for the field
the text type always gives you 500 even if the field has 1 character in it

varchar will allocate 1 for 1 character, 2 for 2, etc.

Happy coding

David


2. ADO methods vs. plain SQL

3. Modify Field's Data Type with VB

4. Error START MSDTC

5. Change Fields' Data Type

6. Deadlocks Detected

7. type field ''money''

8. UK - Oracle & C skills needed - NOW. Northern Home Counties. EU Applicants welcome.

9. Data Type & field sizes

10. Change data type without no checking to the existing data

11. Money field type same as Currency data type??

12. Data Type transparent to the type of the table field

13. Return ResultSet Including Data, Column Name and Data Type