Error: null null

2010-11-12 Thread Robert Harrison
I made a change to a data base table on SQL server 2008 and added a field. Now I'm getting the error: null null The error occurred on line -1. RootCause: (structure - not printed) StackTrace: java.lang.NullPointerException Message:

Re: Error: null null

2010-11-12 Thread Jerry Johnson
In my experience, this is usually caused by a date field being NULL unexpectedly, and CF trying to treat it as a date. FWIW Jerry Milo Johnson On Fri, Nov 12, 2010 at 9:59 AM, Robert Harrison rob...@austin-williams.com wrote: I made a change to a data base table on SQL server 2008 and

Where to put your code

2010-11-12 Thread Paul Alkema
Hi All, I recently had a discussion with some other programmers on my team dealing with where to put application code and when. This is a small little guide I wrote that I try to use and I wanted some second opinions on my coding logic. Thanks, Paul

RE: Where to put your code

2010-11-12 Thread Paul Alkema
Oh yeah. Of course ideally we would be on an MVC framework but we can't do that due to internal reasons. This doc is for those not on an MVC. Don't want any non MVC haters to yell at me. Haha. Paul Alkema ~| Order the

Re: Where to put your code

2010-11-12 Thread Scott Stewart
I'd only modify it a little: Straight on CFM Page Should Contain: UI or presentation code. HTML, JavaScript, simple ColdFusion to implement UI/Presentation (IE; does var.foo exist output etc..). Should Not Contain: Application Logic. Processes or functions. Includes Should Contain:  reusable

Re: Error: null null

2010-11-12 Thread Tony Bentley
What? You don't know what null null means? It's pretty self explanatory :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive:

RE: Error: null null

2010-11-12 Thread Robert Harrison
What? You don't know what null null means? It's pretty self explanatory :) I'm assuming that's a joke, but in case it's not... please explain. I don't have a clue what it means and a search is coming up short on answers. Strangely, the error has just gone away and I did nothing? Robert

Re: Error: null null

2010-11-12 Thread Tony Bentley
I think it's a date conversion issue. I know, debugging can be frustrating when it isn't working right. - Tony Bentley (sent from iPhone) On Nov 12, 2010, at 8:01 AM, Robert Harrison rob...@austin-williams.com wrote: What? You don't know what null null means? It's pretty self explanatory :)

RE: Error: null null

2010-11-12 Thread Robert Harrison
That table has USER ID (varchar) , PASSWORD (varchar) and a bunch of bit fields (default value (0)). No dates. Regardless, the error just went away. Thanks Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600

RE: Where to put your code

2010-11-12 Thread Paul Alkema
I agree with those additions. Thanks! -Original Message- From: Scott Stewart [mailto:webmas...@sstwebworks.com] Sent: Friday, November 12, 2010 10:46 AM To: cf-talk Subject: Re: Where to put your code I'd only modify it a little: Straight on CFM Page Should Contain: UI or

Re: Where to put your code

2010-11-12 Thread Russ Michaels
You cannot really apply such rules to everyone. If someone just has a very simple mostly flat, then using mvc frameworks and CFC's will probably be overkill and create 10 x more code is actually required. In those situations you are probably just going to use some cfm pages and maybe a few

Re: Where to put your code

2010-11-12 Thread Tony Bentley
Here is my opinion:* templates* Contains: object instances to render into HTML, conditionals for output, formatting methods Does Not Contain: dynamically rendered CSS, dynamically rendered JavaScript, patterns, methods. also any business, data and file management logic that can be written in

RE: Where to put your code

2010-11-12 Thread Paul Alkema
I work on a fairly large team for a large multi-million dollar ecommerce corporation. I can see if your building small application for small websites and you're not on a team of people working on the same website how it might not be ideal to have guidelines set up like these. I think in a team

Re: Where to put your code

2010-11-12 Thread Gerald Guido
My only exceptions to these would be: Includes Should Not Contain: Application Logic. Processes or functions. A lot of times (depending on the app) I stick functions (UDFs) in an include. I have a lot of utility functions that (arguably) don't really need to be in a cfc. Custom Tags

Re: Where to put your code

2010-11-12 Thread Scott Stewart
while you may not use MVC on every app, sticking to certain guidelines like what code to put where, also known as includes vs custom tags vs cfc, along with the use of external JS and CSS will make any app development smoother.. On Fri, Nov 12, 2010 at 12:20 PM, Russ Michaels r...@michaels.me.uk

MS SQL Default CF User

2010-11-12 Thread Doug Ford
Hi folks - I am trying to lock down my MS SQL server access when CF access it. I have set up a user password, gave it the right permissions, put that U/N and p/w into my code and that works. The problem I have is that CF still allows default access to the DB. So whether I use the U/N or

RE: Where to put your code

2010-11-12 Thread Paul Alkema
Hm, I respectfully disagree with putting functions in cfm pages entirely no matter how it's being pulled. I think there's a place for functions and that's in cfcs. You say you have a lot of utility functions that don't need to be in a cfc. If you have a lot of them, why not just create a cfc

Re: Where to put your code

2010-11-12 Thread Gerald Guido
You say you have a lot of utility functions that don't need to be in a cfc. If you have a lot of them, why not just create a cfc called utility and stick them all in one cfc? Huh... That is exactly what I thought to myself right after I hit send. i.e., huh that is kinda dumb It would

Re: MS SQL Default CF User

2010-11-12 Thread Dave Watts
I am trying to lock down my MS SQL server access when CF access it. I have set up a user password, gave it the right permissions, put that U/N and p/w into my code and that works. The problem I have is that CF still allows default access to the DB. So whether I use the U/N or P/W, both

Re: MS SQL Default CF User

2010-11-12 Thread Jacob Munson
Did you change the UN/PW in your datasource? If you change it there, then all connections to your DB using that datasource will go through your new UN/PW. On Fri, Nov 12, 2010 at 10:55 AM, Doug Ford doug.e.f...@gmail.com wrote: Hi folks - I am trying to lock down my MS SQL server access

Re: Where to put your code

2010-11-12 Thread Dave Watts
While I might prefer to do things the way you describe, I hesitate to call these things best practices. Hm, I respectfully disagree with putting functions in cfm pages entirely no matter how it's being pulled. I think there's a place for functions and that's in cfcs. You do realize there

Re: MS SQL Default CF User

2010-11-12 Thread Doug Ford
Hi Dave - To be honest, I am not sure. My company is hosting the site at an ISP. I do have direct access to the machine, but I don't know how it was set up. But I think it might have been using Windows Authentication. Thanks, Doug I am trying to lock down my MS SQL server access when CF

Re: MS SQL Default CF User

2010-11-12 Thread Doug Ford
Hi Jacob - The UN/PW in the data source is blank. I was thinking that if I assigned a bogus un/pw to the DSN, but send over the correct info through the cfquery tag, then perhaps, anybody doing a cfquery without the un/pw will fail. But that didn't work. Did you change the UN/PW in your

Re: MS SQL Default CF User

2010-11-12 Thread Jacob Munson
Is there a reason why you don't want to put the correct UN/PW into the data source? On Fri, Nov 12, 2010 at 11:11 AM, Doug Ford doug.e.f...@gmail.com wrote: Hi Jacob - The UN/PW in the data source is blank. I was thinking that if I assigned a bogus un/pw to the DSN, but send over the

Re: MS SQL Default CF User

2010-11-12 Thread Doug Ford
I am trying to add a level of security that if someone was able to access the server and upload a file to read the SQL tables, I wanted to make sure that without the proper password, a cfquery without a u/n p/w, would fail in the attempt. It's just all for security. Is there a reason why

Re: MS SQL Default CF User

2010-11-12 Thread Jacob Munson
I haven't tried this, but I wonder if you could create a user that has 0 privileges. Maybe just give it read rights on tempdb, but nothing else. And then put that into your data source. So it's a valid user, but it can't access the sensitive databases. On Fri, Nov 12, 2010 at 11:21 AM, Doug

Re: MS SQL Default CF User

2010-11-12 Thread Russ Michaels
It really should not be possible to query the database without a username/password. The only way this is possible is if a) the login is in the DSN b) guest access has been allowed on the db without a login c) windows authentication is used and you are connecting as the coldfusion service user

Re: Where to put your code

2010-11-12 Thread Russ Michaels
the power of CF is in its simplicity. A newbie can come along and just learn a handful of tags and functions to develop a web site. The next step up is CFC's, frameworks and OOP Some people simply will not want or need to learn anything beyond the handful of tags and functions if this is

Re: MS SQL Default CF User

2010-11-12 Thread Doug Ford
Hi Jacob - I will have to give it a try later on. Thanks. I haven't tried this, but I wonder if you could create a user that has 0 privileges. Maybe just give it read rights on tempdb, but nothing else. And then put that into your data source. So it's a valid user, but it can't access the

Re: MS SQL Default CF User

2010-11-12 Thread Doug Ford
Hi Russ - I do have access to the CFAdmin, and right now the User Name and Password is blank. That's the first things I checked on. So I need to figure out if I am using the guest access or as the service user. If it's B or C, is there anything that can be done? Thanks. Doug It really

Re: MS SQL Default CF User

2010-11-12 Thread Russ Michaels
well if u have access to the cfadmin then you are not using shared hosting, so you must have your own dedicated server or VPS. In which case you need to remotely login to the server and check how the database is configured. Russ On Fri, Nov 12, 2010 at 7:10 PM, Doug Ford doug.e.f...@gmail.com

Working with cfqueryparam

2010-11-12 Thread David Moore
Seems to me that there is a lot more to cfqueryparam than I have been utilizing. I built the following query using as many elements of cfqueryparam as I could find based on examples from CF-Talk and other resources. I would love to get expert opinion from those on this forum in an effort to

RE: Error: null null

2010-11-12 Thread Al Musella, DPM
the problem was that coldfusion was caching the database structure so it didn't know that field was there. After the cache was cleared, everything works. At 11:38 AM 11/12/2010, you wrote: That table has USER ID (varchar) , PASSWORD (varchar) and a bunch of bit fields (default value (0)). No

Re: Working with cfqueryparam

2010-11-12 Thread Dave Watts
Seems to me that there is a lot more to cfqueryparam than I have been utilizing. I built the following query using as many elements of cfqueryparam as I could find based on examples from CF-Talk and other resources. I would love to get expert opinion from those on this forum in an effort

Re: Working with cfqueryparam

2010-11-12 Thread David Moore
I guess the question would be, are there better or more proficient ways to write these cfqueryparams? I haven't been able to find a lot of complete documentation on the use of cfqueryparam. Just bits and pieces here and there. So I tried to build in as many instances and different uses as I

Re: Working with cfqueryparam

2010-11-12 Thread Dave Watts
I guess the question would be, are there better or more proficient ways to write these cfqueryparams? I haven't been able to find a lot of complete documentation on the use of cfqueryparam. Just bits and pieces here and there. So I tried to build in as many instances and different uses as

Making check box values separate variables

2010-11-12 Thread Monique Boea
Hello All. I'm pretty sure that this is something very simple and I am over thinking it but here is my issue: I have a form with dynamically created input boxes one of which can be a checkbox. When the user submits the form, of course the checkbox field is submited as one, but with 2 values

Re: Making check box values separate variables

2010-11-12 Thread Michael Grant
You're just going to have to write some logic to loop over the values that are a list. On Fri, Nov 12, 2010 at 3:59 PM, Monique Boea moniqueb...@gmail.com wrote: Hello All. I'm pretty sure that this is something very simple and I am over thinking it but here is my issue: I have a form

Re: Making check box values separate variables

2010-11-12 Thread Tony Bentley
use listgetat(form.checkboxa,1, ) and listgetat(form.checkboxa,2, ) and keep them as one value in the value field in the checkbox input value=4454 16829 type=checkbox ~| Order the Adobe Coldfusion Anthology now!

Re: Making check box values separate variables

2010-11-12 Thread Gerald Guido
Form Utilities CFC would work nicely for that sort of thing. http://formutils.riaforge.org/ http://www.briankotek.com/blog/index.cfm/2007/9/4/Implicit-Creation-of-Arrays-and-Structures-from-Form-Fields On Fri, Nov 12, 2010 at 3:59 PM, Monique Boea moniqueb...@gmail.com wrote: Hello All.

Re: Where to put your code

2010-11-12 Thread Mike Chabot
In my option, putting functions and application logic in cfm files, include files, and custom tags is fine. The vast majority of ColdFusion Web sites allow developers to do this and I think adding these restrictions could lead to a worse outcome. If you hire an expert developer, and that expert

Re: Working with cfqueryparam

2010-11-12 Thread Matthew Lowrey
In addition to your examples, you'd also want to use CFQUERYPARAM any time you have any user-entered or untrusted data within a query - not just within INSERT/UPDATE/DELETE queries. Hi Dave: You already know about this thread because you're on it, but wanted to post it again in case these

Re: Where to put your code

2010-11-12 Thread James Holmes
Why not create the CFC in the application scope to cache it in RAM? -- WSS4CF - WS-Security framework for CF http://wss4cf.riaforge.org/ On 13 November 2010 06:22, Mike Chabot mcha...@gmail.com wrote: I prefer using include files and caching common functions in RAM when the application

Re: Where to put your code

2010-11-12 Thread James Holmes
I'd argue that CF didn't allow for well written applications before CFCs came along. -- WSS4CF - WS-Security framework for CF http://wss4cf.riaforge.org/ On 13 November 2010 02:16, Dave Watts dwa...@figleaf.com wrote: Functions existed well before CFCs - does that mean that well-written

Re: Working with cfqueryparam

2010-11-12 Thread James Holmes
In this; cfqueryparam cfsqltype=cf_sql_date value=#CreateODBCDateTime(Now())#/ CreateODBCDateTime() is unnecessary. Also; cfqueryparam cfsqltype=cf_sql_integer value=#Trim(FORM.Contributed)# null=#IIF(Trim(FORM.Contributed) EQ '', true, false)# can be reduced to this cfqueryparam

Re: Working with cfqueryparam

2010-11-12 Thread Michael Grant
null=#Trim(FORM.Contributed) EQ ''# I like this. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive:

Re: Working with cfqueryparam

2010-11-12 Thread Dave Watts
null=#Trim(FORM.Contributed) EQ ''# I like this. I find this easier to read: null=#yesNoFormat(len(trim(form.contributed)))# just because the nested quotes can be confusing. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a

Re: Where to put your code

2010-11-12 Thread Mike Chabot
If people put utility functions in CFCs I definitely recommend caching these in RAM. However, what I see many people do is instantiating a large CFC that consists only of functions, calling one tiny function inside of it, then destroying the CFC, with no caching used at all. The majority of

Re: CF Blog software

2010-11-12 Thread Sean Corfield
On Thu, Nov 11, 2010 at 1:40 AM, Russ Michaels r...@michaels.me.uk wrote: could we have an example ? An example of what? -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're