Gareth, I can't answer your question.  However I can save you a couple of lines of code on what you *do* have:

myRecord = reactor.createRecord("MyTable");
myRecord.setMyPK(1);
myRecord.load();

Could be written as:

myRecord = reactor.createRecord("MyTable").load(MyPK=1);

I realize that isn't particularly helpful on your NULL issue, however.  Good luck.

~Dave


On 7/14/06, Gareth Cole <[EMAIL PROTECTED]> wrote:

Hi Folks,

 

My apologies for posting this again, but I'm really stuck.

Reactor has been really great for my current project and saved me loads of time, but until I figure out a way of doing this, I can't launch the site.

 

Basically what I want to do is:

 

myRecord = reactor.createRecord("MyTable");

myRecord.setMyPK(1);

myRecord.load();

 

myRecord.setMyCol(null); // where my 'myCol' is an integer database table that can be null

myRecord.save();

 

The problem is setting the column to null. Not passing an argument throws an error, likewise does passing an empty string.

 

I'd really appreciate if someone could show me how to do this with reactor, or at least point me in the right direction. I'd imagine this is a fairly common database task, so someone must have tried this before.

 

Thanks,

 

Gareth

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Gareth Cole
Sent: 13 July 2006 18:04
To: [email protected]
Subject: [Reactor for CF] updating a column to NULL

 

Hi,

 

one of my tables has an integer column 'myCol' that can be NULL.

 

I can set this to an integer, but I'm having trouble setting it to NULL:

 

setMyCol() throws an error because there's no argument passed

setMyCol("") throws an error because the argument isn't numeric

 

How can I do this using reactor?

 

Thanks


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com
www.worldwildweb.biz
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to