hey guys i really can't solve this problem, hope you can help me.

the problem is, i use this codes to get the data type of a column from an access database

Form12.ListView1.Items(j).SubItems.Add(myData.Rows(i)!DATA_TYPE)

but what displays in my listview are numbers like (130 , 3 so on..).
How can i get their actual data type like (text,number and so on..)

i've already spent hours searching the web and tried different codes like casting it to string/oledbtype but it still don't work..

please help.

So you're trying to read database schema. OleDbConnection object has a GetSchema method.

The code would look something like this

Dim ConnOleDB As OleDbConnection
Dim SchemaDT As DataTable

' Create and init objects. Open DB connection

SchemaDT = ConnOleDB.GetSchema("Columns") ' Get all column information

Search the web again with words "Access" and "schema", and now you may get better results.

HTH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.