Click here to Skip to main content
15,903,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i would like to know if there any ways to count the column in table in vb6, because i'd try find it but i just can get the row counting and field count....

i'm using ADODB,mySQL and VB6...

another is, i'm using OPENSCHEMA method to get the column name, is there any other way than using OPENSCHEMA?
Posted

Unfortunately I don't have experience in ADODB, check these

Column Name from ADODB Recordset[^]
When you get column collection then you get the column count.
Counting the Number of Records in a Recordset^]

Nice suggestion : Go with .NET instead of playing with VB6.
 
Share this answer
 
Comments
_nurhan 13-Sep-13 5:14am    
thatraja, really thank you

i'd done using openschema method, and from there i'm just get the number of column from that...

i'm just curious why you ask me to use .NET instead of VB6...so far the difference between these two is syntax *so far i know only that. why u said it is nice suggestion?
thatraja 7-Oct-13 14:31pm    
VB6 & Classic ASP are old things. So I told you to go with better alternatives(.NET) which has more features. It's for your own good. If you want more details, let me know, I could give you more details.
 
Share this answer
 
load all data to datatable


int colmcount=datatable.Columns.Count;
 
Share this answer
 
Comments
thatraja 12-Sep-13 7:17am    
Obviously you're not a golfer - Jeff Lebowski

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900