|
We ran into this occasionally also. We hacked the
field.cfc to get around this. I have a few ideas why this happens, but no
testable examples atm.
Field.cfc Line 108 add default="" to
<cfargument name="default" hint="I am the default
value of this field" required="yes" default="" type="string"
/> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Cole Sent: Friday, February 10, 2006 2:22 PM To: [email protected] Subject: Reactor For CF error with default column values Hi Folks,
I've only just joined this list, so my apologies if this has already been answered.
I used the following script to create a table: CREATE TABLE guestbook ( guestbookID int IDENTITY(1,1) PRIMARY KEY CLUSTERED, creationDate datetime NOT NULL DEFAULT GETDATE(), modifiedDate datetime NOT NULL DEFAULT GETDATE(), active bit NOT NULL DEFAULT 1, guestName nvarchar(255) NOT NULL DEFAULT '', message ntext NOT NULL DEFAULT '', cfid int NULL, ip varchar(15) NULL, acceptLanguage varchar(255) NULL, countryCode char(2) NULL, countryName nvarchar(255) NULL )
When I try the following code: GuestbookRecord = reactor.createRecord("Guestbook");
It gives the following error: The parameter DEFAULT to function setDefault is required but was not passed in.
The error occurred in C:\CFusionMX7\components\Reactor\data\mssql\ObjectDao.cfc:
line 78 76 : <cfset Field.setCfSqlType(getCfSqlType(qFields.dbDataType)) />77 : <cfset Field.setLength(qFields.length) />78 : <cfset Field.setDefault(getDefault(qFields.default, Field.getCfDataType(), Field.getNullable())) />79 : 80 : <!--- add the field to the table --->
If I remove the default values from the table creation script it works fine.
I've tried the ReactorBlog sample app and it seems to work ok and also uses getdate() defaults.
Any suggestions?
Thanks,
Gareth **************************************************************************** This email may contain confidential *************************************************************************** |
- Reactor For CF error with default column values Gareth Cole
- RE: Reactor For CF error with default column valu... Porter, Benjamin L.
- RE: Reactor For CF error with default column ... Gareth Cole
- RE: Reactor For CF error with default col... Doug Hughes

