RE: Read from database and insert into string

2002-10-22 Thread Adrian Lynch
cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

cfset myString = ListAppend(myString, GetEnv.strVar, ,)

Ade

-Original Message-
From: FlashGuy [mailto:flashmx;rogers.com]
Sent: 22 October 2002 17:33
To: CF-Talk
Subject: Read from database and insert into string


Hi,

I need to read from my database the field strVar. I have 500+ entries. I
need to read every line from the database, grab the contents of that field
and put all the data into a 
variable called results. They must all be comma delimited.

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

Do I need to loop through it?

Example:

variable = var1,var2,var3,var4...etc





---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Read from database and insert into string

2002-10-22 Thread Collin Tobin
Look into ValueList()...


Collin Tobin
QA Engineer
617 219 2000
[EMAIL PROTECTED]
Macromedia®
What the web can be.(tm)




-Original Message-
From: FlashGuy [mailto:flashmx;rogers.com]
Sent: Tuesday, October 22, 2002 12:33 PM
To: CF-Talk
Subject: Read from database and insert into string


Hi,

I need to read from my database the field strVar. I have 500+ entries. I need to read 
every line from the database, grab the contents of that field and put all the data 
into a 
variable called results. They must all be comma delimited.

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

Do I need to loop through it?

Example:

variable = var1,var2,var3,var4...etc





---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Read from database and insert into string

2002-10-22 Thread Mosh Teitelbaum
Look into the ValueList() function, which takes a query.column and converts
it into a comma-delimited list/string.  If you want each list item to be
quoted, than use the QuotedValueList() function.  So, your code would look
like:

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

CFSET results = ValueList(GetEnv.strVar)

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


 -Original Message-
 From: FlashGuy [mailto:flashmx;rogers.com]
 Sent: Tuesday, October 22, 2002 12:33 PM
 To: CF-Talk
 Subject: Read from database and insert into string


 Hi,

 I need to read from my database the field strVar. I have 500+
 entries. I need to read every line from the database, grab the
 contents of that field and put all the data into a
 variable called results. They must all be comma delimited.

   cfquery name=GetEnv datasource=database-name dbtype=ODBC
   SELECT  strVar,strDestination
   FROMusers
   /cfquery

 Do I need to loop through it?

 Example:

 variable = var1,var2,var3,var4...etc





 ---
 Colonel Nathan R. Jessop
 Commanding Officer
 Marine Ground Forces
 Guatanamo Bay, Cuba
 ---



 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Read from database and insert into string

2002-10-22 Thread Adrian Lynch
Opps, forgot the cfoutput query=GetEnv

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

cfoutput query=GetEnv
cfset myString = ListAppend(myString, GetEnv.strVar, ,)
/cfoutput

Ade

-Original Message-
From: Adrian Lynch [mailto:adrian.l;thoughtbubble.net]
Sent: 22 October 2002 17:37
To: CF-Talk
Subject: RE: Read from database and insert into string


cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

cfset myString = ListAppend(myString, GetEnv.strVar, ,)

Ade

-Original Message-
From: FlashGuy [mailto:flashmx;rogers.com]
Sent: 22 October 2002 17:33
To: CF-Talk
Subject: Read from database and insert into string


Hi,

I need to read from my database the field strVar. I have 500+ entries. I
need to read every line from the database, grab the contents of that field
and put all the data into a 
variable called results. They must all be comma delimited.

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

Do I need to loop through it?

Example:

variable = var1,var2,var3,var4...etc





---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Read from database and insert into string

2002-10-22 Thread Ben Forta
Easy, use the ValueList() function ...

CFSET results=ValueList(GetEnv, strVar)

--- Ben



-Original Message-
From: FlashGuy [mailto:flashmx;rogers.com] 
Sent: Tuesday, October 22, 2002 12:33 PM
To: CF-Talk
Subject: Read from database and insert into string


Hi,

I need to read from my database the field strVar. I have 500+ entries. I
need to read every line from the database, grab the contents of that
field and put all the data into a 
variable called results. They must all be comma delimited.

cfquery name=GetEnv datasource=database-name dbtype=ODBC
SELECT  strVar,strDestination
FROMusers
/cfquery

Do I need to loop through it?

Example:

variable = var1,var2,var3,var4...etc





---
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



Re: Read from database and insert into string

2002-10-22 Thread Tim Painter
Use ValueList()

e.g

cfset  myList = ValueList(GetEnv.strVar)

- Original Message -
From: FlashGuy [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, October 22, 2002 12:33 PM
Subject: Read from database and insert into string


 Hi,

 I need to read from my database the field strVar. I have 500+ entries. I
need to read every line from the database, grab the contents of that field
and put all the data into a
 variable called results. They must all be comma delimited.

 cfquery name=GetEnv datasource=database-name dbtype=ODBC
 SELECT  strVar,strDestination
 FROMusers
 /cfquery

 Do I need to loop through it?

 Example:

 variable = var1,var2,var3,var4...etc





 ---
 Colonel Nathan R. Jessop
 Commanding Officer
 Marine Ground Forces
 Guatanamo Bay, Cuba
 ---



 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm