Re: [sqlite] Selecting from view with System.Data.SQLite throws
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Joe Mistachkin Sent: Saturday, April 8, 2017 1:18 PM To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Selecting from view with System.Data.SQLite throws > What is the declared data type for the column? Also, what are the raw > values for the first row? You may want to use the SQLite command line tool > to query the database for them. I was selecting from all columns which were declared as either INT or TEXT. I resolved it unintentionally by removing an alias as it was a single select on the one view and did not need any aliasing. The command text went from: SELECT s.Id, s.foo ... FROM SomeView s WHERE s.bar = @bar; to: SELECT Id, foo ... FROM SomeView WHERE bar = @bar; Odd... Thanks, jlc ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Selecting from view with System.Data.SQLite throws
What is the declared data type for the column? Also, what are the raw values for the first row? You may want to use the SQLite command line tool to query the database for them. Sent from my iPhone https://urn.to/r/mistachkin > On Apr 8, 2017, at 12:55 PM, Joseph L. Casale> wrote: > > I am using System.Data.SQLite.Core 1.0.104 in vs2017 with .NET 4.6.2 > and trying to select from a view. The query is valid and does return data > manually, however the reader throws an index out of range exception > when accessing the first row result. > > Anything atypical needed when querying a view? > > Thanks, > jlc > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users