Carol, I'm pretty new to ORM myself and just had a pretty similar issue. What I ended up doing was defining the SQL type in my properties.
property name="id" ormtype="int" sqltype="integer" column="AccountID" generator="identity"; Also, you probably want to set your dialect in your ormsettings. dialect = MicrosoftSQLServer On Fri, Feb 4, 2011 at 9:30 PM, Carol F <[email protected]> wrote: > > 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:341871 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

