Re: cfscript queries error in base.cfc

2013-10-15 Thread Raymond Camden

I see you are on CF9. Do you have a copy of CF10? If so, try copying over
the CFCs. This may be something that was fixed.


On Tue, Oct 15, 2013 at 10:13 AM, Raymond Camden wrote:

> Weird. Not that it matters, but try this mod:
>
> local.qryObj = new com.adobe.coldfusion.query();
> local.qryObj.setDatasource("PNGOasis");
>
> then continue
>
>
>
> On Tue, Oct 15, 2013 at 10:02 AM, Kumar Shah  wrote:
>
>>
>> You get same error without the setName aspect:
>> 
>> local.qryObj = new Query(datasource="PNGOasis");
>> local.qryObj.setSQL("
>> INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value')
>> ");
>> local.qryObj.execute();
>> 
>>
>> Error:
>> 11:01:30.030 - Expression Exception - in
>> C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>>
>> Cannot find qryname19596 key in structure.
>>
>>
>>
>>
>> On Mon, Oct 14, 2013 at 7:49 AM, Nando  wrote:
>>
>> >
>> > I don't use setName() in my script based queries and it works. If I
>> need a
>> > result back from the query, then I use a different variable name
>> > (v.perviousPayPeriod) from the one I use to construct and execute the
>> query
>> > (v.payPerQ). Here's an example of some working code:
>> >
>> > v.payPerQ = new Query();
>> > v.payPerQ.setSql("
>> >   select paymentPeriodId
>> >   from PaymentPeriod
>> >   where startDateTime = :startDateTime
>> >   and endDateTime = :endDateTime
>> >   and isClosed = 1
>> >  ");
>> >  v.payPerQ.addParam( name='startDateTime',
>> > value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' );
>> >  v.payPerQ.addParam( name='endDateTime',
>> value='#v.previousEndDateTime#',
>> > cfsqltype='cf_sql_timestamp' );
>> >  v.previousPayPeriod= v.payPerQ.execute().getResult();
>> >  if (v.previousPayPeriod.RecordCount) {
>> >... do something
>> >  } else {
>> >... do something else
>> >  }
>> >
>> >
>> >
>> >
>> >
>> > On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden <
>> raymondcam...@gmail.com
>> > >wrote:
>> >
>> > >
>> > > Two things.
>> > >
>> > > 1) Don't forget that the code behind the script based CFCs is not
>> > > encrypted. You can look at base.cfc.
>> > >
>> > > 2) The issue seems to be this line:
>> > >
>> > > > tagResult.setResult(StructFind(variables,tagAttributes['name']))>
>> > >
>> > > But - it is wrapped in a try/catch, so you shouldn't be seeing it. If
>> you
>> > > get rid of the setname aspect, which I don't think you need, does it
>> work
>> > > ok?
>> > >
>> > >
>> > >
>> > >
>> > > On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah 
>> wrote:
>> > >
>> > > >
>> > > > This is the first time I am creating components wholly in cfscript.
>> > > >
>> > > > When running update or insert statements via the cfscript query
>> > functions
>> > > > an error gets recorded like:
>> > > > 22:52:17.017 - Expression Exception - in
>> > > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>> > > >
>> > > > Cannot find updSaveXML key in structure.
>> > > >
>> > > >
>> > > > The system still processes fine. The query runs, data gets saved,
>> > > > updated. I don't know why the error above gets reoorded.
>> > > >
>> > > > I ran a simple test with code:
>> > > >
>> > > > local.qryObj = new Query(datasource="PNGOasis");
>> > > > local.qryObj.setName("test");
>> > > > local.qryObj.setSQL("
>> > > > INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test
>> > value')
>> > > > ");
>> > > > local.qryObj.execute();
>> > > >
>> > > > Same Error:
>> > > >
>> > > > 22:58:48.048 - Expression Exception - in
>> > > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>> > > >
>> > > > Cannot find test key in structure.
>> > > >
>> > > >
>> > > > Thanks
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356923
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfscript queries error in base.cfc

2013-10-15 Thread Raymond Camden

Weird. Not that it matters, but try this mod:

local.qryObj = new com.adobe.coldfusion.query();
local.qryObj.setDatasource("PNGOasis");

then continue



On Tue, Oct 15, 2013 at 10:02 AM, Kumar Shah  wrote:

>
> You get same error without the setName aspect:
> 
> local.qryObj = new Query(datasource="PNGOasis");
> local.qryObj.setSQL("
> INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value')
> ");
> local.qryObj.execute();
> 
>
> Error:
> 11:01:30.030 - Expression Exception - in
> C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>
> Cannot find qryname19596 key in structure.
>
>
>
>
> On Mon, Oct 14, 2013 at 7:49 AM, Nando  wrote:
>
> >
> > I don't use setName() in my script based queries and it works. If I need
> a
> > result back from the query, then I use a different variable name
> > (v.perviousPayPeriod) from the one I use to construct and execute the
> query
> > (v.payPerQ). Here's an example of some working code:
> >
> > v.payPerQ = new Query();
> > v.payPerQ.setSql("
> >   select paymentPeriodId
> >   from PaymentPeriod
> >   where startDateTime = :startDateTime
> >   and endDateTime = :endDateTime
> >   and isClosed = 1
> >  ");
> >  v.payPerQ.addParam( name='startDateTime',
> > value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' );
> >  v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#',
> > cfsqltype='cf_sql_timestamp' );
> >  v.previousPayPeriod= v.payPerQ.execute().getResult();
> >  if (v.previousPayPeriod.RecordCount) {
> >... do something
> >  } else {
> >... do something else
> >  }
> >
> >
> >
> >
> >
> > On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden <
> raymondcam...@gmail.com
> > >wrote:
> >
> > >
> > > Two things.
> > >
> > > 1) Don't forget that the code behind the script based CFCs is not
> > > encrypted. You can look at base.cfc.
> > >
> > > 2) The issue seems to be this line:
> > >
> > >  tagResult.setResult(StructFind(variables,tagAttributes['name']))>
> > >
> > > But - it is wrapped in a try/catch, so you shouldn't be seeing it. If
> you
> > > get rid of the setname aspect, which I don't think you need, does it
> work
> > > ok?
> > >
> > >
> > >
> > >
> > > On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah 
> wrote:
> > >
> > > >
> > > > This is the first time I am creating components wholly in cfscript.
> > > >
> > > > When running update or insert statements via the cfscript query
> > functions
> > > > an error gets recorded like:
> > > > 22:52:17.017 - Expression Exception - in
> > > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> > > >
> > > > Cannot find updSaveXML key in structure.
> > > >
> > > >
> > > > The system still processes fine. The query runs, data gets saved,
> > > > updated. I don't know why the error above gets reoorded.
> > > >
> > > > I ran a simple test with code:
> > > >
> > > > local.qryObj = new Query(datasource="PNGOasis");
> > > > local.qryObj.setName("test");
> > > > local.qryObj.setSQL("
> > > > INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test
> > value')
> > > > ");
> > > > local.qryObj.execute();
> > > >
> > > > Same Error:
> > > >
> > > > 22:58:48.048 - Expression Exception - in
> > > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> > > >
> > > > Cannot find test key in structure.
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356921
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfscript queries error in base.cfc

2013-10-15 Thread Kumar Shah

You get same error without the setName aspect:

local.qryObj = new Query(datasource="PNGOasis");
local.qryObj.setSQL("
INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value')
");
local.qryObj.execute();


Error:
11:01:30.030 - Expression Exception - in
C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460

Cannot find qryname19596 key in structure.




On Mon, Oct 14, 2013 at 7:49 AM, Nando  wrote:

>
> I don't use setName() in my script based queries and it works. If I need a
> result back from the query, then I use a different variable name
> (v.perviousPayPeriod) from the one I use to construct and execute the query
> (v.payPerQ). Here's an example of some working code:
>
> v.payPerQ = new Query();
> v.payPerQ.setSql("
>   select paymentPeriodId
>   from PaymentPeriod
>   where startDateTime = :startDateTime
>   and endDateTime = :endDateTime
>   and isClosed = 1
>  ");
>  v.payPerQ.addParam( name='startDateTime',
> value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' );
>  v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#',
> cfsqltype='cf_sql_timestamp' );
>  v.previousPayPeriod= v.payPerQ.execute().getResult();
>  if (v.previousPayPeriod.RecordCount) {
>... do something
>  } else {
>... do something else
>  }
>
>
>
>
>
> On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden  >wrote:
>
> >
> > Two things.
> >
> > 1) Don't forget that the code behind the script based CFCs is not
> > encrypted. You can look at base.cfc.
> >
> > 2) The issue seems to be this line:
> >
> > 
> >
> > But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you
> > get rid of the setname aspect, which I don't think you need, does it work
> > ok?
> >
> >
> >
> >
> > On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah  wrote:
> >
> > >
> > > This is the first time I am creating components wholly in cfscript.
> > >
> > > When running update or insert statements via the cfscript query
> functions
> > > an error gets recorded like:
> > > 22:52:17.017 - Expression Exception - in
> > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> > >
> > > Cannot find updSaveXML key in structure.
> > >
> > >
> > > The system still processes fine. The query runs, data gets saved,
> > > updated. I don't know why the error above gets reoorded.
> > >
> > > I ran a simple test with code:
> > >
> > > local.qryObj = new Query(datasource="PNGOasis");
> > > local.qryObj.setName("test");
> > > local.qryObj.setSQL("
> > > INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test
> value')
> > > ");
> > > local.qryObj.execute();
> > >
> > > Same Error:
> > >
> > > 22:58:48.048 - Expression Exception - in
> > > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> > >
> > > Cannot find test key in structure.
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356920
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfscript queries error in base.cfc

2013-10-14 Thread Nando

I don't use setName() in my script based queries and it works. If I need a
result back from the query, then I use a different variable name
(v.perviousPayPeriod) from the one I use to construct and execute the query
(v.payPerQ). Here's an example of some working code:

v.payPerQ = new Query();
v.payPerQ.setSql("
  select paymentPeriodId
  from PaymentPeriod
  where startDateTime = :startDateTime
  and endDateTime = :endDateTime
  and isClosed = 1
 ");
 v.payPerQ.addParam( name='startDateTime',
value='#v.previousStartDateTime#', cfsqltype='cf_sql_timestamp' );
 v.payPerQ.addParam( name='endDateTime', value='#v.previousEndDateTime#',
cfsqltype='cf_sql_timestamp' );
 v.previousPayPeriod= v.payPerQ.execute().getResult();
 if (v.previousPayPeriod.RecordCount) {
   ... do something
 } else {
   ... do something else
 }





On Mon, Oct 14, 2013 at 12:44 PM, Raymond Camden wrote:

>
> Two things.
>
> 1) Don't forget that the code behind the script based CFCs is not
> encrypted. You can look at base.cfc.
>
> 2) The issue seems to be this line:
>
> 
>
> But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you
> get rid of the setname aspect, which I don't think you need, does it work
> ok?
>
>
>
>
> On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah  wrote:
>
> >
> > This is the first time I am creating components wholly in cfscript.
> >
> > When running update or insert statements via the cfscript query functions
> > an error gets recorded like:
> > 22:52:17.017 - Expression Exception - in
> > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> >
> > Cannot find updSaveXML key in structure.
> >
> >
> > The system still processes fine. The query runs, data gets saved,
> > updated. I don't know why the error above gets reoorded.
> >
> > I ran a simple test with code:
> >
> > local.qryObj = new Query(datasource="PNGOasis");
> > local.qryObj.setName("test");
> > local.qryObj.setSQL("
> > INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value')
> > ");
> > local.qryObj.execute();
> >
> > Same Error:
> >
> > 22:58:48.048 - Expression Exception - in
> > C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
> >
> > Cannot find test key in structure.
> >
> >
> > Thanks
> >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356919
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfscript queries error in base.cfc

2013-10-14 Thread Raymond Camden

Two things.

1) Don't forget that the code behind the script based CFCs is not
encrypted. You can look at base.cfc.

2) The issue seems to be this line:



But - it is wrapped in a try/catch, so you shouldn't be seeing it. If you
get rid of the setname aspect, which I don't think you need, does it work
ok?




On Sun, Oct 13, 2013 at 9:59 PM, Kumar Shah  wrote:

>
> This is the first time I am creating components wholly in cfscript.
>
> When running update or insert statements via the cfscript query functions
> an error gets recorded like:
> 22:52:17.017 - Expression Exception - in
> C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>
> Cannot find updSaveXML key in structure.
>
>
> The system still processes fine. The query runs, data gets saved,
> updated. I don't know why the error above gets reoorded.
>
> I ran a simple test with code:
>
> local.qryObj = new Query(datasource="PNGOasis");
> local.qryObj.setName("test");
> local.qryObj.setSQL("
> INSERT INTO PNGOasisExt.dbo.Test(testValue) VALUES ('test value')
> ");
> local.qryObj.execute();
>
> Same Error:
>
> 22:58:48.048 - Expression Exception - in
> C:/ColdFusion9/CustomTags/com/adobe/coldfusion/base.cfc : line 460
>
> Cannot find test key in structure.
>
>
> Thanks
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356918
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm