Home > SQL Development > r.GetSchemaTable

r.GetSchemaTable



<i><b>Originally posted by : jeorg (jeorg@inbox.as)</b></i><br />I cannot get the columns names without doing a select before and then a<br />Dim drc As DataRowCollection = r.GetSchemaTable().Rows<br /><br />does someone knows if it is possible something like<br />r.GetSchemaTable(name_of_my_table).columnName<br /><br />without any select before ? <br />I find it strange not to have a method to do it

    
Guest


in ADO you may query the catalog without a select. If you don't like it open an empty recordset:

SELECT * FROM MyTable WHERE 1 = 2

r.Fields(index).name gives you the field name

(or for...each, as well)

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved