Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL statement for column information

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
Is there an SQL statement that will give me column information? For a table I want to know the data type and of course colum/Attribute name for each column.

I know there are VB ways of doing it, but I'm looking for a purely SQL way.

Thanks
 
There is no "purely SQL way" of querying column/field information from Access/JET tables.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
It is not clear what you mean by pure SQL? If you want the data returned as a recordset then ADO has the OpenSchema Method. I suppose if you want to write a Select Statement that you could use the Hidden tables in Access, but this seems unnecessary for any requirement I can think of right off. Perhaps if you explain the requirements a good solution can be found.
 
My requirements: I need SQL access to table with Python. I usually use ODBC. But I do not know if there's a way with ODBC to specifically find out if a table has BLOB and/or MEMO columns. ie what are the data types for each column in a table?

It sounds like ADO is the way. Thanks
 
leegold2

It 's either DAO.TableDef.Field(?).Type property or ADOX.Table.columns(?).Type Property or a recordset on the table to check the field's type property.
 
It sounds like you are using linked tables in Access. What is the database engine you are linked to? SQL Server? Oracle? These databases have data dictionaries that can return information on the tables. Do you want to see the native data type or the data type after it is mapped through ODBC in the linked table?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top