Sorry to do another email but just realised:
Not seeing you declare ANYTHING a new struct anywhere...
I would guess that would be your problem.
Happy coding.
Mark
> Mark M <[EMAIL PROTECTED]> wrote:
>
> Do you set:
>
> thisDb = StructNew();
>
> because I'm not seeig it...
>
> Mark
>
>
>
> > Mark Stanton <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to make a cfc that will receive a database name & data
> > source
> > name and return a structure that describes the databases
> properties.
> > Kind of
> > like the following:
> >
> > database.tables[1].tableName = "myTableName"
> > database.tables[1].fields[1].fieldName = "myFieldName"
> > database.tables[1].fields[1].fieldDefault = "1"
> > database.tables[1].fields[1].fieldType = "int"
> > database.tables[1].fields[1].fieldKey = "Primary"
> > database.tables[1].fields[1].fieldNull = "No"
> > database.tables[1].fields[1].fieldExtra = "auto_increment"
> >
> >
> > I'm not really having much luck - keep getting tripped up on the
> very
> > first
> > bit: database.tables[1].tableName = "myTableName"
> >
> > <cfset databaseName = "myDatabaseName">
> > <cfset dataSourceName = "myDSN">
> >
> > <cfquery datasource="#dataSourceName#" name="get_tables">
> > SHOW TABLES FROM #databaseName#
> > </cfquery>
> >
> > <cfset thisDb.tables = ArrayNew(1)>
> > <cfset tableCount = 0>
> >
> > <cfloop query="get_tables">
> >
> > <cfset tableCount = tableCount + 1>
> > <cfset "thisDb.tables[#tableCount#].tableName" =
> > evaluate('tables_in_' &
> > databaseName)>
> > <cfdump var="#thisDb#">
> > etc...
> >
> > The error is: 'The string "thisDb.tables[1].tableName" is not a
> valid
> > ColdFusion variable name. '
> >
> > I've tried pretty much every alternative I can think of and still
> no
> > luck.
> > Any ideas appreciated.
> >
> >
> > Cheers
> >
> > Mark
> >
> >
> > ______________
> > Mark Stanton
> > Web Production
> > Gruden Pty Ltd
> > Tel: 9956 6388
> > Mob: 0410 458 201
> > Fax: 9956 8433
> > www.gruden.com
> >
> >
> >
> > ---
> > You are currently subscribed to cfaussie as:
> [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> > [EMAIL PROTECTED]
> >
> > MX Downunder AsiaPac DevCon - http://mxdu.com/
>
>
> --
> ICQ: 3094740
> [EMAIL PROTECTED]
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
--
ICQ: 3094740
[EMAIL PROTECTED]
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/