Re: What am I doing wrong? (Problem with )

2006-11-27 Thread Adrian
DateSent = "Now()"

er, won't that insert the string "Now()" into your db?

Why not use a date field in your DB?


On 25/11/06, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> > DateSent = "Now()"
> And you might also think about using CreateODBCDate() for this.
>
> Will
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261759
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What am I doing wrong? (Problem with )

2006-11-25 Thread Will Tomlinson
> DateSent = "Now()"

Re: What am I doing wrong? (Problem with )

2006-11-25 Thread Doug Brown
I think I figured it out, or at least it works. Maybe someone can tell me if
I am right.

In the invocation of the function I had it like...

 
 

I changed it to

 
 



Doug

- Original Message - 
From: "Doug Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Saturday, November 25, 2006 2:28 PM
Subject: What am I doing wrong? (Problem with )


> This works
>
>  
>  INSERT INTO #APPLICATION.DBPRE#VisSaveAd
>   (VisitorID,
>AdID,
>DateSent)
>  VALUES
>   (#Val(ARGUMENTS.VisitorID)#,
>#Val(ARGUMENTS.AdID)#,
>'#Trim(ARGUMENTS.DateSent)#')
>
>  
>
> And this gives a String or binary data would be truncated error. The
CF_SQL_TYPES are correct as far as the database table is concerned.
>
>
>
>  
>  INSERT INTO #APPLICATION.DBPRE#VisSaveAd
>   (VisitorID,
>AdID,
>DateSent)
>  VALUES
>
>   (,
>,
>)
>
>  
>
>
> Thanks
>
> Doug B.
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261665
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
thanks dave.

but I got it...it was earlier on in the code :)

dummy me. 

-Original Message-
From: Dave Francis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:49 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

Did you try separating out request.nextRecord?
    ie #request.nextRecord# then you'll know if it's
the index or the data
  -Original Message-
  From: Tony Weeg [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:13 AM
  To: CF-Talk
  Subject: RE: what am I doing wrong (#'s question)

  

  
   #get.yourNameHere[i]# 

  

  still gives me same error.

  so, its not the  #get.yourNameHere[i]#
  

  line, it's the other part.

  tw

  -Original Message-
  From: Tony Weeg [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:10 AM
  To: CF-Talk
  Subject: RE: what am I doing wrong (#'s question)

  yes.

  but im good on that...

  just need the correct poundage for the
  get.companyIdNumber[request.nextRecord]

  to parse right.

  that's all.

  tw

  -Original Message-
  From: Ben Doom [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:09 AM
  To: CF-Talk
  Subject: Re: what am I doing wrong (#'s question)

  > 
  >  #get.yournamehere#

  Don't you need an array referent for get.yournamehere[]?

  --Ben Doom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Dave Francis
Did you try separating out request.nextRecord?
    ie #request.nextRecord# then you'll know if it's
the index or the data
  -Original Message-
  From: Tony Weeg [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:13 AM
  To: CF-Talk
  Subject: RE: what am I doing wrong (#'s question)

  

  
   #get.yourNameHere[i]# 

  

  still gives me same error.

  so, its not the  #get.yourNameHere[i]#
  

  line, it's the other part.

  tw

  -Original Message-
  From: Tony Weeg [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:10 AM
  To: CF-Talk
  Subject: RE: what am I doing wrong (#'s question)

  yes.

  but im good on that...

  just need the correct poundage for the
  get.companyIdNumber[request.nextRecord]

  to parse right.

  that's all.

  tw

  -Original Message-
  From: Ben Doom [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 10:09 AM
  To: CF-Talk
  Subject: Re: what am I doing wrong (#'s question)

  > 
  >  #get.yournamehere#

  Don't you need an array referent for get.yournamehere[]?

  --Ben Doom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
thanks ben.

read my last post.

it was, as I said, a brain fart.

thanks!
tony 

-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:25 AM
To: CF-Talk
Subject: Re: what am I doing wrong (#'s question)

Does it error the first time through the loop?  Or after a while?
How is i generated?
What is the specific error generated?

--Ben Doom

Tony Weeg wrote:

> 
> 
> 
>  #get.yourNameHere[i]# 
> 
>   
> 
> still gives me same error.
> 
> so, its not the  #get.yourNameHere[i]#
> 
> 
> line, it's the other part.
> 
> tw
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: what am I doing wrong (#'s question)

2004-05-18 Thread Ben Doom
Does it error the first time through the loop?  Or after a while?
How is i generated?
What is the specific error generated?

--Ben Doom

Tony Weeg wrote:

> 
> 
> 
>  #get.yourNameHere[i]# 
> 
>   
> 
> still gives me same error.
> 
> so, its not the  #get.yourNameHere[i]#
> 
> 
> line, it's the other part.
> 
> tw
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: what am I doing wrong (#'s question)

2004-05-18 Thread Stephen Moretti
Tony Weeg wrote:

> 
>
> 
>  #get.yourNameHere[i]# 
>
>   
>
> still gives me same error.
>
> so, its not the  #get.yourNameHere[i]#
> 
>
> line, it's the other part.

Ok there's nothing wrong in this bit of code.  Like Phil just asked, can 
you post some more code and the whole of the error message including the 
line its telling you the error is on etc

Its sounding like its something to do with your surrounding code rather 
than anything here.

Stephen
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
man.

ill shut up.

as I said, brain fart.

it was something else, a line or two up :)

hee.

cya.

good Tuesday.

later. 

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:16 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

didn't think so.

so, do I need some " (Apostrophe's) there or something?

tony 

-Original Message-
From: Philip Arnold [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:20 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

> From: Tony Weeg
> 
> just need the correct poundage for the 
> get.companyIdNumber[request.nextRecord]
> 
> to parse right.

Your # usage is correct on that line

Since it's within a CFIF, then you don't need any at all
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Rob
Tony,
I think what they are trying to tell you is that:

 #get.yournamehere#

needs to have an appearance similar to
get.companyIdNumber[request.nextRecord]
Note that get.column[index] != get.column

so #get.column# is not a simple value - I think you are trying to do
...

#get.yournamehere[request.nextRecord]#
 
...

Though that is untested on my part. It could be get.index.column I
forget ... I'd have to run it.

Cheers

On Tue, 2004-05-18 at 07:08, Tony Weeg wrote:
> sure.
> 
> but whats that going to get me :)
> 
> I know what that gets me...
> 
> this has nothing to do with the dump of get.
> 
> it has to do with looping, and in the []'s parsing the value of
> request.nextRecord
> so that I get the next line during that iteration.
> 
> tony
> 
> -Original Message-
> From: Pascal Peters [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 18, 2004 10:07 AM
> To: CF-Talk
> Subject: RE: what am I doing wrong (#'s question)
> 
> Did you dump get?? 
> 
> > -Original Message-
> > From: Tony Weeg [mailto:[EMAIL PROTECTED] 
> > Sent: dinsdag 18 mei 2004 15:59
> > To: CF-Talk
> > Subject: what am I doing wrong (#'s question)
> > 
> > what the heck am I doing wrong?
> > 
> > brain fart on the:
> > 
> > get.companyIdNumber[request.nextRecord]
> > 
> > part of this...
> > 
> > 
> > 
> > 
> > get.companyIdNumber[request.nextRecord]>
> > 	 #get.yournamehere#
> > 
> > 
> > im being told that im trying to dereference a scalar 
> > variable, something, blah.
> > 
> > still brain farting this morning on this one...
> > 
> > thanks!
> > 
> > ...tony
> > 
> > tony weeg
> > senior web applications architect
> > navtrak, inc.
> > www.navtrak.net
> > [EMAIL PROTECTED]
> > 410.548.2337
> > 
> > 
> > 
> 
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
didn't think so.

so, do I need some " (Apostrophe's) there or something?

tony 

-Original Message-
From: Philip Arnold [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:20 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

> From: Tony Weeg
> 
> just need the correct poundage for the 
> get.companyIdNumber[request.nextRecord]
> 
> to parse right.

Your # usage is correct on that line

Since it's within a CFIF, then you don't need any at all
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Philip Arnold
> From: Tony Weeg
> 
> just need the correct poundage for the 
> get.companyIdNumber[request.nextRecord]
> 
> to parse right.

Your # usage is correct on that line

Since it's within a CFIF, then you don't need any at all
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg

	

	 #get.yourNameHere[i]# 

  

still gives me same error.

so, its not the 	 #get.yourNameHere[i]#


line, it's the other part.

tw

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:10 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

yes.

but im good on that...

just need the correct poundage for the
get.companyIdNumber[request.nextRecord]

to parse right.

that's all.

tw

-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:09 AM
To: CF-Talk
Subject: Re: what am I doing wrong (#'s question)

> 
>  #get.yournamehere#

Don't you need an array referent for get.yournamehere[]?

--Ben Doom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Philip Arnold
Can you post more of your code?

Need to see if your look is going "too far"

> -Original Message-
> From: Tony Weeg
> 
> what the heck am I doing wrong?
> 
> brain fart on the:
> 
> get.companyIdNumber[request.nextRecord]
> 
> part of this...
> 
> 
> 
> 
> get.companyIdNumber[request.nextRecord]>
> 	 #get.yournamehere#
> 
> 
> im being told that im trying to dereference a scalar 
> variable, something, blah.
> 
> still brain farting this morning on this one...
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
yes.

but im good on that...

just need the correct poundage for the
get.companyIdNumber[request.nextRecord]

to parse right.

that's all.

tw

-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:09 AM
To: CF-Talk
Subject: Re: what am I doing wrong (#'s question)

> 
>  #get.yournamehere#

Don't you need an array referent for get.yournamehere[]?

--Ben Doom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




re: what am I doing wrong (#'s question)

2004-05-18 Thread Scott Brady
Original Message:
> From: "Tony Weeg" 
> 	 #get.yournamehere#

As someone already suggested, it's probably this line.  You're not telling which row you're accessing "get.yournamehere" from.

(and, also as suggested, close your option tag :) )

Scott

---
Scott Brady
http://www.scottbrady.net/
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Tony Weeg
sure.

but whats that going to get me :)

I know what that gets me...

this has nothing to do with the dump of get.

it has to do with looping, and in the []'s parsing the value of
request.nextRecord
so that I get the next line during that iteration.

tony

-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:07 AM
To: CF-Talk
Subject: RE: what am I doing wrong (#'s question)

Did you dump get?? 

> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 18 mei 2004 15:59
> To: CF-Talk
> Subject: what am I doing wrong (#'s question)
> 
> what the heck am I doing wrong?
> 
> brain fart on the:
> 
> get.companyIdNumber[request.nextRecord]
> 
> part of this...
> 
> 
> 
> 
> get.companyIdNumber[request.nextRecord]>
> 	 #get.yournamehere#
> 
> 
> im being told that im trying to dereference a scalar 
> variable, something, blah.
> 
> still brain farting this morning on this one...
> 
> thanks!
> 
> ...tony
> 
> tony weeg
> senior web applications architect
> navtrak, inc.
> www.navtrak.net
> [EMAIL PROTECTED]
> 410.548.2337
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: what am I doing wrong (#'s question)

2004-05-18 Thread Ben Doom
> 
>  #get.yournamehere#

Don't you need an array referent for get.yournamehere[]?

--Ben Doom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: what am I doing wrong (#'s question)

2004-05-18 Thread Pascal Peters
Did you dump get?? 

> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 18 mei 2004 15:59
> To: CF-Talk
> Subject: what am I doing wrong (#'s question)
> 
> what the heck am I doing wrong?
> 
> brain fart on the:
> 
> get.companyIdNumber[request.nextRecord]
> 
> part of this...
> 
> 
> 
> 
> get.companyIdNumber[request.nextRecord]>
> 	 #get.yournamehere#
> 
> 
> im being told that im trying to dereference a scalar 
> variable, something, blah.
> 
> still brain farting this morning on this one...
> 
> thanks!
> 
> ...tony
> 
> tony weeg
> senior web applications architect
> navtrak, inc.
> www.navtrak.net
> [EMAIL PROTECTED]
> 410.548.2337
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: What am I doing WRONG!?!?!

2003-01-21 Thread Ernie Pena
WHOOHOO!!! that did the trick Thanks a bunch!

EP!

- Original Message -
From: "Craig Dudley" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 9:41 AM
Subject: RE: What am I doing WRONG!?!?!


It is most likely long text retrieval option in the data source setup.
Go into cf administrator and edit the data source.

I had this issue the 1st time I upgraded a Cf5 box to MX, none of them
access data sources would retrieve memo text fields.

Fortunately, it only takes 2 seconds to fix.

-Original Message-
From: Ernie Pena [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 15:01
To: CF-Talk
Subject: What am I doing WRONG!?!?!

I'm no stranger to writing CF code and updataing a database is a snap,
however I'm dumbfounded by this bug.

Here is the setup Compaq server with CFMX running (upgraded from CF5)
1GIG
or ram and 40gig of free space. The server processes istn even hitting
2%
utilization yet.

Ok here is the problem:

I have a form to insert / update records to a database (Access) I know I
would much rather use SQL but that id a different story, anyways I
created a
news form very simple feilds are title, date, and article, the tables
defined in the database are as follows.

ID = AutoNumber
NewsTitle =text, 50
NewsDate = text, 50
NewsArticle =Memo
 Really Simple right...

Well for some reason I cannot get the news article to show up it will
update
and I can insert a new record but when I do a CFDUMP of the query it
says
"[empty string]" under the NewsArticle feild is. But when I download the
database from the server to view it, the table has the data in the
feild.
whats even more confusing is that the two other feild display and update
fine.

Here is the insert statment:


Here is the Update statment:
  
  UPDATE TeamNews
   SET NewsDate = '#NewsDate#', NewsTitle = '#NewsTitle#', NewsArticle =
'#NewsArticle#'
  WHERE ID = #Update#;
  

Thanks in advance
Ernie Pena
U. T. MD Anderson




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: What am I doing WRONG!?!?!

2003-01-21 Thread Craig Dudley
It is most likely long text retrieval option in the data source setup.
Go into cf administrator and edit the data source.

I had this issue the 1st time I upgraded a Cf5 box to MX, none of them
access data sources would retrieve memo text fields.

Fortunately, it only takes 2 seconds to fix.

-Original Message-
From: Ernie Pena [mailto:[EMAIL PROTECTED]] 
Sent: 21 January 2003 15:01
To: CF-Talk
Subject: What am I doing WRONG!?!?!

I'm no stranger to writing CF code and updataing a database is a snap,
however I'm dumbfounded by this bug.

Here is the setup Compaq server with CFMX running (upgraded from CF5)
1GIG
or ram and 40gig of free space. The server processes istn even hitting
2%
utilization yet.

Ok here is the problem:

I have a form to insert / update records to a database (Access) I know I
would much rather use SQL but that id a different story, anyways I
created a
news form very simple feilds are title, date, and article, the tables
defined in the database are as follows.

ID = AutoNumber
NewsTitle =text, 50
NewsDate = text, 50
NewsArticle =Memo
 Really Simple right...

Well for some reason I cannot get the news article to show up it will
update
and I can insert a new record but when I do a CFDUMP of the query it
says
"[empty string]" under the NewsArticle feild is. But when I download the
database from the server to view it, the table has the data in the
feild.
whats even more confusing is that the two other feild display and update
fine.

Here is the insert statment:


Here is the Update statment:
  
  UPDATE TeamNews
   SET NewsDate = '#NewsDate#', NewsTitle = '#NewsTitle#', NewsArticle =
'#NewsArticle#'
  WHERE ID = #Update#;
  

Thanks in advance
Ernie Pena
U. T. MD Anderson



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: What am I doing WRONG!?!?!

2003-01-21 Thread Tangorre, Michael
check your ODBC drivers. make sure you have the latest ones... especially since you 
upgraded to MX where JDBC is now an issue.

hth,

mike


-Original Message-
From: Ernie Pena [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 10:01 AM
To: CF-Talk
Subject: What am I doing WRONG!?!?!


I'm no stranger to writing CF code and updataing a database is a snap,
however I'm dumbfounded by this bug.

Here is the setup Compaq server with CFMX running (upgraded from CF5) 1GIG
or ram and 40gig of free space. The server processes istn even hitting 2%
utilization yet.

Ok here is the problem:

I have a form to insert / update records to a database (Access) I know I
would much rather use SQL but that id a different story, anyways I created a
news form very simple feilds are title, date, and article, the tables
defined in the database are as follows.

ID = AutoNumber
NewsTitle =text, 50
NewsDate = text, 50
NewsArticle =Memo
 Really Simple right...

Well for some reason I cannot get the news article to show up it will update
and I can insert a new record but when I do a CFDUMP of the query it says
"[empty string]" under the NewsArticle feild is. But when I download the
database from the server to view it, the table has the data in the feild.
whats even more confusing is that the two other feild display and update
fine.

Here is the insert statment:


Here is the Update statment:
  
  UPDATE TeamNews
   SET NewsDate = '#NewsDate#', NewsTitle = '#NewsTitle#', NewsArticle =
'#NewsArticle#'
  WHERE ID = #Update#;
  

Thanks in advance
Ernie Pena
U. T. MD Anderson



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




Re: What am I doing wrong here?

2001-11-12 Thread Douglas L. Brown

Never mind, figured it out..



thanks


DB
- Original Message -
From: "Douglas L. Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 8:05 PM
Subject: What am I doing wrong here?


> I am trying to populate the ID field of this table with the following.
> Please help
>
>
>   
>INSERT INTO cust_contacts
>VALUES  ( '#custNum#',
>   '#f_name#',
>   '#l_name#',
>   '#email#',
>   '#password#' )
>
>
>
> DECLARE @maxid int
> BEGIN
>  SELECT @maxid = MAX(ID)
>  FROM cust_contacts
>  WHERE custNum = '#custNum#'
> IF @maxid IS NULL
>  SELECT @maxid = 1
>  ELSE
>  SELECT @maxid = @maxid + 1
> END
>
>   
>
>
>
>  NAME="Douglas L. Brown"
> EMAIL="[EMAIL PROTECTED]"
> PHONE="714.538.6611"
> WEB="http://www.carnivorepc.com";>
>
> 
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Stephen M. Aylor

Conferring w/ Justin and "Stolen" from Mike Dinowitz's HOF style guide:

Code - There are a number of code issues that should be examined. Most of
them have to be written up in separate articles due to the depth of
information. Until these articles are out, here's the basics.
Every app should have a CFAPPLICATION tag - Even if you're not using state
management, you should have a CFAPPLICATION tag going. Most applications
have default values and storing them in application variables allows them to
be set for the entire app.
Run application defaults ONCE - Most people place CFSETs for application
defaults inside their application.cfm files. They expect that the variables
will be set once, but in reality they are set on EACH template. A better
idea is to use the following code:







This will cause the CFSETs to be used ONCE and only ONCE

END QUOTE.


I like Justin's addition to this as well "".  Now whether  vs.  is
better, well test er out :-)

Steve

- Original Message -
From: "Justin v0.9 MacCarthy" <[EMAIL PROTECTED]>

> > names, etc., when setting them in the Application.cfm file?  Is it

> > or ?  Judging by the responses, I would assume that 
>
>
> The best way is to something like
>
> 
> 
> 
> 
> 
> .
> .
> .
> 
> 
>
>
> ~Justin MacCarthy
>
>
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Justin v0.9 MacCarthy


> names, etc., when setting them in the Application.cfm file?  Is it 
> or ?  Judging by the responses, I would assume that 


The best way is to something like






.
.
.




~Justin MacCarthy



--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Phil Arnold

> I'm not sure .. anyone else have an opinion?

Since it was fairly easy to do - I ran loads of timing tests on the
difference between CFSet and CFParam.

CFParam runs about 1.1-1.2 times slower than a CFSet - BUT as has been
mentioned, using Application scoping speeds up the access loads - it's just
the first access of the application which is slower (server setting up the
registry/datasource/cookie entries)

Just a little beside point - Variables scope is the fastest that I've tested
so far as it requires little work from the server

Oh, and CFParam on an Application variable is about 4-5 times slower than a
CFParam on Variables scope...

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Todd Ashworth

This whole thread is getting a little off the orginal question, which was,
sort of, what's the best way set 'constant' variables, such as DSNs, company
names, etc., when setting them in the Application.cfm file?  Is it 
or ?  Judging by the responses, I would assume that  is
faster, but it seams awkward to  the same variable with the same
value for every single page that is loaded.  Is there a better way to set
such variables other than sticking them in the Application.cfm?  This is
purely academic, so there is no such thing as getting too deep ;)

Todd Ashworth

> >
> > Any idea which is faster?
> >
> CFSET is faster of course, but i think that you'll find that cfparam is
> faster than :
>
> 
> 
> 
>
> > > The flags
> > > could be stored in a fast access location rather than a variable look
> > up/variable verification in memory somewhere.
> >
> > Such as?
> >
> I think you're getting in too deep to something that you really don't need
> to worry about too much.
>
> Here is a quick run down of ways you can set variables in CF:
>
>  is a straight create/overwrite
>  will only set the variable
if
> it isn't already created (this is quicker than the above IsDefined if
> statement above.
>
> 
>variable = something;
> 
>
> is apparently (never tested it myself) quicker than doing a CFSET if you
are
> handling a lot of variables or if you're used to VB or JS.
>
> However, in application.cfm you should only really be setting application,
> session or client variables.  Do you really want to be overwriting an
> application variable when someone else may be trying to read that
variable?
>
>
> Regards
>
> Stephen


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Stephen Moretti

Todd,

>
> Any idea which is faster?
>
CFSET is faster of course, but i think that you'll find that cfparam is
faster than :





> > The flags
> > could be stored in a fast access location rather than a variable look
> up/variable verification in memory somewhere.
>
> Such as?
>
I think you're getting in too deep to something that you really don't need
to worry about too much.

Here is a quick run down of ways you can set variables in CF:

 is a straight create/overwrite
 will only set the variable if
it isn't already created (this is quicker than the above IsDefined if
statement above.


   variable = something;


is apparently (never tested it myself) quicker than doing a CFSET if you are
handling a lot of variables or if you're used to VB or JS.

However, in application.cfm you should only really be setting application,
session or client variables.  Do you really want to be overwriting an
application variable when someone else may be trying to read that variable?


Regards

Stephen

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread GE

Hello,

Todd Ashworth wrote:

> > Hello,
> >
> > My *guess* as to how CF handles it is to use a flag to determine if it has
> been set already - if this flag is set don't bother checking and/or setting
> the variable again.
>
> Any idea which is faster?
>

Again my guess would that *if* an application has set aside some specific information 
concerning itself (for example flags variable lists, open files etc) it must be set up 
in such a
way that look ups are going to be faster. To be honest I have not been able to find 
much information on the specifics of how CF implements memory handling/variable 
storage - although
I would very much like to get this info.

To look up in a list you have to simply get the key and check the value. The location 
is already known.
To look up in memory you must first get the key, find where that key points to and 
then check that value. (possibly more than one location to check until you get the 
actual value you
are looking for)


>
> > The flags
> > could be stored in a fast access location rather than a variable look
> up/variable verification in memory somewhere.
>
> Such as?
>

Application cache, once the application gets processor time it can bring this 
"Application cache" memory with it and therefore have access to very fast memory 
,perhaps even within the
CPU's registers itself- (again I guess at the existence of this any ideas where more 
techinal whitepapers could be found on CF ?)


Best regards always,
Nelson



>
> Todd Ashworth
>
> > Todd Ashworth wrote:
> >
> > > I'm not sure .. anyone else have an opinion?
> > >
> > > Todd Ashworth
> > >
> > > - Original Message -
> > > From: Kym Kovan <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, July 04, 2000 7:46 AM
> > > Subject: Re: What am I doing wrong?
> > >
> > > > Hi Todd,
> > > >
> > > > >If you use  in the Application.cfm file, the  gets
> executed
> > > > >every time a page is loaded, regardless if the variable already has
> its
> > > > >value or not.  If you use  > > > >default="mydsn">, the variable is only set if it doesn't already
> exist.
> > > I
> > > > >would guess this provides a slight performance increase which could
> > > really
> > > > >add up under heavy use.
> > > >
> > > > I wonder about that.  > > variable,
> > > > then sets it if it is not there,  > > >
> > > > If we are talking template level variables then the  obviously
> > > > faster but at the application or server level scopes then which is
> faster
> > > a
> > > > check or a set? First time round the variable has to be set, but after
> > > that?
>
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Todd Ashworth

> Hello,
>
> My *guess* as to how CF handles it is to use a flag to determine if it has
been set already - if this flag is set don't bother checking and/or setting
the variable again.

Any idea which is faster?

> The flags
> could be stored in a fast access location rather than a variable look
up/variable verification in memory somewhere.

Such as?


Todd Ashworth

> Todd Ashworth wrote:
>
> > I'm not sure .. anyone else have an opinion?
> >
> > Todd Ashworth
> >
> > - Original Message -
> > From: Kym Kovan <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 04, 2000 7:46 AM
> > Subject: Re: What am I doing wrong?
> >
> > > Hi Todd,
> > >
> > > >If you use  in the Application.cfm file, the  gets
executed
> > > >every time a page is loaded, regardless if the variable already has
its
> > > >value or not.  If you use  > > >default="mydsn">, the variable is only set if it doesn't already
exist.
> > I
> > > >would guess this provides a slight performance increase which could
> > really
> > > >add up under heavy use.
> > >
> > > I wonder about that.  > variable,
> > > then sets it if it is not there,  > >
> > > If we are talking template level variables then the  > > faster but at the application or server level scopes then which is
faster
> > a
> > > check or a set? First time round the variable has to be set, but after
> > that?


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread GE

Hello,

My *guess* as to how CF handles it is to use a flag to determine if it has been set 
already - if this flag is set don't bother checking and/or setting the variable again. 
The flags
could be stored in a fast access location rather than a variable look up/variable 
verification in memory somewhere.

On another note though using a straight CFSET will wipe out anything that you might 
have wanted to store in that variable and set it to that value (assuming this is done 
in the
Application.cfm file). There may be instances where a variables value will be modified 
during program execution. In this case an CFIF conditional guard would be required.

just my 20 centavos worth ;)

Nelson


Todd Ashworth wrote:

> I'm not sure .. anyone else have an opinion?
>
> Todd Ashworth
>
> - Original Message -
> From: Kym Kovan <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 04, 2000 7:46 AM
> Subject: Re: What am I doing wrong?
>
> > Hi Todd,
> >
> > >If you use  in the Application.cfm file, the  gets executed
> > >every time a page is loaded, regardless if the variable already has its
> > >value or not.  If you use  > >default="mydsn">, the variable is only set if it doesn't already exist.
> I
> > >would guess this provides a slight performance increase which could
> really
> > >add up under heavy use.
> >
> > I wonder about that.  variable,
> > then sets it if it is not there,  >
> > If we are talking template level variables then the  > faster but at the application or server level scopes then which is faster
> a
> > check or a set? First time round the variable has to be set, but after
> that?
> >
> >
> >
> > --
> >
> > Yours,
> >
> > Kym
> > --
> 
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
> >
>
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



vs. (Was - Re: What am I doing wrong?)

2000-07-04 Thread Todd Ashworth

I'm not sure .. anyone else have an opinion?

Todd Ashworth

- Original Message -
From: Kym Kovan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 04, 2000 7:46 AM
Subject: Re: What am I doing wrong?


> Hi Todd,
>
> >If you use  in the Application.cfm file, the  gets executed
> >every time a page is loaded, regardless if the variable already has its
> >value or not.  If you use  >default="mydsn">, the variable is only set if it doesn't already exist.
I
> >would guess this provides a slight performance increase which could
really
> >add up under heavy use.
>
> I wonder about that.  then sets it if it is not there, 
> If we are talking template level variables then the  faster but at the application or server level scopes then which is faster
a
> check or a set? First time round the variable has to be set, but after
that?
>
>
>
> --
>
> Yours,
>
> Kym
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-04 Thread Kym Kovan

Hi Todd,

>If you use  in the Application.cfm file, the  gets executed
>every time a page is loaded, regardless if the variable already has its
>value or not.  If you use default="mydsn">, the variable is only set if it doesn't already exist.  I
>would guess this provides a slight performance increase which could really
>add up under heavy use.

I wonder about that. http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-03 Thread Todd Ashworth

If you use  in the Application.cfm file, the  gets executed
every time a page is loaded, regardless if the variable already has its
value or not.  If you use , the variable is only set if it doesn't already exist.  I
would guess this provides a slight performance increase which could really
add up under heavy use.

Todd Ashworth

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 04, 2000 1:33 AM
Subject: Re: What am I doing wrong?


> >The ## around the DSN are valid, especially if the #dsn# is a variable
that
> >contain the real DSN.  This variable could be set just about anywhere,
but
> >is usually done in the Application.cfm (or other similar file) using the
> >syntax:
>
> >
>
> I do the same, but I have always used .
>
> Are there any performance implications either way, or are both just
different
> ways to do the same thing?
>
> 
> Rob Keniger
>
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-03 Thread rkeniger




>The ## around the DSN are valid, especially if the #dsn# is a variable that
>contain the real DSN.  This variable could be set just about anywhere, but
>is usually done in the Application.cfm (or other similar file) using the
>syntax:

>

I do the same, but I have always used .

Are there any performance implications either way, or are both just different
ways to do the same thing?


Rob Keniger


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-03 Thread Todd Ashworth

The ## around the DSN are valid, especially if the #dsn# is a variable that
contain the real DSN.  This variable could be set just about anywhere, but
is usually done in the Application.cfm (or other similar file) using the
syntax:



This way, if you ever have to change the DSN, you only have to change it in
one place, as opposed to every single place you used that DSN, if it were
hard-coded.  This is generally a good coding practice to follow.

Todd Ashworth

- Original Message -
From: FARHANAHMAD <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 04, 2000 1:15 AM
Subject: Re: What am I doing wrong?


> hello
>
> i am new in cold fusion programming but i check your code and in my
> opnion there is only one syntax error and taht is datasource="#dsn#"
> you can use without hash sign(#) e.g datasource="dsn" if you do this
> your error meghit be remove.
>
>
> Thanks
> Farhan
>
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-03 Thread FARHANAHMAD

hello 

i am new in cold fusion programming but i check your code and in my 
opnion there is only one syntax error and taht is datasource="#dsn#" 
you can use without hash sign(#) e.g datasource="dsn" if you do this 
your error meghit be remove.


Thanks 
Farhan


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?-solved

2000-07-03 Thread Jim McAtee

That's correct.  A WHERE clause is illegal in an insert.  If by wrapping
the insert in a cfif statement you mean to do either an insert or an
update, that's correct.  You'll have some criteria to determine if you're
doing an insert or an update (often this will be if a record id is passed
to the template).  For example:


  
  UPDATE mytable
  SET this = '#form.this#',
  that = #form.that#
  WHERE record_id = #url.record_id#
  

  
  INSERT INTO mytable (this, that)
  VALUES ('#form.this#', #form.that#)
  


Jim


-Original Message-
From: Lisa Greenberg <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, July 03, 2000 12:28 PM
Subject: Re: What am I doing wrong?-solved


>
>--D82B2777473DE9569A6A5589
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>I gather from your statement that it isn't legal to use a where clause.
One solution I thought of is to wrap this insert in a cfif  statement.
Thanks for your help
>
>--Lisa


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?-solved

2000-07-03 Thread Lisa Greenberg


--D82B2777473DE9569A6A5589
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I gather from your statement that it isn't legal to use a where clause. One solution I 
thought of is to wrap this insert in a cfif  statement. Thanks for your help

--Lisa

Jeff Bearer wrote:

> You don't want to use a where clause in an insert statement, if you are
> updating data, you want to use a update statement.
>
> -Jeff
>
> Lisa Greenberg wrote:
> >
> > I am trying to insert data into a table and get the
> > following errors.  I provided the semicolon, yet I still get
> > the errors.  What am I doing wrong?
> >
> > TIA,
> >
> > Lisa
> >
> > ODBC Error Code 37000 (Syntax error or access violation)
> > [ODBC Mircosoft Access Driver] Missing semicolon (;) at end
> > of SQL statement.
> >
> > 
> >   insert into ptobs
> >(pi,patno,PSL_ID,currPI,PIreason,pires_ot,dttype,results,
> > modHAART, intHAART, intreason, fatmaldis, hypergly, gly_pre,
> >
> > hyperlip, lip_pre, lla_yn, ll_agent, lla_dose,
> > anti_dyn,anti_d, antid_ot, antid_ds)
> > values ( '#ptdat.pi#','#variables.patno#',
> >#session.PSL_ID#, '#currPI#',
> > '#attributes.PIreason#',
> > '#attributes.pires_ot#',
> >  #CreateODBCDateTime(variables.dttype)#,
> > '#attributes.results#',
> >  '#attributes.modHAART#',
> >  '#attributes.intHAART#',
> >   '#attributes.intreason#',
> >  '#attributes.fatmaldis#',
> >  '#attributes.hypergly#',
> >  '#attributes.gly_pre#',
> >  '#attributes.hyperlip#',
> >   '#attributes.lip_pre#',
> >   '#attributes.lla_yn#',
> >   '#attributes.ll_agent#',
> >   '#attributes.lla_dose#',
> >  '#attributes.anti_dyn#',
> >  '#attributes.anti_d#',
> >  '#attributes.antid_ot#',
> >  '#attributes.antid_ds#' )
> >  where   demog.PSL_ID=#session.PSL_ID#
> >   ;
> > 
> >
> > --
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

--D82B2777473DE9569A6A5589
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit



I gather from your statement that it isn't legal to use a where clause.
One solution I thought of is to wrap this insert in a cfif  statement.
Thanks for your help
--Lisa
Jeff Bearer wrote:
You don't want to use a where clause in an insert
statement, if you are
updating data, you want to use a update statement.
-Jeff
Lisa Greenberg wrote:
>
> I am trying to insert data into a table and get the
> following errors.  I provided the semicolon, yet I still get
> the errors.  What am I doing wrong?
>
> TIA,
>
> Lisa
>
> ODBC Error Code 37000 (Syntax error or access violation)
> [ODBC Mircosoft Access Driver] Missing semicolon (;) at end
> of SQL statement.
>
> 
>   insert into ptobs
>    (pi,patno,PSL_ID,currPI,PIreason,pires_ot,dttype,results,
> modHAART, intHAART, intreason, fatmaldis, hypergly, gly_pre,
>
> hyperlip, lip_pre, lla_yn, ll_agent, lla_dose,
> anti_dyn,anti_d, antid_ot, antid_ds)
> values ( '#ptdat.pi#','#variables.patno#',
>    #session.PSL_ID#, '#currPI#',
> '#attributes.PIreason#',
> '#attributes.pires_ot#',
>  #CreateODBCDateTime(variables.dttype)#,
> '#attributes.results#',
>  '#attributes.modHAART#',
>  '#attributes.intHAART#',
>   '#attributes.intreason#',
>  '#attributes.fatmaldis#',
>  '#attributes.hypergly#',
>  '#attributes.gly_pre#',
>  '#attributes.hyperlip#',
>   '#attributes.lip_pre#',
>   '#attributes.lla_yn#',
>   '#attributes.ll_agent#',
>   '#attributes.lla_dose#',
>  '#attributes.anti_dyn#',
>  '#attributes.anti_d#',
>  '#attributes.antid_ot#',
>  '#attributes.antid_ds#' )
>  where   demog.PSL_ID=#session.PSL_ID#
>   ;
> 
>
> --
> Archives: http://www.eGroups.com/list/cf-talk">http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
--
Archives: http://www.eGroups.com/list/cf-talk">http://www.eGroups.com/list/cf-talk
To Unsubscribe visit http://www.houseoff

RE: What am I doing wrong?

2000-07-03 Thread Reilly, Jim

Lisa,

A semicolon is not needed in a CF SQL statement
and also you really have an SQL UPDATE cmd since
you have a WHERE clause.  So, you either need to
change the INSERT to UPDATE or remove the WHERE 
clause.   Also, remove the ;

Jim

-Original Message-
From: Lisa Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 03, 2000 2:05 PM
To: cftalk
Subject: What am I doing wrong?



I am trying to insert data into a table and get the
following errors.  I provided the semicolon, yet I still get
the errors.  What am I doing wrong?

TIA,

Lisa


ODBC Error Code 37000 (Syntax error or access violation)
[ODBC Mircosoft Access Driver] Missing semicolon (;) at end
of SQL statement.


  insert into ptobs
   (pi,patno,PSL_ID,currPI,PIreason,pires_ot,dttype,results,
modHAART, intHAART, intreason, fatmaldis, hypergly, gly_pre,

hyperlip, lip_pre, lla_yn, ll_agent, lla_dose,
anti_dyn,anti_d, antid_ot, antid_ds)
values ( '#ptdat.pi#','#variables.patno#',
   #session.PSL_ID#, '#currPI#',
'#attributes.PIreason#',
'#attributes.pires_ot#',
 #CreateODBCDateTime(variables.dttype)#,
'#attributes.results#',
 '#attributes.modHAART#',
 '#attributes.intHAART#',
  '#attributes.intreason#',
 '#attributes.fatmaldis#',
 '#attributes.hypergly#',
 '#attributes.gly_pre#',
 '#attributes.hyperlip#',
  '#attributes.lip_pre#',
  '#attributes.lla_yn#',
  '#attributes.ll_agent#',
  '#attributes.lla_dose#',
 '#attributes.anti_dyn#',
 '#attributes.anti_d#',
 '#attributes.antid_ot#',
 '#attributes.antid_ds#' )
 where   demog.PSL_ID=#session.PSL_ID#
  ;










--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: What am I doing wrong?

2000-07-03 Thread Jeff Bearer

You don't want to use a where clause in an insert statement, if you are
updating data, you want to use a update statement.

-Jeff

Lisa Greenberg wrote:
> 
> I am trying to insert data into a table and get the
> following errors.  I provided the semicolon, yet I still get
> the errors.  What am I doing wrong?
> 
> TIA,
> 
> Lisa
> 
> ODBC Error Code 37000 (Syntax error or access violation)
> [ODBC Mircosoft Access Driver] Missing semicolon (;) at end
> of SQL statement.
> 
> 
>   insert into ptobs
>(pi,patno,PSL_ID,currPI,PIreason,pires_ot,dttype,results,
> modHAART, intHAART, intreason, fatmaldis, hypergly, gly_pre,
> 
> hyperlip, lip_pre, lla_yn, ll_agent, lla_dose,
> anti_dyn,anti_d, antid_ot, antid_ds)
> values ( '#ptdat.pi#','#variables.patno#',
>#session.PSL_ID#, '#currPI#',
> '#attributes.PIreason#',
> '#attributes.pires_ot#',
>  #CreateODBCDateTime(variables.dttype)#,
> '#attributes.results#',
>  '#attributes.modHAART#',
>  '#attributes.intHAART#',
>   '#attributes.intreason#',
>  '#attributes.fatmaldis#',
>  '#attributes.hypergly#',
>  '#attributes.gly_pre#',
>  '#attributes.hyperlip#',
>   '#attributes.lip_pre#',
>   '#attributes.lla_yn#',
>   '#attributes.ll_agent#',
>   '#attributes.lla_dose#',
>  '#attributes.anti_dyn#',
>  '#attributes.anti_d#',
>  '#attributes.antid_ot#',
>  '#attributes.antid_ds#' )
>  where   demog.PSL_ID=#session.PSL_ID#
>   ;
> 
> 
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.