RE: funny SQL error - running Postgres
> after an insert... the inserted record can not be found... > it's there, I can see it but this query returns with zero > records found. > > The Details: > First: > INSERT INTO DocsList > (DocsList_ID,filename) > VALUES (746,'H:\UpLoadImages\CmosPic.jpg') > > then sometime later we Check4Duplicate with: > SELECT * > FROM DocsList > WHERE FileName = 'H:\UpLoadImages\CmosPic.jpg' > > This Retuns ZERO Records found. > > but I can see the record plain as day in the database and in > reports etc... > > when I do it with simpler things like 'CmosPic.jpg' there are > no problems > > ??? > > any clues will be very appreciated! I'm no Postgres expert - maybe Jochem will weigh in - but my guess is that the backslashes are metacharacters. You may have to escape them in some way. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184924 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: funny SQL error - running Postgres
Try using the CFQUERYPARAM tag __ Pete Freitag http://www.cfdev.com/ Author of the CFMX Developers Cookbook http://www.petefreitag.com/bookshelf/ ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184930 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: funny SQL error - running Postgres
Yep '\ is reserved in Postgres, and CF doesn't escape it like it auto-escapes apostrophe. I think \\ is the escape for it, so turning 'H:\UpLoadImages\CmosPic.jpg' into 'H:\\UpLoadImages\\CmosPic.jpg' may work. Also, cfqueryparam may clear it up completely. Someone here is bound to know more than me. -- For Tabs, Trees, and more, use the jComponents: http://clearsoftware.net/client/jComponents.cfm ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184932 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: funny SQL error - running Postgres
YES ! Thank you... was using it for the INSERT but not for the SELECT... rumor has it that it should be used for EVERYTHING... but alas I find it hard to buckle down and upgrade all the queries. Thanks Pete, Very Much Appreciated! Gonz On Fri, 19 Nov 2004 16:12:55 -0500, Pete Freitag <[EMAIL PROTECTED]> wrote: > Try using the CFQUERYPARAM tag > > __ > Pete Freitag > http://www.cfdev.com/ > Author of the CFMX Developers Cookbook > http://www.petefreitag.com/bookshelf/ > > > ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184934 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54