Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, how can i get datatype of certain table?

i use openschema(adschemaprovidertypes) like this;

getGetColumnDataType(j) = ClmnsTypeRecordset("TYPE_NAME")

but, i get only transact SQL here, before this i'm using;

getGetColumnDataType(j) = ClmnsTypeRecordset("Data_type")

but, it show some integer, such as 20, 3, and 21 and i dont know why

the result that i need is to get datatype like;

varChar(), int, Date *just like the one when create table in mysql

can anyone explain me why and how to get like VARCHAR, INT, DATE from vb6?
as i searching why, it seems that vb datatype is differentt with SQL server datatype, so how can i make it same as the one i want?

Thank you,
_nurhan
Posted

1 solution

http://www.dreamincode.net/forums/topic/179599-data-type/[^]

this is what i got. using the
VB
Set ClmnsTypeRecordset= Connection.OpenSchema(adSchemaProviderTypes)
getGetColumnDataType(j) = ClmnsTypeRecordset("Data_type")

the datatype shows in numeric. up until now, i dont know how to get the datatype in form of string, e.g : VARCHAR, INT, DATE
 
Share this answer
 
v2
Comments
CHill60 20-Sep-13 8:09am    
You need to use the Improve Question link next to your question to put this extra information into the question, then delete this "Solution". Your post is not appearing in the list of unanswered questions at the moment

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