Re: SQLite 3 support?

2020-02-26 Thread Jordan Wilson via Digitalmars-d-learn
On Wednesday, 26 February 2020 at 20:06:20 UTC, mark wrote: There seems to be some support for SQLite 3 in std. lib. etc when looking at the stable docs: https://dlang.org/phobos/etc_c_sqlite3.html But this isn't visible when looking at stable (ddox). Is this the best SQLite 3 library to use o

Re: SQLite 3 support?

2020-02-26 Thread tchaloupka via Digitalmars-d-learn
On Wednesday, 26 February 2020 at 20:06:20 UTC, mark wrote: There seems to be some support for SQLite 3 in std. lib. etc when looking at the stable docs: https://dlang.org/phobos/etc_c_sqlite3.html But this isn't visible when looking at stable (ddox). Is this the best SQLite 3 library to use o

Re: SQLite

2016-11-01 Thread Alfred Newman via Digitalmars-d-learn
On Friday, 21 October 2016 at 10:50:30 UTC, Vadim Lopatin wrote: On Wednesday, 19 October 2016 at 16:01:37 UTC, Alfred Newman wrote: Hello, I am trying to handle a SQLite3 table with D. During my researchs, I discovered the lib https://dlang.org/phobos/etc_c_sqlite3.html. However, for any r

Re: SQLite

2016-10-21 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 19 October 2016 at 16:01:37 UTC, Alfred Newman wrote: Hello, I am trying to handle a SQLite3 table with D. During my researchs, I discovered the lib https://dlang.org/phobos/etc_c_sqlite3.html. However, for any reason, there is no code snippets or sample codes available there.

Re: SQLite

2016-10-19 Thread WebFreak001 via Digitalmars-d-learn
On Wednesday, 19 October 2016 at 16:01:37 UTC, Alfred Newman wrote: Hello, I am trying to handle a SQLite3 table with D. During my researchs, I discovered the lib https://dlang.org/phobos/etc_c_sqlite3.html. However, for any reason, there is no code snippets or sample codes available there.

Re: SQLite

2016-10-19 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 19 October 2016 at 16:01:37 UTC, Alfred Newman wrote: Hello, I am trying to handle a SQLite3 table with D. During my researchs, I discovered the lib https://dlang.org/phobos/etc_c_sqlite3.html. [...] I've never used SQLite from D, but Adam Ruppe has an interface with an exam

Re: Sqlite

2015-01-25 Thread Paul via Digitalmars-d-learn
On Sunday, 25 January 2015 at 18:19:47 UTC, Tobias Pankrath wrote: Only string literals convert to const(char)*, because only for them it is guaranteed that they are null terminated. For everything else use toStringz. So, as a trivial example, is this how it's done?: string semiC = ";"; const

Re: Sqlite

2015-01-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Sunday, 25 January 2015 at 18:15:21 UTC, Paul wrote: I'd like to vary the query based on input but if I try to move the string out of the sqlite3_exec call like this: string sqlStatement = "CREATE TABLE people(id INT PRIMARY KEY NOT NULL, surname TEXT NOT NULL);"; result = sqlite3_exec(db,

Re: Sqlite

2015-01-25 Thread Paul via Digitalmars-d-learn
I'd like to vary the query based on input but if I try to move the string out of the sqlite3_exec call like this: string sqlStatement = "CREATE TABLE people(id INT PRIMARY KEY NOT NULL, surname TEXT NOT NULL);"; result = sqlite3_exec(db, sqlStatement, &aCallback, null, &msg); ...it won't comp

Re: Sqlite

2015-01-11 Thread Paul via Digitalmars-d-learn
On Sunday, 11 January 2015 at 22:19:28 UTC, Tobias Pankrath wrote: Hint: Put the SQL in a file create_people.sql and import it into your code via the import statement: string sql = import("create_people.sql"); // you'll need a correct -J compiler switch That way you can easily test if it's c

Re: Sqlite

2015-01-11 Thread Tobias Pankrath via Digitalmars-d-learn
On Sunday, 11 January 2015 at 20:30:41 UTC, Paul wrote: On Sunday, 11 January 2015 at 20:20:21 UTC, ketmar via Digitalmars-d-learn wrote: note the single quotes in your code: that is where it all goes wrong. i don't know where you got that quotes from, but this is not a valid SQL syntax for `C

Re: Sqlite

2015-01-11 Thread Paul via Digitalmars-d-learn
On Sunday, 11 January 2015 at 20:20:21 UTC, ketmar via Digitalmars-d-learn wrote: note the single quotes in your code: that is where it all goes wrong. i don't know where you got that quotes from, but this is not a valid SQL syntax for `CREATE TABLE`. ;-) Thank you, I thought it might be some

Re: Sqlite

2015-01-11 Thread ketmar via Digitalmars-d-learn
On Sun, 11 Jan 2015 20:00:03 + Paul via Digitalmars-d-learn wrote: > Can someone please tell me what I'm doing wrong here, the sql > INSERT statement fails for some reason. I don't fully understand > the callback function yet (I borrowed this from a C tutorial on > the subject), maybe that

Re: SQLite library on Windows

2012-12-27 Thread BLM768
Man, I wish I'd known about that tool a while ago... It seems to be working, but it looks like I'll need to recompile the DLL myself; DMD is looking for symbols mangled with a leading underscore, but the DLL has unmangled symbols, so optlink still complains. Oh; never mind. I forgot the /sys

Re: SQLite library on Windows

2012-12-27 Thread BLM768
Download their windows binaries and use Digital Mars implib tool with /system switch. Man, I wish I'd known about that tool a while ago... It seems to be working, but it looks like I'll need to recompile the DLL myself; DMD is looking for symbols mangled with a leading underscore, but the DLL

Re: SQLite library on Windows

2012-12-27 Thread Robik
On Thursday, 27 December 2012 at 01:45:26 UTC, BLM768 wrote: I've been trying various methods to get SQLite working in Windows using the etc.c.sqlite3 bindings, but I can't figure out how to get everything in a form that DMD likes. GCC doesn't seem to output anything that OPTLINK can use, and I

Re: SQLite library on Windows

2012-12-26 Thread BLM768
On Thursday, 27 December 2012 at 03:03:34 UTC, jose isaias cabrera wrote: I have a huge project with D1 using the old DDBI project in dsource: http://dsource.org/projects/ddbi It would be nice if someone with time will port it to D2. IHTH. jic Actually, my current project is basically al

Re: SQLite library on Windows

2012-12-26 Thread jose isaias cabrera
"BLM768" ... > Has anyone managed to get the library working on Windows? I have a huge project with D1 using the old DDBI project in dsource: http://dsource.org/projects/ddbi It would be nice if someone with time will port it to D2. IHTH. jic

Re: SQLite library on Windows

2012-12-26 Thread evilrat
On Thursday, 27 December 2012 at 01:45:26 UTC, BLM768 wrote: I've been trying various methods to get SQLite working in Windows using the etc.c.sqlite3 bindings, but I can't figure out how to get everything in a form that DMD likes. GCC doesn't seem to output anything that OPTLINK can use, and I

Re: SQLite with D

2009-04-26 Thread downs
reimi gibbons wrote: > downs Wrote: > >> reimi gibbons wrote: >>> im failry new to D, is there any D library project with support for SQLite, >>> if not is there any guide so i can integrate sqlite amalgamated c source >>> (sqlite3.c, sqlite3.h) into my D code. >> tools.sqlite3 might work for yo

Re: SQLite with D

2009-04-25 Thread reimi gibbons
downs Wrote: > reimi gibbons wrote: > > im failry new to D, is there any D library project with support for SQLite, > > if not is there any guide so i can integrate sqlite amalgamated c source > > (sqlite3.c, sqlite3.h) into my D code. > > tools.sqlite3 might work for you. Ask me if you have an

Re: SQLite with D

2009-04-24 Thread reimi gibbons
downs Wrote: > reimi gibbons wrote: > > im failry new to D, is there any D library project with support for SQLite, > > if not is there any guide so i can integrate sqlite amalgamated c source > > (sqlite3.c, sqlite3.h) into my D code. > > tools.sqlite3 might work for you. Ask me if you have an

Re: SQLite with D

2009-04-24 Thread downs
reimi gibbons wrote: > im failry new to D, is there any D library project with support for SQLite, > if not is there any guide so i can integrate sqlite amalgamated c source > (sqlite3.c, sqlite3.h) into my D code. tools.sqlite3 might work for you. Ask me if you have any questions about it. htt

Re: SQLite with D

2009-04-24 Thread Denis Koroskin
On Fri, 24 Apr 2009 06:44:56 +0400, reimi gibbons wrote: im failry new to D, is there any D library project with support for SQLite, if not is there any guide so i can integrate sqlite amalgamated c source (sqlite3.c, sqlite3.h) into my D code. There is a DDBI project that aims to support