is there any way to get a table attributes using a SQL Query?

  • Thread starter Thread starter orejap
  • Start date Start date
O

orejap

Guest
im tryng to implement a PowerBuilder function that receives a valid table name as a parameter and returns an array of strings with the names of each of the table's attributes.

So what i need is a MS Access compatible SQL query that retrieves the attributes names of a given table.

any suggestion?
 
orejap said:
.. function that receives a valid table name as a parameter and returns an array of strings with the names of each of the table's.

Investigate into TableDef & Fields. Using them along with items such as .Name should get you what you wanted. If you take a peak at this thread's first response. The code he uses to capture the field name is as simple as fld.Name. (Of course after he declared Dim fld As Field) And raskew got the name the table with test = db.TableDefs(tName).Name after appropriate declarations as well. Good luck! Write back with an update.
 

Users who are viewing this thread

Back
Top Bottom