RE: [KCFusion] SQL table listing - Access

2001-05-17 Thread Ryan Block

I looked at the custom tags below, but they need a fully qualified path to
the database and must have DAO installed. So I'm still looking for an Access
solution to get just the column names from a table through a cfquery. SELECT
TOP 1 * FROM table, then getting column names using the CF ColumnList works
as long as there is data in the table, but otherwise I get an error. If
anyone has anymore ideas, I would appreciate it.

Ryan Block

-Original Message-
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 11:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] SQL table listing


There are a couple of cfx tags in the DevEx that you can use for this if you
have access to the server to install them.

CFX_TABLE
http://devex.allaire.com/developer/gallery/info.cfm?ID=CA347124-2830-11D4-AA
9700508B94F380method=Full

CF_TABLEFIELDS
http://devex.allaire.com/developer/gallery/info.cfm?ID=CA347125-2830-11D4-AA
9700508B94F380method=Full

url's will probably wrap

Bryan

- Original Message -
From: Ryan Block [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 11:35 AM
Subject: RE: [KCFusion] SQL table listing


 I have another question about sql tables and columns. Besides the table
 names, I also need to be able to get at the column names in an Access
 database. The folowing code works, until I get a table with no data in it,
 which yields a 37000 ODBC error. I've looked through Access system tables
 and SQL references, but can't find out how to get column names within a
 table. Someone please tell me what I am missing.

 Thanks again,

 Ryan Block


 cfif IsDefined(tablename) IS No
 Click the back button on your browser and select a valid table name.
 cfabort
 /cfif

 cfquery name=getcolumns datasource=#Client.dbname#
 SELECT TOP 1 * !--- Need to fix and just get one record or find other
 solution to get column names ---
 FROM #tablename#
 /cfquery

 cfoutputfont size=+1Below is a list of columns in the #tablename#
 table./fontbrbr
 Uncheck any columns that you do not want displayed on the next screen.br
 You may also enter a new column name that will be used when diplaying data
 within this application.brbr/cfoutput
 !--- form action=tableorfields.cfm method=post Change to this later
 ---
 form action=showdata.cfm method=post
 table

 CFLOOP INDEX=ColumnName LIST=#getcolumns.ColumnList#
 CFOUTPUT
 tr
 tdinput type=checkbox name=c#ColumnName#
 value= checked/td
 td#ColumnName#/td
 tdinput type=text name=t#ColumnName#/td
 /tr
 /CFOUTPUT
 /CFLOOP
 /table

 br
 input type=submit value=Display Data input type=Reset
 /form


 /body
 /html


 -Original Message-
 From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 11:48 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [KCFusion] SQL table listing


 If you want to look at all the object in the DB here is a little dynamic
 table for doing that.

 CFQUERY NAME=QryResult DATASOURCE= MAXROWS= DBTYPE=ODBC
 select * from msysobjects
 /CFQUERY
 TABLE
  TR
   CFLOOP INDEX=ColumnName LIST=#QryResult.ColumnList# DELIMITERS=,
   TDCFOUTPUT#ColumnName#/CFOUTPUT/TD
   /CFLOOP
  CFOUTPUT QUERY=QryResult
  /TR
  TR
  CFLOOP INDEX=CellValue LIST=#QryResult.ColumnList# DELIMITERS=,
   TD#Evaluate(QryResult.  #CellValue#)#/TD
  /CFLOOP
  /CFOUTPUT
  /TR
 /TABLE

 - Original Message -
 From: Ryan Block [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 15, 2001 11:01 AM
 Subject: [KCFusion] SQL table listing


  I can't remember how to query a database to just return the names of the
  tables in a  database (just using Access for now). I know that I have
seen
  the syntax to do this somewhere, but can't find it. Thanks in advance.
 
  Ryan Block
 
 
  __
  The KCFusion.org list and website is hosted by Humankind Systems, Inc.
  List Archives http://www.mail-archive.com/cf-list@kcfusion.org
  Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
  To Subscribe mailto:[EMAIL PROTECTED]
  To Unsubscribe mailto:[EMAIL PROTECTED]
 
 



 __
 The KCFusion.org list and website is hosted by Humankind Systems, Inc.
 List Archives http://www.mail-archive.com/cf-list@kcfusion.org
 Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
 To Subscribe mailto:[EMAIL PROTECTED]
 To Unsubscribe mailto:[EMAIL PROTECTED]



 __
 The KCFusion.org list and website is hosted by Humankind Systems, Inc.
 List Archives http://www.mail-archive.com/cf-list@kcfusion.org
 Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
 To Subscribe mailto:[EMAIL PROTECTED]
 To Unsubscribe mailto:[EMAIL PROTECTED]



 
 

RE: [KCFusion] SQL table listing - Access

2001-05-17 Thread Nathan T Haley

Hey, 
Does anyone know about a virus having to do with Sri Lanka?

-Original Message-
From: Ryan Block [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:13 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [KCFusion] SQL table listing - Access


But I still need to be able to access those columns to input data, even
though they are empty.

Why don't you do a count on the number of records in the table first.  If
the recordcount = 0 don't run the CF ColumnList program.

Ryan
 
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 



Re: [KCFusion] SQL table listing - Access

2001-05-17 Thread Daryl Banttari

http://www.google.com/search?q=sri+lanka+virus

- Original Message - 
From: Nathan T Haley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 2:13 PM
Subject: RE: [KCFusion] SQL table listing - Access


Hey, 
Does anyone know about a virus having to do with Sri Lanka?

-Original Message-
From: Ryan Block [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:13 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [KCFusion] SQL table listing - Access


But I still need to be able to access those columns to input data, even
though they are empty.

Why don't you do a count on the number of records in the table first.  If
the recordcount = 0 don't run the CF ColumnList program.

Ryan
 
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]



 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 



RE: [KCFusion] SQL table listing - Access

2001-05-17 Thread Nathan T Haley

Cute, but not the right kind of virus. Got it sorted, thanks.

-Original Message-
From: Daryl Banttari [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] SQL table listing - Access


http://www.google.com/search?q=sri+lanka+virus

- Original Message - 
From: Nathan T Haley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2001 2:13 PM
Subject: RE: [KCFusion] SQL table listing - Access


Hey, 
Does anyone know about a virus having to do with Sri Lanka?

-Original Message-
From: Ryan Block [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:13 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [KCFusion] SQL table listing - Access


But I still need to be able to access those columns to input data, even
though they are empty.

Why don't you do a count on the number of records in the table first.  If
the recordcount = 0 don't run the CF ColumnList program.

Ryan
 
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]



 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
 
 
 
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]