This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm having an issue when using a legacy SQLite database that uses the UNIQUEIDENTIFIER column type for Guids. I can query the table using Dapper and the System.Data.SQLite provider (both from Nuget), but Lightspeed says it can't convert a String to Guid:
I've tried the BinaryGuid=False trick but without much luck. Do I need to convert the columns to CHAR(36)? |
|
|
No, Ill add in a check to test if its a GUID first, we currently expect that its going to come back to us from the ADO.NET provider as a string. Ill let you know once this is in the nightlies, as with the other fix it should be early next week :)
|
|
|
This will be available in the next nightly build.
|
|
|
Thanks for this, it reads UNIQUEIDENTIFIER columns fine now but it looks like there's a bigger issue with the WHERE clause with UNIQUEIDENTIFIER columns that might be a complete pain in the arse to fix. The reason I'm using UNIQUEIDENTIFIER instead of TEXT or CHAR(36) is NHibernate's schema tool created it this way in previous versions of the application, but now in order to query the column if it's a UNIQUEIDENTIFIER you have to turn the Guid into its number format and prefix it with an X:
Converting the binary blob data of a UNIQUEIDENTIFIER to a varchar just brings back garbage. I don't think you can use this SQL format if it's CHAR or TEXT either, as far as I know. I've written a custom tool to support SQLite upgrades to the new schema so it's not a big issue for me, but probably worth knowing about. |
|