[sqlite] Sqlite connection/ Sqlite3_open
Hi every one, I'm a beginner with sqlite and I'm a C# programmer. Ive seen the documentation on the c/c++ API but i've no Idea of how to implement that. I've downloaded the system.data.sqlite dlls which is working: I can open a connection, list the tables in an sql3 db... But as I tried more complicated queries they don't work which is normal because i dont know the sql syntax. I read that the sqlite3_prepare command transforms sql statements in sqlite "statements". As I know transact sql syntax, I would like to use this knowledge for managing sqlite db. AS anyone ever faces the same problem or can someone help ? Thanks in advance.
[sqlite] Sqlite connection/ Sqlite3_open
On 5 Oct 2015, at 11:02pm, Steave Njinwoua wrote: > I would like to use this knowledge for managing > sqlite db. AS anyone ever faces the same problem or can someone help ? > Thanks in advance. Split the problem into two. 1) Learn SQL syntax and test your knowledge. 2) Learn how to use C# to execute SQL commands. To do (1) download the SQLite command-line tool from the SQLite downlaod page. This will let you play with SQL without having to debug your own C# code. Once you have more confidence with SQL commands you can try using C# to call them. Simon.
Re: [sqlite] sqlite connection?
On Tue, May 11, 2010 at 01:45:03PM -0400, john cummings scratched on the wall: > hi all, > > i'm new to this forum and sqlite. > > is it possible to have an executable (i.e. .exe) with connections to 2 > sqlite databases? > > i've read doc and it doesn't speak to this one way or the other. Yes. Just call sqlite3_open_xxx() more than once. You can also have one database connection manage more than one database file. Among other this, this allows you to formulate queries that gather data from both databases. See the SQLite SQL command "ATTACH". -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite connection?
On 11 May 2010, at 6:45pm, john cummings wrote: > is it possible to have an executable (i.e. .exe) with connections to 2 > sqlite databases? > > i've read doc and it doesn't speak to this one way or the other. Sure. Use sqlite_open() two times, and keep the returned values in two separate variables. Make sure you use the right one for each subsequent operation. When you're finished with each database, call sqlite_close() on that one, not the other one. http://www.sqlite.org/c_interface.html Note to the SQLite docos: section 3.10 of that page is entirely in bold because of a tag problem. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite connection?
Yes. One can also attach 'somedatabase path' as anothername ; and you can run a query accessing both at the same time. regards, Adam On Tue, May 11, 2010 at 1:45 PM, john cummingswrote: > hi all, > > i'm new to this forum and sqlite. > > is it possible to have an executable (i.e. .exe) with connections to 2 > sqlite databases? > > i've read doc and it doesn't speak to this one way or the other. > > thanks, > > john > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- VerifEye Technologies Inc. 905-948-0015x245 7100 Warden Ave, Unit 3 Markham ON, L3R 8B5 Canada ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite connection?
On Tue, May 11, 2010 at 12:45 PM, john cummingswrote: > hi all, > > i'm new to this forum and sqlite. > > is it possible to have an executable (i.e. .exe) with connections to 2 > sqlite databases? I've never made an executable, but given that I can do so with Perl, I don't see why not. A connection is just a handle. Just give different connections different names. Heck, you could make multiple connections to multiple different databases... one to sqlite, one to Pg, another one to MySQL, another one to sqlite. Knock yourself out Go crazy. > > i've read doc and it doesn't speak to this one way or the other. > > thanks, > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite connection?
hi all, i'm new to this forum and sqlite. is it possible to have an executable (i.e. .exe) with connections to 2 sqlite databases? i've read doc and it doesn't speak to this one way or the other. thanks, john ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users