RE: Build SQL Statement and cfqueryparam

2005-04-28 Thread Dave Merrill
IIRC Isaac Dealey wrote up an amazing database sniffer of sorts that can figure all this out by itself, but its probably overkill here. Still its an absolute gem that I really need to start using myself. Heh... thanks for the plug Matt... :) Yea, it's probably more than you need,

Re: Build SQL Statement and cfqueryparam

2005-04-28 Thread Matt Robertson
Isaac, do you have a direct link for that article? It's probably right in front of my face, but I didn't see it, and their search engine is down. Its in his sig line on his post. http://www.sys-con.com/author/?id=4806 After making the examples work on my own, it was one of the few times I

Re: Build SQL Statement and cfqueryparam

2005-04-28 Thread Matt Robertson
whoops! Sys-con has rebuilt their site and disabled Search. I really should have copied all that stuff down. Isaac, can you help? -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a

Re: Build SQL Statement and cfqueryparam

2005-04-28 Thread S . Isaac Dealey
Well that's interesting... the author link in my sig doesn't work anymore -- looks like someone accidentally deleted the index.cfm in that directory -- and when I hit the link, I get the directory listing, even though, if I remove the query string, I get the 403 forbidden error... that can't be

Re: Build SQL Statement and cfqueryparam

2005-04-27 Thread Jochem van Dieten
Tom McNeer wrote: I need to build a SQL update statement dynamically, based on what form fields are being passed in at a particular time. No problem. Many of the fields are longish text fields, which may have single quotes within them. I can determine the datatype of each passed field by

Re: Build SQL Statement and cfqueryparam

2005-04-27 Thread Matt Robertson
You should have no problem with this. I wrote a free tool called GridMonger that has SQL inserts and updates that run completely conditionally. They take a list of parameters and use those to decide how to build the SQL. What you're describing sounds simpler than that, but you can look at code

Re: Build SQL Statement and cfqueryparam

2005-04-27 Thread S . Isaac Dealey
Hi, I need to build a SQL update statement dynamically, based on what form fields are being passed in at a particular time. The database is MS SQL Server. snip But this doesn't seem possible, since I have to output the SQL string in the cfquery statement. I can build the cfqueryparam

Re: Build SQL Statement and cfqueryparam

2005-04-27 Thread S . Isaac Dealey
IIRC Isaac Dealey wrote up an amazing database sniffer of sorts that can figure all this out by itself, but its probably overkill here. Still its an absolute gem that I really need to start using myself. Heh... thanks for the plug Matt... :) Yea, it's probably more than you need, but

Re: Build SQL Statement and cfqueryparam

2005-04-27 Thread Tom McNeer
Thanks to all, especially to Isaac for his very specific example. I'm not sure why I felt it necessary to build the SQL statement outside the cfquery. -- perhaps because I've seen others demonstrate handling dynamic SQL in that manner. But of course, simply putting all the logic within the cfquery