Original Message-
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Tim Butterfield
> Sent: Friday, May 06, 2011 9:31 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] System.Data.SQLite blob column excepti
ehalf Of Tim Butterfield
Sent: Friday, May 06, 2011 9:31 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] System.Data.SQLite blob column exception
I am using a DbDataReader to return the columns for a SQL SELECT
statement. For the blob column, I am calling reader.GetOrdinal to ge
[email protected]] On Behalf Of Tim Butterfield
> Sent: Friday, May 06, 2011 8:58 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] System.Data.SQLite blob column exception
>
> On Fri, May 6, 2011 at 7:44 AM, Simon Slavin wrote:
>>
>> On 6 May 2011, a
: General Discussion of SQLite Database
Subject: Re: [sqlite] System.Data.SQLite blob column exception
On Fri, May 6, 2011 at 7:44 AM, Simon Slavin wrote:
>
> On 6 May 2011, at 3:43am, Tim Butterfield wrote:
>
>> The blob values are always inserted and read as a byte[]. If those
>
On 6 May 2011, at 4:58pm, Tim Butterfield wrote:
> I'm using the System.Data.SQLite interface and not the direct C
> interface methods. All of my inserts are done using DbParameter (@p1,
> @p2, etc.) and DbCommand insert statements. The DbParameter.Value is
> the C# object type. In the case of
On Fri, May 6, 2011 at 7:44 AM, Simon Slavin wrote:
>
> On 6 May 2011, at 3:43am, Tim Butterfield wrote:
>
>> The blob values are always inserted and read as a byte[]. If those
>> bytes are those of a text file, it fails. If I add a leading 0x00
>> byte to force it to be binary, it works.
>
> Ar
On 6 May 2011, at 3:43am, Tim Butterfield wrote:
> The blob values are always inserted and read as a byte[]. If those
> bytes are those of a text file, it fails. If I add a leading 0x00
> byte to force it to be binary, it works.
Are you binding your parameters ? If so, check that you're using
On Thu, May 5, 2011 at 7:16 PM, Simon Slavin wrote:
>
> On 6 May 2011, at 12:17am, Tim Butterfield wrote:
>
>> Since my blob column can
>> contain either text or binary file data, both cases are valid. Does
>> VerifyType need to add a valid DbType.Binary for case
>> TypeAffinity.Text or is someth
On Fri, May 6, 2011 at 2:16 AM, Simon Slavin wrote:
> SQLite allows any column to contain values of any type. If
> SQLiteDataReader.VerifyType is to respect that then I don't think it has any
> use at all. On the other hand, if you choose to use it with your database,
> then presumably you shou
On 6 May 2011, at 12:17am, Tim Butterfield wrote:
> Since my blob column can
> contain either text or binary file data, both cases are valid. Does
> VerifyType need to add a valid DbType.Binary for case
> TypeAffinity.Text or is something else going on here?
SQLite allows any column to contain
SQLiteDataReader.VerifyType thows an exception if it does not find
matching DbType and TypeAffinity. I found a case where a select on
several columns, one of which is type blob, had TypeAffinity.Text for
that column instead of TypeAffinity.Blob. If the column has binary
data, TypeAffinity.Blob(4)
11 matches
Mail list logo