Ok. Setting BinaryGUID=False in the connection does work.
However, there are weveral bugs.
1. In the Server Explorer, if you edit advanced settings to set Binary Guid to
False, it will generate "binary guid=False" instead of "BinaryGUID=False"
2. When generating LINQ Select queries and
I did some more tests. The way it handles GUID between text and binary is
screwed up.
When updating data, it will update as binary even if BinaryGUID is false.
When selecting data, however, it tries to select it as plain text so nothing
matches the query.
Etienne
From:
Oh. I see what you were trying to say. The error I was having was not because
GUID isn't supported, but because it was trying to interpret the data as binary
while it was stored as text, thus the request failed.
I just tried creating a new table with a primary key of type
'uniqueidentifier',
Etienne Charland wrote:
>
> I just tried creating a new table with a primary key of type
> 'uniqueidentifier', and adding data into it. It shows up as
> binary data.
>
This is also controlled by the "BinaryGUID" (no spaces) connection
string property. Here is an example connection string:
The point I'm trying to make is not about whether GUID gets stored as binary or
text... but rather that currently it's not working at all.
There's no reason why GUIDs shouldn't be supported and should crash when trying
to do an update.
Etienne
> From: sqlite at mistachkin.com
> To:
Etienne Charland wrote:
>
> The point I'm trying to make is not about whether GUID gets stored as
> binary or text...
>
First, the exception being thrown here originates from deep within the .NET
Framework itself and indicates that the number of rows impacted by the query
did not match
SQLite doesn't have support for many data types, but in fact it just doesn't
have many restrictions. It doesn't have data types but affinities.
When defining a column as "uniqueidentifier" in SQLite, it still stores the
data as text. It would be the .NET provider's job to convert it back and
Etienne Charland wrote:
>
> When defining a column as "uniqueidentifier" in SQLite, it still stores
the
> data as text. It would be the .NET provider's job to convert it back and
> forth to Guid.
>
This depends on the value of the BinaryGUID connection string property. You
might want to
Thanks! If I change the column type from UNIQUEIDENTIFIER to TEXT, it works.
Only thing is, the code then maps to String instead of Guid. Is there any way
to keep the .NET code working with Guid classes?
I'm also seeing that BIT data type isn't supported and should be replaced by
INT. However,
On 30 May 2015, at 4:48am, Etienne Charland wrote:
> I think I found where the problem is coming from. I did an automated database
> conversion from SQL Server. Most primary keys are GUIDs. In SQLite, these
> columns are still defined as 'uniqueidentifier' which is not a valid data
> type.
I think I found where the problem is coming from. I did an automated database
conversion from SQL Server. Most primary keys are GUIDs. In SQLite, these
columns are still defined as 'uniqueidentifier' which is not a valid data type.
If I try updating a table that has INT primary key, then it
I tried this very basic code on a very basic table that contains no DATETIME
field.
var Obj = context.MediaCategories.FirstOrDefault();
Obj.Folder = "test";
context.SaveChanges();
The table has this format
- MediaCategoryId GUID Primary Key
- MediaTypeId INT
- Name NVARCHAR
- Folder NVARCHAR
I
Your issue might be related to this:
https://system.data.sqlite.org/index.html/tktview/4bbf851fa5b26c1ca74a
However, it's difficult to determine without seeing the database and the SQL
generated from the LINQ code.
--
Joe Mistachkin
13 matches
Mail list logo