SQLite ADO .NET: how to specify a default value for GUID? -


As I searched earlier, the SQLieParameter (parametrized query) should not be used for "create tables" Could. I need to create a table with the GUID field and I should have a default value of all zeros. But the following questions:

  prepare a table test (the name text defaults to 'no name', id good default 0)  

creates a table In which adding items and reading it does not read a GUID again (SQLiteDataReader.GetGuid () raises exceptions). Perhaps nobody knows how to properly define a default GUID value for "Create a table" in SQLite ADO .NET?

One of these things can work:

Text default 'no name', id Good default ('00000000-0000-0000-0000-000000000000'))

Create a table test (name text defaults' no name ', id guid default (' { 00000000-0000-0000-0000-000000000000} '))


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -