A
Arpan
Assume that a table in Access has the following 5 columns: PID, PName,
PDescription, PPrice & PDiscount. Now how do I get all the column names
in Access i.e. the query should retrieve the names of the
above-mentioned 5 columns (only the names, not the records)? In SQL
Server, the following query retrieves all the column names exisitng in
a database table:
----------------------------------------
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME='tblSheet' ORDER BY ORDINAL_POSITION
----------------------------------------
but using the above query to retrieve all the column names exisitng in
an Access table through an ASP application throws the following error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not find file
'C:\WINNT\system32\INFORMATION_SCHEMA.mdb'.
So how does one get ONLY the COLUMN NAMES of a table in Access?
Thanks,
Arpan
PDescription, PPrice & PDiscount. Now how do I get all the column names
in Access i.e. the query should retrieve the names of the
above-mentioned 5 columns (only the names, not the records)? In SQL
Server, the following query retrieves all the column names exisitng in
a database table:
----------------------------------------
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME='tblSheet' ORDER BY ORDINAL_POSITION
----------------------------------------
but using the above query to retrieve all the column names exisitng in
an Access table through an ASP application throws the following error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not find file
'C:\WINNT\system32\INFORMATION_SCHEMA.mdb'.
So how does one get ONLY the COLUMN NAMES of a table in Access?
Thanks,
Arpan