从vb6获取mysql中每个表的数据类型 [英] get datatype for each table in mysql from vb6
问题描述
我如何获得某些桌子的数据类型?
i使用openschema(adschemaprovidertypes)这样的;
getGetColumnDataType(j)= ClmnsTypeRecordset(TYPE_NAME)
但是,我这里只得到交易SQL,在此之前我'正在使用;
getGetColumnDataType(j)= ClmnsTypeRecordset(Data_type)
但是,它会显示一些整数,例如20,3和21,我不知道为什么
我需要的结果是得到数据类型;
varChar(),int,Date *就像在mysql中创建表时的那个
任何人都可以解释我为什么以及如何从vb6获得VARCHAR,INT,DATE?
因为我搜索为什么,似乎vb数据类型与SQL服务器数据类型不同,所以我怎么能使它相同我想要的那个?
谢谢你,
_nurhan
http://www.dreamincode.net/forums/topic/179599-data-输入/ [ ^ ]
这就是我得到的。使用
设置 ClmnsTypeRecordset = Connection.OpenSchema(adSchemaProviderTypes)
getGetColumnDataType(j)= ClmnsTypeRecordset( Data_type)
the数据类型以数字显示。到目前为止,我不知道如何以字符串的形式获取数据类型,例如:VARCHAR,INT,DATE
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
http://www.dreamincode.net/forums/topic/179599-data-type/[^]
this is what i got. using the
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
这篇关于从vb6获取mysql中每个表的数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!