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
Called from C:\CFusionMX7\components\Reactor\data\mssql\ObjectDao.cfc: line 8
Called from C:\CFusionMX7\components\Reactor\core\objectFactory.cfc: line 104
Called from C:\CFusionMX7\components\Reactor\core\objectFactory.cfc: line 29
Called from C:\CFusionMX7\components\Reactor\reactorFactory.cfc: line 15
Called from C:\sites\glasgowwindband.co.uk\www\_view\vTheBand\vGuestbook\dsp_questbookEntries.cfm: line 3
Called from C:\sites\glasgowwindband.co.uk\www\parsed\guestbook.view.cfm: line 31
Called from C:\sites\glasgowwindband.co.uk\www\parsed\guestbook.view.cfm: line 1
Called from C:\sites\glasgowwindband.co.uk\www\fusebox4.runtime.cfmx.cfm: line 433
Called from C:\sites\glasgowwindband.co.uk\www\fusebox4.runtime.cfmx.cfm: line 426
Called from C:\sites\glasgowwindband.co.uk\www\fusebox4.runtime.cfmx.cfm: line 1
Called from C:\sites\glasgowwindband.co.uk\www\index.cfm: line 5

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

Reply via email to