Skip to main content
Gene_Godsey
Inspiring
September 19, 2011
Question

CFScript call to database not working.

  • September 19, 2011
  • 1 reply
  • 1238 views

Here is the code:

----------------------------

 

<html>

<head>

<title>Chapter 3 - CFScript functions</title>

</head>

<body>

<cfscript>

myQuery = New Query();

myQuery.setDatasource("cfartgallery");

myQuery.setSQL("SELECT * FROM ARTISTS");

Artist = myQuery.Execute();

writedump(Artist);

/*

myMail = New Mail();

myMail.setAttributes({

  to = "someone@gmail.com",

  from = "dick.tracy@somewhere.net",

  subject = "This is a test Subject",

  body = "This is a test Message!"

});

myMail.Send();

*/

</cfscript>

</body>

</html>

---------------------------

Error:

---------------------------

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

The following information is meant for the website developer for debugging purposes. 

Error Occurred While Processing Request 
Invalid CFML construct found on line 66 at column 49. 
ColdFusion was looking at the following text:
for

The CFML compiler was processing:

A script statement beginning with for on line 66, column 49.
A script statement beginning with { on line 64, column 33.
A script statement beginning with if on line 63, column 33.
A script statement beginning with { on line 61, column 25.
A script statement beginning with if on line 60, column 25.
A script statement beginning with public on line 58, column 17.
A cfscript tag beginning on line 19, column 6.

 
The error occurred in C:\ColdFusion9\CustomTags\com\adobe\coldfusion\base.cfc: line 66

64 :     {
65 :       //include only relevant properties
66 :       for(var p in arguments["1"])
67 :       {
68 :        if(listcontainsnocase(variables.tagAttributes,p)){

---------------------------

This topic has been closed for replies.

1 reply

Inspiring
September 20, 2011

That's weird.  That's a compile error in one of CF's own CFC files.

Possibly clear out your cfclasses dir, restart CF & try again.

--

Adam

Participant
October 21, 2011

Hi Adam,

I did as you said, but still same. I know this is a bug, and need update cfb 1 or upgrade to cfb 2, but I don't wanna install cfb in production server. Is that possible just copying cf compiler to server?

Thanks