snippet for checking out your user tables from CF:
<cfquery name="GetSQLInfo"
datasource="#YourDSN#">
SELECT objs.Name AS TableName, cols.Name AS ColumnName, cols.Length,
typs.Name as DataType
FROM sysobjects objs, syscolumns cols, systypes typs
WHERE objs.id = cols.id
AND cols.xtype = typs.xtype
AND objs.xtype = 'U'
ORDER BY objs.name, cols.name
</cfquery>
HTH->
Tyler
_____
From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 12:24 PM
To: CF-Talk
Subject: Re:How do I tell what fields are in my tables...
There is another way to do much of this in SQL Server:
Use the following two queries and do a cfdump on them:
-- To get all tables in a database, just do:
SELECT * from sysobjects where type='u'
(the type='u' means just show USER tables, not system tables)
-- To get info on table, including datatypes etc, use the following SQL
Server stored proc (comes with database):
sp_help [yourTableName]
Will return seven result sets; the second one is the interesting one - run
it is query analyzer to see what you can get from it. I use this instead of
Enterprise Manager, for the most part - Query Analyzer is much lower
overhead and faster.
>Thanks Critz!
>
>This worked like a charm.
>
>
>I'm alos going to look at what you recomended Philip.
>
>
>Thanks to all!
>
>Brian
>
>
>oi cf!!
>
>select top 10 * from table
><cfdump var="#query#">
>
>or output query.columnlist
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

