SqlCompact Store - Long value data type cannot be indexed

Nov 16, 2009 at 11:50 PM


I'm working through the Retina.NET QuickStart Guide and have hit a problem (Latest Retina.NET, VS 2008, .NET3.5 - and VB.)

I want to use a Compact SQL back-end for storage.  Initially I had a problem where storeBuilder.Create wouldn't create an SDF file, giving an Object not set to instance (etc.) error.  I got around that by using the SqlServerCe.SqlCeEngine to create the SDF file.

Now, the code's failing when attempting to create the table - 

storeBuilder.CreateTable(GetType(myEntity), True)

... fails with "Long value data type cannot be indexed".

The entity I'm attempting to store is identical to that in the QuickStart (pages 8 to 9)

Any help would be greatly appreciated!




Nov 20, 2009 at 4:20 PM

An update -

I'm guessing the problem is with Retina trying to create an index on the guid-type row id column.  I thought SQLCompact supported this?  If not, is there an IdGenerator which implements numeric ID columns?  How have other people used Retina with SQLCompact databases?



Nov 24, 2009 at 9:36 AM

Ok - I've fixed this:

The constructor for the SQL Compact DataStore wasn't instantiating the database engine for all overloads.  Once I added that in, the database file was created correctly.  From then on, I didn't get the "Long value data type.." error.



Nov 24, 2009 at 9:44 PM

Thanks for your time, the SQL Compact DataStore is not really fully tested, so I will fix this in the next release.

Best regards,


Nov 25, 2009 at 3:46 PM

That's great -- thanks!

By the way, great work on Retina.NET!  I've been playing with Ruby on Rails for a bit, and have been wishing there was something as straight-forward for entity persistence in .NET -- so I'm pleased I discovered Retina!