Those errors are because you need to stop and restart the Application, the
most effective way is to change the Application name. The reason is that the
ORM is cached with the Entites, therefore a change will not take place until
the Application is restarted, hence the errors you are getting.


Regards,
Andrew Scott
http://www.andyscott.id.au/



> -----Original Message-----
> From: Carol F [mailto:[email protected]]
> Sent: Saturday, 5 February 2011 1:31 PM
> To: cf-talk
> Subject: dbcreate set to "update", then errors out
> 
> 
> Hi I'm a noobie with CF and ORM.  I'm using SQL Server 2008
> 
> I have a test CF app, and I have the ormSettings.dbcreate set to "update",
> like so:
>     this.ormSettings = {
>         datasource = "dsn",
>         dbcreate = "update",
>         schema = "dbo",
>         logsql = true
>     };
> 
> Here's my Account.cfc
>     component persistent="true" {
>         property name="id" column="AccountID" generator="identity";
>         property name="username";
>         property name="password";
>         property name="datecreated";
>     }
> 
> Here's my test.cfm, in cfscript:
>     ormReload()
>     x = new Account();
>     x.setUsername("user1");
>     x.setPassword("pw1");
>     entitySave(x);
> 
> It was working at first, so I decided to delete the database from the SQL
side
> (via Management Studio).
> 
> So now, when I reload test.cfm, I get this error:
> 
> Error in executing the DDL.[Macromedia][SQLServer JDBC
> Driver][SQLServer]Identity column 'AccountID' must be of data type int,
> bigint, smallint, tinyint, or decimal or numeric with a scale of 0, and
> constrained to be nonnullable.
> I tried changing dbcreate to "dropcreate", and I get the same error, but
this
> new message is there as well:
> 
> [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot drop the table
> 'dbo.Account', because it does not exist or you do not have permission.
> 
> How do I get it working again?  I tried restarting the service, but that
did not
> help.  I even recreated the table, and CF dropped it but I still get the
"Error in
> executing the DDL" error.
> 
> Thanks!
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-
> Anthology/dp/1430272155/?tag=houseoffusion
> Archive: http://www.houseoffusion.com/groups/cf-
> talk/message.cfm/messageid:341870
> Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> Unsubscribe: http://www.houseoffusion.com/groups/cf-
> talk/unsubscribe.cfm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341872
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to