Have you got a function of your own called CFQuery()?

Ade

-----Original Message-----
From: Howie Hamlin [mailto:[EMAIL PROTECTED]
Sent: 18 August 2004 15:31
To: CF-Talk
Subject: Re: Query from within a cfscript

Here is the code (it's supposed to log to a table):

<CFSCRIPT>

function CSLog(CustomerID,Category,SubCategory,I0,I1,I2,I3,I4,Description){
try{
  SQLString = "Insert into Log
(Category,SubCategory,I0,I1,I2,I3,I4,Description,When) Values

(#Arguments.Category#,#Arguments.SubCategory#,'#Arguments.I0#','#Arguments.I
1#',#Arguments.I2#',#Arguments.I3#',#Arguments.I4#',#Arguments.Description#'
,#CreateODBCDateTime(now())#)";
  DATASOURCE = "C12391";
  LogQ=CFQUERY(SQLString: SQLString, DATASOURCE: DATASOURCE);
  }
  catch(Any excpt)
  {
  WriteOutput("Exception: #excpt.Message#");
}
}

</CFSCRIPT>

And, here is my test template:

<cfinclude template="log.cfm">
<cfset dummy=CSLog(1,1,1,'I0','I1','I2','I3','I4','Description')>

Thanks,

Howie



  ----- Original Message -----
  From: Tangorre, Michael
  To: CF-Talk
  Sent: Wednesday, August 18, 2004 10:29 AM
  Subject: RE: Query from within a cfscript

  Post the code.

  > Any ideas?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to