Topic: what would be the cfm of the below:

gavy    -- 01-08-2008 @ 2:19 PM
  hi friends, what could be the generic cfm code of this, i tried but not working

Dim Myvar as String
Dim MySQL as string = "Select email from yourTableName"
Dim MyConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("UrAppString"))
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
While objDR.Read()
     MyVar+=objDR("email")& ";"
End While

Regards and Thanks

<< << ArrowHead >> >>

......Come and growl......

CJ    -- 01-08-2008 @ 3:34 PM

i tried but not working

you tried what and it's not working how?

@ #coldfusion/DALNet

Teachers open the door. You enter by yourself.
—Chinese Proverb

louissto56    -- 01-08-2008 @ 4:14 PM
  Geez CJ, you seem to attract the "its not working" quote extremely often.

<cfquery name="myq">
SELECT email
FROM urTable
<cfset myVar = "">
<cfloop query="myq">
myVar = mayVar & email & ";"
<cfset myVar = mid(myVar,len(myVar)-1)>

Something along those lines if I can understand what you are doing.

My Biz :: Feb 08

EasyCFM.COM ColdFusion Forums :