This will do it for you.  Watch out for any unintended line breaks that
might make it into this msg.  

Notice that its not necessary to use tickmarks on a text field.  Use
cfsqltype=CF_SQL_LONGVARCHAR for memo fields.  These sql types can be
used on Access, mySQL, Oracle and MS SQL without causing any trouble.
Haven't tested for a universal date type, yet.

<cfquery 
   DATASOURCE="#request.SiteDSN#">
   UPDATE myFile
   SET 
   myFile.myPath=<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value=#form.myPath#>
   WHERE 
      myFile.IDNUM=<cfqueryparam cfsqltype="CF_SQL_NUMERIC"
value=#blahblah#>
</cfquery>

Cheers,

--Matt Robertson--
MSB Designs, Inc.
http://mysecretbase.com



-----Original Message-----
From: FlashGuy [mailto:flashmx@;rogers.com] 
Sent: Thursday, October 31, 2002 10:01 AM
To: CF-Talk
Subject: Re: MySQL & CF


I see...OK...trying the <cfqueryparam now. Getting "?" inserted into my
database. Must be wrong syntax.
I'll keep trying.

On Thu, 31 Oct 2002 11:53:38 -0600, Paul Giesenhagen wrote:

> \ is an escape character .. .Matt Robertson gave me a good tip .. use
> <cfqueryparam> for your insert and let CF escape all the correct
characters.
> 
> Hope this helps.
> 
> Paul Giesenhagen
> QuillDesign
> 
> ----- Original Message -----
> From: "FlashGuy" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, October 31, 2002 11:46 AM
> Subject: OT: MySQL & CF
> 
> 
> > Hi,
> >
> > Something weird is happening. Before I switched my databases from
Access
> to MySQL my app was working OK.
> > Now when I insert data into my SQL database one of the fields is
getting
> mucked up and I don't know why? Here is an example of a entry how is
> *should* appear in the
> > database:
> >
> > Should be:
> >
> > env_var = book1
> > destination = D:\data\book1
> >
> > This is what getting input into my SQL database:
> >
> > env_var = book1
> > destination = D:|ata|ook1
> >
> > Its like the "\b" is getting interpreted into a wacko ASCII
character?
> >
> > Both fields in my table are varchar(255) types
> >
> >
> > ---------------------------------------------------
> > Colonel Nathan R. Jessop
> > Commanding Officer
> > Marine Ground Forces
> > Guatanamo Bay, Cuba
> > ---------------------------------------------------
> >
> >
> >
> > 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to