Re: [sqlite] SQLite Linq not being loaded

2013-09-12 Thread Steve Palmer
Thanks! I'll give that a try!


On 9 September 2013 12:47, Kevin Benson  wrote:

> I am not familiar with the Windows System.Data.SQLite environment. The
> maintainer (Joe Mistachkin) is pretty good about catching up to the users
> list when he has time. Have you tried what's mentioned at the bottom of
> this page?
> http://www.jacopretorius.net/2011/01/using-linq-to-sql-with-sqlite.html
>
> "Now when using your datacontext you can’t simply use a connection string,
> you need to add a reference to the System.Data.SQLite dll and then create
> an instance of the SQLiteConnectionString class.  If you don’t do this the
> code seems to assume you’re trying to connect to a Sql Server database.
>
>
>
> private readonly DataSource dataSource = new DataSource(new
> SQLiteConnection(@"Data Source=database.db;DbLinqProvider=sqlite;"));
>
>
> And that’s it!  Now you should be able to write Linq queries against your
> Sqlite database just like you would with a Sql Server database."
>
>
> --
>--
>   --
>  --Ô¿Ô--
> K e V i N
>
>
> On Mon, Sep 9, 2013 at 7:11 AM, Steve Palmer  wrote:
>
> > Thanks, but that just confirms what I mentioned which is that
> > SCOPE_IDENTITY is not valid in SQLite. The issue here is that the
> > generation of SQL statements from Linq statements is not being done by
> > System.Data.SQLite.Linq
> > which should be generating the correct syntax.
> >
> > There are other examples of SQL statements being passed to sqlite via
> Linq
> > which aren't valid. The long story made short is that there doesn't seem
> to
> > be any support for translating Linq statements to valid Sqlite statements
> > in System.Data.SQLite. For that you seem to use a third party solution.
> >
> > -Steve
> >
> >
> >
> > On 9 September 2013 12:00, Kevin Benson 
> wrote:
> >
> > > On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer  wrote:
> > >
> > > > Hi!
> > > >
> > > > Has anybody successfully used System.Data.SQLite.Linq in their
> project
> > > and
> > > > can perhaps help me with this?
> > > >
> > > > Even after including this DLL in my project reference, it is apparent
> > > that
> > > > Linq is calling the wrong provider when building the appropriate SQL
> > > > statements. It is throwing an exception in SQLiteCommand with the
> > > following
> > > > statement:
> > > >
> > > > INSERT INTO [Inbox]
> > > > ([Sender], [Subject], [Body], [Date], [ConversationID],
> > > > [RemoteID], [ReplyTo])
> > > > VALUES
> > > > (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
> > > >
> > > > SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
> > > >
> > > >  The SCOPE_IDENTITY is not valid in SQLite.
> > >
> > >
> > >
> > >
> >
> http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
> > > --
> > >--
> > >   --
> > >  --Ô¿Ô--
> > > K e V i N
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Kevin Benson
I am not familiar with the Windows System.Data.SQLite environment. The
maintainer (Joe Mistachkin) is pretty good about catching up to the users
list when he has time. Have you tried what's mentioned at the bottom of
this page?
http://www.jacopretorius.net/2011/01/using-linq-to-sql-with-sqlite.html

"Now when using your datacontext you can’t simply use a connection string,
you need to add a reference to the System.Data.SQLite dll and then create
an instance of the SQLiteConnectionString class.  If you don’t do this the
code seems to assume you’re trying to connect to a Sql Server database.



private readonly DataSource dataSource = new DataSource(new
SQLiteConnection(@"Data Source=database.db;DbLinqProvider=sqlite;"));


And that’s it!  Now you should be able to write Linq queries against your
Sqlite database just like you would with a Sql Server database."


--
   --
  --
 --Ô¿Ô--
K e V i N


On Mon, Sep 9, 2013 at 7:11 AM, Steve Palmer  wrote:

> Thanks, but that just confirms what I mentioned which is that
> SCOPE_IDENTITY is not valid in SQLite. The issue here is that the
> generation of SQL statements from Linq statements is not being done by
> System.Data.SQLite.Linq
> which should be generating the correct syntax.
>
> There are other examples of SQL statements being passed to sqlite via Linq
> which aren't valid. The long story made short is that there doesn't seem to
> be any support for translating Linq statements to valid Sqlite statements
> in System.Data.SQLite. For that you seem to use a third party solution.
>
> -Steve
>
>
>
> On 9 September 2013 12:00, Kevin Benson  wrote:
>
> > On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer  wrote:
> >
> > > Hi!
> > >
> > > Has anybody successfully used System.Data.SQLite.Linq in their project
> > and
> > > can perhaps help me with this?
> > >
> > > Even after including this DLL in my project reference, it is apparent
> > that
> > > Linq is calling the wrong provider when building the appropriate SQL
> > > statements. It is throwing an exception in SQLiteCommand with the
> > following
> > > statement:
> > >
> > > INSERT INTO [Inbox]
> > > ([Sender], [Subject], [Body], [Date], [ConversationID],
> > > [RemoteID], [ReplyTo])
> > > VALUES
> > > (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
> > >
> > > SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
> > >
> > >  The SCOPE_IDENTITY is not valid in SQLite.
> >
> >
> >
> >
> http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
> > --
> >--
> >   --
> >  --Ô¿Ô--
> > K e V i N
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Steve Palmer
Thanks, but that just confirms what I mentioned which is that
SCOPE_IDENTITY is not valid in SQLite. The issue here is that the
generation of SQL statements from Linq statements is not being done by
System.Data.SQLite.Linq
which should be generating the correct syntax.

There are other examples of SQL statements being passed to sqlite via Linq
which aren't valid. The long story made short is that there doesn't seem to
be any support for translating Linq statements to valid Sqlite statements
in System.Data.SQLite. For that you seem to use a third party solution.

-Steve



On 9 September 2013 12:00, Kevin Benson  wrote:

> On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer  wrote:
>
> > Hi!
> >
> > Has anybody successfully used System.Data.SQLite.Linq in their project
> and
> > can perhaps help me with this?
> >
> > Even after including this DLL in my project reference, it is apparent
> that
> > Linq is calling the wrong provider when building the appropriate SQL
> > statements. It is throwing an exception in SQLiteCommand with the
> following
> > statement:
> >
> > INSERT INTO [Inbox]
> > ([Sender], [Subject], [Body], [Date], [ConversationID],
> > [RemoteID], [ReplyTo])
> > VALUES
> > (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
> >
> > SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
> >
> >  The SCOPE_IDENTITY is not valid in SQLite.
>
>
>
> http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
> --
>--
>   --
>  --Ô¿Ô--
> K e V i N
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Kevin Benson
On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer  wrote:

> Hi!
>
> Has anybody successfully used System.Data.SQLite.Linq in their project and
> can perhaps help me with this?
>
> Even after including this DLL in my project reference, it is apparent that
> Linq is calling the wrong provider when building the appropriate SQL
> statements. It is throwing an exception in SQLiteCommand with the following
> statement:
>
> INSERT INTO [Inbox]
> ([Sender], [Subject], [Body], [Date], [ConversationID],
> [RemoteID], [ReplyTo])
> VALUES
> (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
>
> SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
>
>  The SCOPE_IDENTITY is not valid in SQLite.


http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Steve Palmer
I've not had any response but it seems that System.Data.SQLite.Linq.dll
doesn't work with DataContext at all. I'm not sure why it is supplied. I've
found no examples of anything that uses this so it doesn't seem worth
shipping this.

I've found SQLite.Net which is a different C# sqlite wrapper with Linq
support that actually does work, so I'm switching to that.


On 8 September 2013 07:36, Steve Palmer  wrote:

>  Hi!
>
> Has anybody successfully used System.Data.SQLite.Linq in their project and
> can perhaps help me with this?
>
> Even after including this DLL in my project reference, it is apparent that
> Linq is calling the wrong provider when building the appropriate SQL
> statements. It is throwing an exception in SQLiteCommand with the following
> statement:
>
> INSERT INTO [Inbox]
> ([Sender], [Subject], [Body], [Date], [ConversationID], [RemoteID], 
> [ReplyTo])
> VALUES
> (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
>
> SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
>
>  The SCOPE_IDENTITY is not valid in SQLite. How do I direct
> System.Data.SQLite.DLL to use the SQLite Linq SQL builder when
> constructing SQL statements?
>
> My DbProviderFactories is:
>
>   
> 
>  description=".Net Framework Data Provider for SQLite" 
> type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.88.0, 
> Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>
>   
>
> is this correct?
>
> *Additional info.* I don't see System.Data.SQLite.Linq.dll in the list of
> Modules in VS2012 when my application is loaded even though it is in the
> bin folder. This confirms my suspicion that I'm missing something that
> explicitly references it but I can't figure out what it is.
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite Linq not being loaded

2013-09-07 Thread Steve Palmer
Hi!

Has anybody successfully used System.Data.SQLite.Linq in their project and
can perhaps help me with this?

Even after including this DLL in my project reference, it is apparent that
Linq is calling the wrong provider when building the appropriate SQL
statements. It is throwing an exception in SQLiteCommand with the following
statement:

INSERT INTO [Inbox]
([Sender], [Subject], [Body], [Date], [ConversationID],
[RemoteID], [ReplyTo])
VALUES
(@p0, @p1, @p2, @p3, @p4, @p5, @p6)

SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]

 The SCOPE_IDENTITY is not valid in SQLite. How do I direct
System.Data.SQLite.DLL to use the SQLite Linq SQL builder when constructing
SQL statements?

My DbProviderFactories is:

  


  

is this correct?

*Additional info.* I don't see System.Data.SQLite.Linq.dll in the list of
Modules in VS2012 when my application is loaded even though it is in the
bin folder. This confirms my suspicion that I'm missing something that
explicitly references it but I can't figure out what it is.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite/LINQ?

2012-04-25 Thread Taleeb Anwar
Oh sorry! there is no update of dbLinq (as you noted) for some time now.
What about dotconnect for
sqlite

Thanks & Regards
Taleeb Anwar

*Hai Ab bhi Tera "Shwarma" Afsana Khwan Humara!!*




On Thu, Apr 26, 2012 at 10:12 AM, Taleeb Anwar wrote:

> I've never tried it - but dblinq seems 
> to be one option worth trying.
>
> Thanks & Regards
> Taleeb Anwar
>
> *Hai Ab bhi Tera "Shwarma" Afsana Khwan Humara!!*
>
>
>
>
> On Thu, Apr 26, 2012 at 5:13 AM, Ken godee  wrote:
>
>> Is there any way to use
>>
>> SQLite/LINQ/C# - programmatically?
>>
>> I'm new to the C# world and once I read
>> about LINQ it sure seemed the way to go.
>>
>> Maybe I'm missing something but I've really
>> beat this to death trying to find a solution.
>>
>> I'm not using Visual Studio.
>>
>> DBLing is dead.
>>
>> LingPad works great, not sure how. Builds it's own
>> connect.
>>
>> I can use ADO.Net no problem, just seems can't find
>> a Linq provider.
>>
>> So if my thinking is right buy Visual Studio
>> or use ADO.Net seems to be the choice or maybe ALing ($$)
>>
>> Thought I'd give the list a shot before I give up
>> and just resort to ADO.
>>
>> Ideas?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> __**_
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite/LINQ?

2012-04-25 Thread Taleeb Anwar
I've never tried it - but dblinq
seems to be one option worth
trying.

Thanks & Regards
Taleeb Anwar

*Hai Ab bhi Tera "Shwarma" Afsana Khwan Humara!!*




On Thu, Apr 26, 2012 at 5:13 AM, Ken godee  wrote:

> Is there any way to use
>
> SQLite/LINQ/C# - programmatically?
>
> I'm new to the C# world and once I read
> about LINQ it sure seemed the way to go.
>
> Maybe I'm missing something but I've really
> beat this to death trying to find a solution.
>
> I'm not using Visual Studio.
>
> DBLing is dead.
>
> LingPad works great, not sure how. Builds it's own
> connect.
>
> I can use ADO.Net no problem, just seems can't find
> a Linq provider.
>
> So if my thinking is right buy Visual Studio
> or use ADO.Net seems to be the choice or maybe ALing ($$)
>
> Thought I'd give the list a shot before I give up
> and just resort to ADO.
>
> Ideas?
>
>
>
>
>
>
>
>
>
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite/LINQ?

2012-04-25 Thread Ken godee

Is there any way to use

SQLite/LINQ/C# - programmatically?

I'm new to the C# world and once I read
about LINQ it sure seemed the way to go.

Maybe I'm missing something but I've really
beat this to death trying to find a solution.

I'm not using Visual Studio.

DBLing is dead.

LingPad works great, not sure how. Builds it's own
connect.

I can use ADO.Net no problem, just seems can't find
a Linq provider.

So if my thinking is right buy Visual Studio
or use ADO.Net seems to be the choice or maybe ALing ($$)

Thought I'd give the list a shot before I give up
and just resort to ADO.

Ideas?









___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users