Re: Basic SQLite Application

2022-06-01 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 15:40:43 UTC, harakim wrote: It's been a long time since I did any C development, and I have never done any on windows, but I thought I could statically link to the .lib at compile time and then I wouldn't need a dll. You sometimes can, it depends on how the librar

Re: Basic SQLite Application

2022-06-01 Thread harakim via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 15:58:01 UTC, Jesse Phillips wrote: On Wednesday, 1 June 2022 at 15:40:43 UTC, harakim wrote: It's been a long time since I did any C development, and I have never done any on windows, but I thought I could statically link to the .lib at compile time and then I wou

Re: Basic SQLite Application

2022-06-01 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 15:40:43 UTC, harakim wrote: It's been a long time since I did any C development, and I have never done any on windows, but I thought I could statically link to the .lib at compile time and then I wouldn't need a dll. I'm fine with using a dll, but I don't know how

Re: Basic SQLite Application

2022-06-01 Thread harakim via Digitalmars-d-learn
case where I would need to make bindings? As to the issue at hand, I found that bin linked from another dlang thread where someone was trying to get sqlite working. It linked to this repository: https://github.com/buggins/ddbc/tree/master/libs/win64 So when you said it might be the wrong dll

Re: Basic SQLite Application

2022-06-01 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 03:46:38 UTC, harakim wrote: I started trying to get it to compile in another directory structure but since I've switched to dub It should work the way you have it, just with dub you can also the dub version instead of copying the files: https://code.dlang.org/pac

Basic SQLite Application

2022-05-31 Thread harakim via Digitalmars-d-learn
I'm creating an application in D to do some purchase management stuff and I ran into a snag pretty early on. I'm trying to use sqlite via [this library](https://github.com/adamdruppe/arsd/blob/master/sqlite.d). I started trying to get it to compile in another directory structure but

Re: Setting SQLite compile time parameters from etc.c.sqlite3

2022-03-01 Thread data pulverizer via Digitalmars-d-learn
On Tuesday, 1 March 2022 at 20:59:46 UTC, data pulverizer wrote: Hello all, I'm not sure how to set the compile time parameters in D's SQLite module particular the items that take multiple parameters, for example in the C API manual `SQLITE_CONFIG_MMAP_SIZE` takes two `sqlite3_int6

Re: Setting SQLite compile time parameters from etc.c.sqlite3

2022-03-01 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 01, 2022 at 08:59:46PM +, data pulverizer via Digitalmars-d-learn wrote: > Hello all, > > I'm not sure how to set the compile time parameters in D's SQLite > module particular the items that take multiple parameters, for example > in the C API manual

Setting SQLite compile time parameters from etc.c.sqlite3

2022-03-01 Thread data pulverizer via Digitalmars-d-learn
Hello all, I'm not sure how to set the compile time parameters in D's SQLite module particular the items that take multiple parameters, for example in the C API manual `SQLITE_CONFIG_MMAP_SIZE` takes two `sqlite3_int64`. How do I set these? Do I just write something like

Re: How to connect to SQLITE?

2020-11-28 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 28 November 2020 at 17:50:43 UTC, kdevel wrote: On Saturday, 28 November 2020 at 13:29:50 UTC, Ferhat Kurtulmuş wrote: On Saturday, 28 November 2020 at 12:01:59 UTC, Alex NL wrote: Is there libs for SQLITE? How to use it? thanks. https://github.com/aferust/GtkD-examples-for

Re: How to connect to SQLITE?

2020-11-28 Thread kdevel via Digitalmars-d-learn
On Saturday, 28 November 2020 at 13:29:50 UTC, Ferhat Kurtulmuş wrote: On Saturday, 28 November 2020 at 12:01:59 UTC, Alex NL wrote: Is there libs for SQLITE? How to use it? thanks. https://github.com/aferust/GtkD-examples-for-TreeView-and-ListBox IMNSHO the code in example1.d string

Re: How to connect to SQLITE?

2020-11-28 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 28 November 2020 at 12:01:59 UTC, Alex NL wrote: Is there libs for SQLITE? How to use it? thanks. https://github.com/aferust/GtkD-examples-for-TreeView-and-ListBox

Re: How to connect to SQLITE?

2020-11-28 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 28 November 2020 at 12:01:59 UTC, Alex NL wrote: Is there libs for SQLITE? How to use it? thanks. You may use google translate, https://d-land.sepany.de/tutorials/datenbanken/sqlite-erste-schritte/ Here I describe how to use Sqlite using dub package arsd-official. Kind regards

How to connect to SQLITE?

2020-11-28 Thread Alex NL via Digitalmars-d-learn
Is there libs for SQLITE? How to use it? thanks.

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 t

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 t

SQLite 3 support?

2020-02-26 Thread mark via Digitalmars-d-learn
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 or is a third-party library best? For example

Re: Is there any working SQLite driver for windows?

2018-12-26 Thread Suliman via Digitalmars-d-learn
On Wednesday, 26 December 2018 at 12:13:27 UTC, Suliman wrote: On Wednesday, 26 December 2018 at 11:06:02 UTC, Andre Pany wrote: On Wednesday, 26 December 2018 at 08:19:03 UTC, Suliman wrote: Yesterday I tried several sqlite drivers and all of them have some issue that make it's bui

Re: Is there any working SQLite driver for windows?

2018-12-26 Thread Suliman via Digitalmars-d-learn
On Wednesday, 26 December 2018 at 11:06:02 UTC, Andre Pany wrote: On Wednesday, 26 December 2018 at 08:19:03 UTC, Suliman wrote: Yesterday I tried several sqlite drivers and all of them have some issue that make it's build on Windows impossible. Few examples https://github.com/huntlabs

Re: Is there any working SQLite driver for windows?

2018-12-26 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 26 December 2018 at 08:19:03 UTC, Suliman wrote: Yesterday I tried several sqlite drivers and all of them have some issue that make it's build on Windows impossible. Few examples https://github.com/huntlabs/hunt-database/issues/24 https://github.com/biozic/d2sqlite3/issu

Is there any working SQLite driver for windows?

2018-12-26 Thread Suliman via Digitalmars-d-learn
Yesterday I tried several sqlite drivers and all of them have some issue that make it's build on Windows impossible. Few examples https://github.com/huntlabs/hunt-database/issues/24 https://github.com/biozic/d2sqlite3/issues/51

Re: Any sample how to use Sqlite-d?

2018-01-18 Thread biozic via Digitalmars-d-learn
On Wednesday, 17 January 2018 at 13:36:26 UTC, Marc wrote: I was looking for a library to use SQLite with D, found this (https://code.dlang.org/packages/sqlite-d) but it has no documentation or code example. I looked into files in the source code and wrote this: Database db = Database(name

Re: Any sample how to use Sqlite-d?

2018-01-17 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 17 January 2018 at 13:36:26 UTC, Marc wrote: I was looking for a library to use SQLite with D, found this (https://code.dlang.org/packages/sqlite-d) but it has no documentation or code example. I looked into files in the source code and wrote this: Database db = Database(name

Re: Any sample how to use Sqlite-d?

2018-01-17 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 17, 2018 at 01:36:26PM +, Marc via Digitalmars-d-learn wrote: > I was looking for a library to use SQLite with D, found this > (https://code.dlang.org/packages/sqlite-d) but it has no documentation > or code example. I looked into files in the source code and wro

Any sample how to use Sqlite-d?

2018-01-17 Thread Marc via Digitalmars-d-learn
I was looking for a library to use SQLite with D, found this (https://code.dlang.org/packages/sqlite-d) but it has no documentation or code example. I looked into files in the source code and wrote this: Database db = Database(name); auto table = db.table(tableName); auto rows

Re: Problems compiling sqlite-d

2017-01-30 Thread Nestor via Digitalmars-d-learn
On Monday, 30 January 2017 at 03:07:22 UTC, Adam D. Ruppe wrote: If I specify all source files, there are even more problems: Error 42: Symbol Undefined _sqlite3_open It apparently couldn't find sqlite3.lib. Files sqlite3.{def|dll|lib} are on both source/ and source/arsd/ (just in case) Tr

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 30 January 2017 at 02:46:34 UTC, Nestor wrote: Well, I had downloaded the github version a few days back but yesterday managed to get dub to fetch properly, so I just fetched package arsd, and took the units from there. Oh, that is ancient and not even mine - I don't have access to

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
l Undefined _sqlite3_bind_text Error: linker exited with status 211947944 Source of app.d couldn't be simpler: import std.stdio; void main() { import arsd.sqlite; auto db = new Sqlite("data.db"); } Files sqlite3.{def|dll|lib} are on both source/ and source/arsd/ (just in case) I also mo

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 30 January 2017 at 00:06:00 UTC, Nestor wrote: I wasn't doing it explicitly. However I just did that and still encountered a few errors, which I removed with this patch: Where did you get that ancient version? The latest versions of the files work just fine out of the box, and they

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 17:36:45 UTC, Adam D. Ruppe wrote: On Sunday, 29 January 2017 at 16:26:30 UTC, Nestor wrote: dmd yourfile.d database.d sqlite.d I have just tried your way and I get some errors: Error 42: Symbol Undefined _D4arsd8database3Row7opIndexMFkAyaiZAya Are you sure you

Re: Problems compiling sqlite-d

2017-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 29 January 2017 at 16:26:30 UTC, Nestor wrote: dmd yourfile.d database.d sqlite.d I have just tried your way and I get some errors: Error 42: Symbol Undefined _D4arsd8database3Row7opIndexMFkAyaiZAya Are you sure you passed those two database.d and sqlite.d modules to the compiler

Re: Problems compiling sqlite-d

2017-01-29 Thread Nestor via Digitalmars-d-learn
On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote: On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 29 January 2017 at 04:13:17 UTC, Nestor wrote: On Sunday, 29 January 2017 at 03:11:34 UTC, Stefan Koch wrote: On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote: On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: [...] In the case of Windows, where libraries ar

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
for building self-contained applications. Sometimes true, but sqlite can be easily embedded and statically linked, so your binary is still self-contained, there's just a small compile time dependency on the sqlite3.lib. Also, one can learn more advanced features of the language studying

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
sqlite can be easily embedded and statically linked, so your binary is still self-contained, there's just a small compile time dependency on the sqlite3.lib. Also, one can learn more advanced features of the language studying them. Oh, certainly, writing and studying it is a good thing.

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote: On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least for building self-contained applications. Sometimes true, but sqlite can be easily embedded and statically linked, so

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote: Well, native implementations are useful at least for building self-contained applications. Sometimes true, but sqlite can be easily embedded and statically linked, so your binary is still self-contained, there's just a small co

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
t all). Yeah, but those are relatively simple tools, not a heavily used database like sqlite. I support the creation of sqlite-d, it does some cool stuff and there is potential for more, but I just don't agree that using the C functions should be a dealbreaker (or even a serious negat

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
, Stefan Koch wrote: [...] Thanks. It did compile using dub, though I had a couple of issues with dub, by the way. [...] I think you have to remove the app.d that comes with sqlite-d file if you want to use it. Because that tries to open views/test-2.3.sqlite. Please try to read the source

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
, though I had a couple of issues with dub, by the way. [...] I think you have to remove the app.d that comes with sqlite-d file if you want to use it. Because that tries to open views/test-2.3.sqlite. Please try to read the source-code in app.d and in test.d that come with sqlite-d. If you have

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
. [...] I think you have to remove the app.d that comes with sqlite-d file if you want to use it. Because that tries to open views/test-2.3.sqlite. Please try to read the source-code in app.d and in test.d that come with sqlite-d. If you have questions about that I am happy to answer them. Sqlite-d

Re: Problems compiling sqlite-d

2017-01-28 Thread Ali Çehreli via Digitalmars-d-learn
On 01/28/2017 04:14 PM, Adam D. Ruppe wrote: On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There's just no advantag

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
On Sunday, 29 January 2017 at 00:14:02 UTC, Adam D. Ruppe wrote: On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There&

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote: It's not native though. It's a mistake to ask for native D implementations of mature C libraries, especially a public domain one like sqlite. There's just no advantage in production use to rewrite it.

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote: [...] Thanks. It did compile using dub, though I had a couple of issues with dub, by the way. [...] I think you have to remove the app.d that comes with sqlite-d

Re: Problems compiling sqlite-d

2017-01-28 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote: On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those

Re: Problems compiling sqlite-d

2017-01-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Is there any other native D implementation of sqlite reader? My sqlite.d and database.d from here can do it too: https://github.com/adamdruppe/arsd Just download those two files and compile them together with your file: dmd

Re: Problems compiling sqlite-d

2017-01-28 Thread Nestor via Digitalmars-d-learn
am using a proxy which allows me to use only the browser, so I downloaded the git repository to a directory and made tests there. However finally I moved the library to the proper location, which in Windows 7 is this: C:\Users\nestor\AppData\Roaming\dub\packages\sqlite-d-0.1.0 Now, when I tried

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
was supposed to say. sqlite-d/source/sqlited.d Please feel free to post here or contact me directly regarding the usage of sqlite-d. Yes I was building withoug dub. What I did was simply: copy data.db to sqlite-d/source cd to sqlite-d/source copy api_user.d to z1_app.d modify z1_app.d (as shown

Re: Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote: On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel free to post here or contact me directly regarding the usage of

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename

Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename = (args.length == 2 ? args[1] : "data.db"); Database db

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 wi

SQLite

2016-10-19 Thread Alfred Newman via Digitalmars-d-learn
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. So, I am stucked. I have the following sample structure table:

Re: Interfacing Chromium & SQLite

2015-09-06 Thread Byron Heads via Digitalmars-d-learn
On Saturday, 5 September 2015 at 13:32:04 UTC, Mike McKee wrote: On Saturday, 5 September 2015 at 11:43:16 UTC, Mike McKee wrote: On a Mac (Yosemite version), how would I create a window in D, embed Chromium, use D to show a local SQLite test database (id, firstname, lastname) inside Chromium

Re: Interfacing Chromium & SQLite

2015-09-05 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 5 September 2015 at 13:32:04 UTC, Mike McKee wrote: Note: I'm not asking for source code examples, just wondering what technologies I would have to use to connect these pieces together? I would basically look up how you'd do it in C and follow the same steps in D. I haven't used

Re: Interfacing Chromium & SQLite

2015-09-05 Thread Mike McKee via Digitalmars-d-learn
On Saturday, 5 September 2015 at 11:43:16 UTC, Mike McKee wrote: On a Mac (Yosemite version), how would I create a window in D, embed Chromium, use D to show a local SQLite test database (id, firstname, lastname) inside Chromium, and let someone have a small search form to do like a "full

Interfacing Chromium & SQLite

2015-09-05 Thread Mike McKee via Digitalmars-d-learn
On a Mac (Yosemite version), how would I create a window in D, embed Chromium, use D to show a local SQLite test database (id, firstname, lastname) inside Chromium, and let someone have a small search form to do like a "full name" search that goes back to D to query the database again?

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
//tidy up on exit sqlite3_close(db); return; } "Failed to insert record: table people has no column named id" wow! but it has! or isn't it? yep, it hasn't. the error is here: > result = sqlite3_exec(db, "CREATE TABLE people('id

Sqlite

2015-01-11 Thread Paul via Digitalmars-d-learn
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 is the source of the problem? import etc.c.sqlite3; import std.stdio; //stub

Re: Compiling with SQLite

2014-11-18 Thread tcak via Digitalmars-d-learn
n the standard library; is there documentation for this somewhere? D doesn't have the whole implementation of SQLite. It is implemented as a library, and the sqlite3 module hooks up to library's functions. So, you should give your program the library ie. implementation of SQLite.

Re: Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
o, is there a way I could make SQLite work with DUB rather than building manually? The command-line help and web page don't seem to mention this anywhere.

Re: Compiling with SQLite

2014-11-17 Thread uri via Digitalmars-d-learn
On Tuesday, 18 November 2014 at 01:14:26 UTC, impatient-dev wrote: I'm new to D, and I'm trying to use SQLite, but I can't get this basic program to compile: import etc.c.sqlite3 : sqlite3_open; void main(string[] args){ sqlite3_open("test.sqlite", null); }

Re: Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
Addendum: I'm using DDT for Eclipse, and the names I'm using come up in its autocomplete. They also appear at http://dlang.org/phobos/etc_c_sqlite3.html, which is why I'm stumped. I get what the error means, but I don't understand why it's occurring.

Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
I'm new to D, and I'm trying to use SQLite, but I can't get this basic program to compile: import etc.c.sqlite3 : sqlite3_open; void main(string[] args){ sqlite3_open("test.sqlite", null); } When compiling with DMD v2.066.1, I get this error: test.o: In

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 OPTLI

Re: SQLite library on Windows

2012-12-26 Thread BLM768
along those lines. It currently only has a partial interface and an SQLite driver for now, though, and the interface will probably be quite different from DDBI's (largely for performance reasons).

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 OPTLI

SQLite library on Windows

2012-12-26 Thread BLM768
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 can't use the standard DLL build wit

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

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

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

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

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

SQLite with D

2009-04-23 Thread reimi gibbons
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.