On Jan 20, 2007, at 6:18 AM, Robert Mann wrote:
I know there is a way to get the column type using
revDatabaseColumnTypes(firstcurID)
is there also a way to get all the other information about the
column such
as PK, and the column type value int(10)
I think you need to use the database specific queries for this
information. Here are ones for mysql, sqlite and postgresql (I
*think* the postgresql one is right):
put "mytable" into pTable
SWITCH theDBType # get query to extract table info
CASE "mysql"
put "SHOW FULL COLUMNS FROM `" & pTable & "`" into theSQL
break
CASE "sqlite"
put "PRAGMA table_info(" & quote & pTable & quote & ")" into
theSQL
break
CASE "postgresql"
put "SELECT column_name FROM information_schema.columns WHERE
table_name = '" & pTable & "'" into theSQL
break
END SWITCH
Using one of the above queries and open a cursor. You should then
get one record for each field.
--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution