MySQL

2012-01-21 Thread Mars
Hello everyone. I've been trying to use MySQL in an application on Windows, but I always get Symbol Undefined _mysql_init I've put the lib in the correct folder, so I don't know what the problem might be. I've tried several libs, and tried to compile it myself (al

mysql

2013-04-15 Thread gedaiu
Hi, Can anyone help me to connect to mysql from D? Thanks!

Re: MySQL

2012-01-21 Thread DNewbie
Please check whether your MySQL lib is 64 bit and your app is 32 bit. On Sat, Jan 21, 2012, at 10:38 PM, Mars wrote: > Hello everyone. > I've been trying to use MySQL in an application on Windows, but I > always get > > Symbol Undefined _mysql_init > I've put the lib

Re: MySQL

2012-01-21 Thread Mars
On Saturday, 21 January 2012 at 23:44:12 UTC, DNewbie wrote: Please check whether your MySQL lib is 64 bit and your app is 32 bit. The lib is 32 bit, just like my application.

Re: MySQL

2012-01-21 Thread Ali Çehreli
On 01/21/2012 01:38 PM, Mars wrote: Hello everyone. I've been trying to use MySQL in an application on Windows, but I always get Symbol Undefined _mysql_init I've put the lib in the correct folder, so I don't know what the problem might be. I've tried several libs, and

Re: MySQL

2012-01-21 Thread Mars
On Sunday, 22 January 2012 at 00:50:28 UTC, Ali Çehreli wrote: Are you also including the library on the command line with -L-l? For example, for ncurses: dmd ... -L-lncurses ... And if needed, also -L-L to specify the location of library files for the linker. Ali Yes, I am including it.

Re: MySQL

2012-01-22 Thread Ali Çehreli
On 01/21/2012 06:28 PM, Mars wrote: On Sunday, 22 January 2012 at 00:50:28 UTC, Ali Çehreli wrote: Are you also including the library on the command line with -L-l? For example, for ncurses: dmd ... -L-lncurses ... And if needed, also -L-L to specify the location of library files for the linke

Re: MySQL

2012-01-22 Thread DNewbie
a > > message that the lib couldn't be found. > > What exactly is -L-l supposed to do? Is this valid in DMD 2.057? I get > > an error with it (Unknown Option). > > > > Mars > > -L is dmd's the linker flag option. Anything after that is passed to the >

Re: MySQL

2012-01-22 Thread Mars
On Sunday, 22 January 2012 at 08:11:21 UTC, Ali Çehreli wrote: -L is dmd's the linker flag option. Anything after that is passed to the linker. So -L-l passes -l to the linker: http://www.d-programming-language.org/dmd-linux.html Ali Let me rephrase that, is this valid for OPTLINK? Unknown

Re: MySQL

2012-01-22 Thread Mars
On Sunday, 22 January 2012 at 10:21:29 UTC, DNewbie wrote: I've took a look at MySQL headers, the functions use stdcall, but in libmysql.dll exports table they are not decorated. This means...? Shouldn't it at least compile, if they are listed in the def file, coming from the lib?

Re: MySQL

2012-01-22 Thread Jesse Phillips
On Sunday, 22 January 2012 at 12:11:58 UTC, Mars wrote: Let me rephrase that, is this valid for OPTLINK? Unknown Option : LLIBMYSQL Normally I just include the lib files in the files list (dmd foo.d bar.lib). Mars No, in fact I couldn't find how to pass a library search path to optlink. It

Re: MySQL

2012-01-22 Thread DNewbie
On Sun, Jan 22, 2012, at 01:13 PM, Mars wrote: > On Sunday, 22 January 2012 at 10:21:29 UTC, DNewbie wrote: > > I've took a look at MySQL headers, the functions use stdcall, > > but in libmysql.dll exports table they are not decorated. > > This means...? > Shou

Re: MySQL

2012-01-22 Thread Kapps
otherwise you'll get errors when trying to run. On 21/01/2012 3:38 PM, Mars wrote: Hello everyone. I've been trying to use MySQL in an application on Windows, but I always get Symbol Undefined _mysql_init I've put the lib in the correct folder, so I don't know what th

Re: MySQL

2012-01-22 Thread DNewbie
On Sun, Jan 22, 2012, at 11:02 PM, DNewbie wrote: > On Sun, Jan 22, 2012, at 01:13 PM, Mars wrote: > > On Sunday, 22 January 2012 at 10:21:29 UTC, DNewbie wrote: > > > I've took a look at MySQL headers, the functions use stdcall, > > > but in libmysql.dll expo

Re: MySQL

2012-01-22 Thread Mars
On Sunday, 22 January 2012 at 23:23:23 UTC, Kapps wrote: 2) Create the binding functions using extern(System). Oh man... that was the problem. The file I used was using extern(C). Thought that was okay, it's a C lib after all. Thank you! Mars

Re: MySQL

2012-01-23 Thread Mike Parker
On 1/23/2012 11:29 AM, Mars wrote: On Sunday, 22 January 2012 at 23:23:23 UTC, Kapps wrote: 2) Create the binding functions using extern(System). Oh man... that was the problem. The file I used was using extern(C). Thought that was okay, it's a C lib after all. Thank you! Mars A number of l

Re: mysql

2013-04-15 Thread simendsjo
On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote: Hi, Can anyone help me to connect to mysql from D? Thanks! You can use Steve Teales native library. The most up-to-date version is here: https://github.com/rejectedsoftware/mysql-native It relies on vibes async sockets though. You&#x

Re: mysql

2013-04-16 Thread gedaiu
On Monday, 15 April 2013 at 19:25:19 UTC, simendsjo wrote: On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote: Hi, Can anyone help me to connect to mysql from D? Thanks! You can use Steve Teales native library. The most up-to-date version is here: https://github.com/rejectedsoftware

Re: mysql

2013-04-17 Thread Rob T
On Tuesday, 16 April 2013 at 21:09:42 UTC, gedaiu wrote: On Monday, 15 April 2013 at 19:25:19 UTC, simendsjo wrote: On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote: Hi, Can anyone help me to connect to mysql from D? Thanks! You can use Steve Teales native library. The most up-to

Re: mysql

2013-04-17 Thread simendsjo
On Tuesday, 16 April 2013 at 21:09:42 UTC, gedaiu wrote: On Monday, 15 April 2013 at 19:25:19 UTC, simendsjo wrote: On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote: Hi, Can anyone help me to connect to mysql from D? Thanks! You can use Steve Teales native library. The most up-to

DUB mysql-native

2019-10-08 Thread Vino via Digitalmars-d-learn
HUB dub add dub Adding dependency dub ~>1.17.0 dub add mysql-native Adding dependency mysql-native ~>2.3.0 dub build Fetching libevent 2.0.2+2.0.16 (getting selected version)... Fetching vibe-core 1.7.0 (getting selected version)... Fetching taggedalgebraic 0.11.4 (getting selected version)...

Vibe/Mysql Testing

2019-10-17 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code and error Error: source\app.d(25,15): Error: none of the overloads of writeBody are callable using argument types (VariantN!20LU), candidates are Code: import vibe.vibe; import std.array : array; import mysql; import std.stdio; import std.range

mysql binding/wrapper?

2012-04-28 Thread simendsjo
://my.opera.com/run3/blog/2012/03/13/d-mysql https://github.com/D-Programming-Deimos/libmysql - seems empty

Mysql - Sql things ?

2013-07-31 Thread Larry
Hello, I was searching the web for anything relating D to mysql but didn't find my way. Is it on the roadmap to add mysql support ? There is a c++ connector on debian, but no mention of a D connector.. Thanks, Larry

D and MySQL

2011-07-19 Thread New2D
I do quite a bit of work with MySQL. I can't seem to find any information on how to use D with MySQL. Is there a tutorial or example around that someone can point me to?

Mysql-native with LAMPP

2016-09-11 Thread Geert via Digitalmars-d-learn
Hi all! I tried the client driver for MySQL/MariaDB "mysql-native". https://github.com/mysql-d/mysql-native Everything works well with an individually installed version of MySql. But I would like to know if there is a way to make D programms work with LAMPP/XAMPP. I'm get

mysql-native + vibe.d example

2017-06-29 Thread crimaniak via Digitalmars-d-learn
Hi! Moving my project from mysql-lited to mysql-native I faced the problem with null pointer error inside of mysql-native: Log: SELECT id FROM versionupdate ORDER BY id Task terminated with unhandled exception: etc.linux.memoryerror.NullPointerError@src/etc/linux/memoryerror.d(325

mysql-native ResultRange + map

2017-07-05 Thread crimaniak via Digitalmars-d-learn
Hi all! After some hard time with debugging, I found ResultRange returned by query() and Prepared::query() of mysql-native package can't be combined with map() because after map() it becomes empty resultset. Code (conn.queryRows just a wrapper for query(Connections

Re: DUB mysql-native

2019-10-08 Thread Daniel Kozak via Digitalmars-d-learn
On Tue, Oct 8, 2019 at 10:55 AM Vino via Digitalmars-d-learn wrote: > > Could not resolve configuration for package hub > > From, > Vino.B It is known issue, you can not use mysql-native right now with anything else than libevent https://github.com/mysql-d/mysql-native/issues/

Re: DUB mysql-native

2019-10-08 Thread Daniel Kozak via Digitalmars-d-learn
On Tue, Oct 8, 2019 at 1:15 PM Daniel Kozak wrote: > ... > It is known issue, you can not use mysql-native right now with > anything else than libevent > > https://github.com/mysql-d/mysql-native/issues/199 > > Or you can just remove > > "subConfiguration

Re: DUB mysql-native

2019-10-08 Thread Vino via Digitalmars-d-learn
On Tuesday, 8 October 2019 at 11:26:24 UTC, Daniel Kozak wrote: On Tue, Oct 8, 2019 at 1:15 PM Daniel Kozak wrote: ... It is known issue, you can not use mysql-native right now with anything else than libevent https://github.com/mysql-d/mysql-native/issues/199 Or you can just remove

Re: DUB mysql-native

2019-10-08 Thread Vino via Digitalmars-d-learn
"https://www.youtube.com/watch?v=zvrf7nlq5Og";, but not able to execute the code Code Execution cd HUB/source app.d(3): Error: module `mysql` is in file 'mysql.d' which cannot be read import path[0] = . import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos import path[2] = C

Re: DUB mysql-native

2019-10-08 Thread Daniel Kozak via Digitalmars-d-learn
to resolve the dub test issue using the you tube video "https://www.youtube.com/watch?v=zvrf7nlq5Og";, but not able to execute the code Code Execution cd HUB/source app.d(3): Error: module `mysql` is in file 'mysql.d' which cannot be read import path[0] = . import path[1]

Re: Vibe/Mysql Testing

2019-10-17 Thread Andre Pany via Digitalmars-d-learn
: array; import mysql; import std.stdio; import std.range; void main() { auto settings = new HTTPServerSettings; settings.port = 8080; settings.bindAddresses = ["127.0.0.1"]; listenHTTP(settings, &hello); logInfo("Please open http://127.

Re: Vibe/Mysql Testing

2019-10-17 Thread Vino via Digitalmars-d-learn
On Thursday, 17 October 2019 at 20:21:39 UTC, Andre Pany wrote: On Thursday, 17 October 2019 at 19:05:44 UTC, Vino wrote: [...] Hi, I assume you are using this mysql package http://code.dlang.org/packages/mysql-native. (If not please check wheter the package you are using is vibe-d

mysql-native Help required

2020-10-22 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections { private Connection conn; auto constr = "host=localhost;port=3910;user=user;pwd=password#;db=testdb"; this.

Re: mysql binding/wrapper?

2012-04-28 Thread Adam D. Ruppe
.. but the basic usage is simple: auto mysql = new MySql("hostname, "username", "password", "database_name"); int userId = getMyUserId(); foreach(line; mysql.query("SELECT id, name FROM something WHERE user_id = ?", userId)) { line["id&qu

Re: mysql binding/wrapper?

2012-04-28 Thread simendsjo
ut it gets the job done for me. I didn't really document it... but the basic usage is simple: auto mysql = new MySql("hostname, "username", "password", "database_name"); int userId = getMyUserId(); foreach(line; mysql.query("SELECT id, name FROM som

Re: mysql binding/wrapper?

2012-04-28 Thread Adam D. Ruppe
hough, D wise. It also uses the mysql C library so you'll need libmysql on your system for it to link too. Would you mind if the module was added to vibe, and thus relicensed to MIT? No idea if the vibe folks would actually want that though :) My stuff is all free to take as far as I&#

Re: mysql binding/wrapper?

2012-04-29 Thread dnewbie
On Saturday, 28 April 2012 at 15:30:13 UTC, simendsjo wrote: stuff/blob/master/mysql.d http://my.opera.com/run3/blog/2012/03/13/d-mysql I use it in a bank account application. It works.

Re: mysql binding/wrapper?

2012-04-30 Thread Steven Schveighoffer
far as I'm concerned, but since this uses libmysql it might technically be GPL. If that's the case, using this lib will make your entire project GPL. I think the britseyeview version was an attempt by Steve Teale to write a non-GPL lib that used the protocol spec from MySQL for in

Re: mysql binding/wrapper?

2012-04-30 Thread simendsjo
te a non-GPL lib that used the protocol spec from MySQL for inclusion in Phobos. Not sure where it stands. -Steve I wrote a reply yesterday that obviously didn't make it. Sönke Ludwig integrated Steve Teales native mysql library: https://github.com/rejectedsoftware/mysql-native Haven

Re: mysql binding/wrapper?

2012-04-30 Thread James Oliphant
it might technically be GPL. >> >> If that's the case, using this lib will make your entire project GPL. >> >> I think the britseyeview version was an attempt by Steve Teale to write >> a non-GPL lib that used the protocol spec from MySQL for inclusion in >> Ph

Re: mysql binding/wrapper?

2012-04-30 Thread simendsjo
On Mon, 30 Apr 2012 18:19:29 +0200, James Oliphant wrote: Actually, it looks like the vibe folks are using my fork of Steve Teales mysqln. I had hoped to contact Steve first, so that these changes existed in one place. https://github.com/JollieRoger All of the changes exist in individual bran

Re: mysql binding/wrapper?

2012-04-30 Thread James Oliphant
sted above. My goal is not a generic database interface discussed previously in these groups. I just want an interface for mysql/mariadb and less so for postgresql at this point.

Re: mysql binding/wrapper?

2012-04-30 Thread Ary Manzana
On 4/30/12 11:57 PM, simendsjo wrote: On 4/29/12 11:48 PM, dnewbie wrote: On Saturday, 28 April 2012 at 15:30:13 UTC, simendsjo wrote: stuff/blob/master/mysql.d http://my.opera.com/run3/blog/2012/03/13/d-mysql I use it in a bank account application. It works. On Mon, 30 Apr 2012 18:19:29

Re: mysql binding/wrapper?

2012-04-30 Thread simendsjo
, maybe we could use your repository listed above. My goal is not a generic database interface discussed previously in these groups. I just want an interface for mysql/mariadb and less so for postgresql at this point. I did a small patch for it to compile for x64. Vibe.d has patches to use it'

Re: mysql binding/wrapper?

2012-04-30 Thread simendsjo
On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana wrote: Looking at the code of mysql.d I see a big switch with many cases like "case 0x01: // TINYINT". But then there's the SQLType enum with those constants. Why the enum values are not used in the cases? (and also in other parts of the co

Re: mysql binding/wrapper?

2012-05-01 Thread SomeDude
some common functions with other db providers.) That's it though, D wise. It also uses the mysql C library so you'll need libmysql on your system for it to link too. Would you mind if the module was added to vibe, and thus relicensed to MIT? No idea if the vibe folks would actually

Re: Mysql - Sql things ?

2013-07-31 Thread David
https://github.com/rejectedsoftware/mysql-native

Re: Mysql - Sql things ?

2013-08-01 Thread Larry
On Wednesday, 31 July 2013 at 12:09:02 UTC, David wrote: https://github.com/rejectedsoftware/mysql-native Waw ! Many thanks, Completely missed it :) See you

Re: D and MySQL

2011-07-19 Thread Trass3r
http://prowiki.org/wiki4d/wiki.cgi?DatabaseBindings There is some information, but it's probably outdated. Please update that wiki once you know more :) Apart from that I only know of this binding: http://dsource.org/projects/ddbi

Re: D and MySQL

2011-07-19 Thread Adam Ruppe
I wrapped the libmysql C library in D and use it in a lot of my apps. https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff Grab database.d and mysql.d from there. To use it: === import arsd.mysql; void main() { auto mysql = new MySql("localhost",

Re: D and MySQL

2011-07-19 Thread Trass3r
Am 19.07.2011, 20:49 Uhr, schrieb Adam Ruppe : foreach(line; mysql.query("select id, name from users where id > ?", 5)) { // access to columns by name writefln("%s: %s", line["id"], line["name"]); // alternatively, you can write: writefln("%s: %s",

Re: D and MySQL

2011-07-19 Thread Adam Ruppe
reate new DataObjects: auto obj = new DataObject(mysql, "users"); obj.id = 10; obj.name = "My Name"; obj.commitChanges(); // does a select. if empty, inserts. if not, updates. The DataObject is found in database.d - it is meant to work generically with any database backend.

Re: D and MySQL

2011-07-19 Thread Trass3r
The DataObject is found in database.d - it is meant to work generically with any database backend. Damn, we should really have a common project for database stuff.

Re: D and MySQL

2011-07-20 Thread Mandeep
On 07/20/2011 12:04 AM, New2D wrote: I do quite a bit of work with MySQL. I can't seem to find any information on how to use D with MySQL. Is there a tutorial or example around that someone can point me to? I had tried writing a library similar to JDBC. http://dsource.org/projects/ddb

Question about mysql-d Object

2015-12-07 Thread Martin Tschierschke via Digitalmars-d-learn
When I do the following: auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung"); auto rows = mysql.query("select field from my_table limit 50"); foreach(row;rows){ writeln(row["field"]);} // second time same loop foreac

Re: Mysql-native with LAMPP

2016-09-12 Thread wobbles via Digitalmars-d-learn
On Monday, 12 September 2016 at 05:31:46 UTC, Geert wrote: Hi all! I tried the client driver for MySQL/MariaDB "mysql-native". https://github.com/mysql-d/mysql-native Everything works well with an individually installed version of MySql. But I would like to know if there is a way

Re: Mysql-native with LAMPP

2016-09-12 Thread Geert via Digitalmars-d-learn
On Monday, 12 September 2016 at 09:59:30 UTC, wobbles wrote: On Monday, 12 September 2016 at 05:31:46 UTC, Geert wrote: Hi all! I tried the client driver for MySQL/MariaDB "mysql-native". https://github.com/mysql-d/mysql-native Everything works well with an individually installed v

Re: Mysql-native with LAMPP

2016-09-12 Thread Daniel Kozak via Digitalmars-d-learn
wrote: Hi all! I tried the client driver for MySQL/MariaDB "mysql-native". https://github.com/mysql-d/mysql-native Everything works well with an individually installed version of MySql. But I would like to know if there is a way to make D programms work with LAMPP/XAMPP. I'

Re: Mysql-native with LAMPP

2016-09-12 Thread Geert via Digitalmars-d-learn
On Monday, 12 September 2016 at 14:00:18 UTC, Daniel Kozak wrote: And are you sure it is using tcp4 socket on port 3306? You can use netstat -tlnp to see if is running on tcpv4 3306 I get nothing with TCP option, only when i run this command: # netstat -npl | grep mysql unix 2

Re: Mysql-native with LAMPP

2016-09-12 Thread Martin Krejcirik via Digitalmars-d-learn
# netstat -npl | grep mysql unix 2 [ ACC ] STREAM LISTENING 239449 6293/mysqld /opt/lampp/var/mysql/mysql.sock Mysql defaults to unix socket, you need to add bind-address=127.0.0.1 to my.cnf [mysqld] section.

Re: Mysql-native with LAMPP

2016-09-12 Thread Geert via Digitalmars-d-learn
On Monday, 12 September 2016 at 15:02:50 UTC, Martin Krejcirik wrote: # netstat -npl | grep mysql unix 2 [ ACC ] STREAM LISTENING 239449 6293/mysqld /opt/lampp/var/mysql/mysql.sock Mysql defaults to unix socket, you need to add bind-address=127.0.0.1 to my.cnf

Mysql-native - full database backup

2017-01-02 Thread Geert via Digitalmars-d-learn
Hi! How can i create a full database backup using mysql-native for D? https://github.com/mysql-d/mysql-native Thanks!

Re: mysql-native + vibe.d example

2017-06-30 Thread Martin Tschierschke via Digitalmars-d-learn
On Friday, 30 June 2017 at 00:52:28 UTC, crimaniak wrote: Hi! Moving my project from mysql-lited to mysql-native I faced the problem with null pointer error inside of mysql-native: [...] It seems I am doing something wrong so myself-native fails to detect it in isValid(). So I search for

Re: mysql-native + vibe.d example

2017-06-30 Thread tetyys via Digitalmars-d-learn
On Friday, 30 June 2017 at 00:52:28 UTC, crimaniak wrote: Hi! Moving my project from mysql-lited to mysql-native I faced the problem with null pointer error inside of mysql-native: seems like it's already fixed https://github.com/mysql-d/mysql-native/c

Re: mysql-native + vibe.d example

2017-06-30 Thread crimaniak via Digitalmars-d-learn
On Friday, 30 June 2017 at 16:18:33 UTC, tetyys wrote: On Friday, 30 June 2017 at 00:52:28 UTC, crimaniak wrote: Hi! Moving my project from mysql-lited to mysql-native I faced the problem with null pointer error inside of mysql-native: seems like it's already fixed https://githu

Re: mysql-native ResultRange + map

2017-07-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/5/17 12:04 PM, crimaniak wrote: Hi all! After some hard time with debugging, I found ResultRange returned by query() and Prepared::query() of mysql-native package can't be combined with map() because after map() it becomes empty resultset. [snip] As you see simple each() and fo

Re: mysql-native ResultRange + map

2017-07-11 Thread crimaniak via Digitalmars-d-learn
On Tuesday, 11 July 2017 at 22:46:00 UTC, Steven Schveighoffer wrote: On 7/5/17 12:04 PM, crimaniak wrote: ... Because of the temporary copy likely inside map closes the connection. See the bug I reported: https://github.com/mysql-d/mysql-native/issues/117 Yes, it seems to be the same

Re: mysql-native Help required

2020-10-22 Thread novice3 via Digitalmars-d-learn
On Thursday, 22 October 2020 at 11:04:53 UTC, Vino wrote: class Connections { private Connection conn; auto constr = "host=localhost;port=3910;user=user;pwd=password#;db=testdb"; this.conn = new Connection(constr); } where Connections class constructor implemented?

Re: mysql-native Help required

2020-10-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/22/20 7:04 AM, Vino wrote: Hi All,   Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections {   private Connection conn;   auto constr = "host=localhost;port=3910;user=user;pwd=pas

Re: mysql-native Help required

2020-10-22 Thread Vino via Digitalmars-d-learn
On Thursday, 22 October 2020 at 14:08:30 UTC, Steven Schveighoffer wrote: On 10/22/20 7:04 AM, Vino wrote: Hi All,   Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections {   private

Re: mysql-native Help required

2020-10-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/22/20 11:00 AM, Vino wrote: On Thursday, 22 October 2020 at 14:08:30 UTC, Steven Schveighoffer wrote: On 10/22/20 7:04 AM, Vino wrote: Hi All,    Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class

Re: mysql-native Help required

2020-10-23 Thread aberba via Digitalmars-d-learn
On Thursday, 22 October 2020 at 18:43:40 UTC, Steven Schveighoffer wrote: On 10/22/20 11:00 AM, Vino wrote: [...] Different error: Row[] data = conn.query("SELECT * FROM hostlog").array; This is trying to call mysql-native's UFCS query function on Connections, which isn&#x

Re: mysql-native Help required

2020-10-24 Thread Vino via Digitalmars-d-learn
On Friday, 23 October 2020 at 20:28:40 UTC, aberba wrote: On Thursday, 22 October 2020 at 18:43:40 UTC, Steven Schveighoffer wrote: [...] Was about to say that. Part of why I think some people hate OOP...due to misuse. All my MySQL projects have this getConnection() function. Hi All

MySQL connection strange behavior (again...)

2012-02-22 Thread miazo
Hello, I'm facing a strange problem(s) with connecting from D to MySQL database under Windows XP. I've read almost everything on this newsgroup concerning database connectivity, I've checked D libraries written by others, I've read MySQL documentation on its C API, I sear

Frustration [Was: mysql binding/wrapper?]

2012-04-30 Thread Ary Manzana
On 5/1/12 2:44 AM, simendsjo wrote: On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana wrote: Looking at the code of mysql.d I see a big switch with many cases like "case 0x01: // TINYINT". But then there's the SQLType enum with those constants. Why the enum values are not used in the cases? (and

ddbc: MySQL/MariaDB: Access Violation

2015-05-17 Thread Suliman via Digitalmars-d-learn
I am using this driver for access to MariaDB http://code.dlang.org/packages/ddbc The problem that it's work fine when it's used from desktop App, but when I try to run it's from vibed app i get "Access Violation". In my.ini I added string: bind-address = 127.0.0.1 Also I run next command:

mysql-native: SQL Transaction support?

2015-09-17 Thread salvari via Digitalmars-d-learn
I'm using mysql-native library for massive data load. I've been trying to use transactions to improve performance but it doesn't seem to work. I'm parsing a text input file, the generated sql is about 1 million lines of SQL. By using mysql-native it takes about 4 hours

Re: Question about mysql-d Object

2015-12-07 Thread Márcio Martins via Digitalmars-d-learn
On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke wrote: When I do the following: auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung"); auto rows = mysql.query("select field from my_table limit 50"); foreach(row;ro

Re: Question about mysql-d Object

2015-12-07 Thread Daniel Kozak via Digitalmars-d-learn
On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke wrote: When I do the following: auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung"); auto rows = mysql.query("select field from my_table limit 50"); foreach(row;ro

Re: Question about mysql-d Object

2015-12-08 Thread Martin Tschierschke via Digitalmars-d-learn
On Monday, 7 December 2015 at 16:11:19 UTC, Daniel Kozak wrote: On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke wrote: When I do the following: auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung"); auto rows = mysql.qu

Re: Question about mysql-d Object

2015-12-08 Thread Daniel Kozak via Digitalmars-d-learn
V Tue, 08 Dec 2015 14:34:53 + Martin Tschierschke via Digitalmars-d-learn napsáno: > On Monday, 7 December 2015 at 16:11:19 UTC, Daniel Kozak wrote: > > On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke > > wrote: > >> When I do the following: &g

Re: Question about mysql-d Object

2015-12-08 Thread Daniel Kozak via Digitalmars-d-learn
V Tue, 08 Dec 2015 14:34:53 + Martin Tschierschke via Digitalmars-d-learn napsáno: > On Monday, 7 December 2015 at 16:11:19 UTC, Daniel Kozak wrote: > > On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke > > wrote: > >> When I do the following: &g

Re: Question about mysql-d Object

2015-12-08 Thread Martin Tschierschke via Digitalmars-d-learn
On Tuesday, 8 December 2015 at 15:14:06 UTC, Daniel Kozak wrote: [...] >> A nested loop, did not worked either: >> >> foreach(row;rows){ >> foreach(field;row){ >> writeln(field);} >> } [...] Now I took a work around, getting the field names in a separa

Re: Mysql-native - full database backup

2017-01-04 Thread crimaniak via Digitalmars-d-learn
On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote: Hi! How can i create a full database backup using mysql-native for D? Too common question. Do you have problems with driver usage? Do you have problems with database backup schema?

Re: Mysql-native - full database backup

2017-01-05 Thread Geert via Digitalmars-d-learn
On Thursday, 5 January 2017 at 01:16:09 UTC, crimaniak wrote: On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote: Hi! How can i create a full database backup using mysql-native for D? Too common question. Do you have problems with driver usage? Do you have problems with database backup

Re: Mysql-native - full database backup

2017-01-05 Thread Daniel Kozák via Digitalmars-d-learn
Geert via Digitalmars-d-learn napsal Čt, led 5, 2017 v 3∶13 : On Thursday, 5 January 2017 at 01:16:09 UTC, crimaniak wrote: On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote: Hi! How can i create a full database backup using mysql-native for D? Too common question. Do you have problems

Re: Mysql-native - full database backup

2017-01-05 Thread Geert via Digitalmars-d-learn
On Thursday, 5 January 2017 at 21:47:55 UTC, Daniel Kozák wrote: Geert via Digitalmars-d-learn napsal Čt, led 5, 2017 v 3∶13 : [...] [...] Nice function. Thanks!

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread Adam D. Ruppe
On Wednesday, 22 February 2012 at 12:06:42 UTC, miazo wrote: extern (C) { This should be extern(System), not extern(C). My guess is that's causing most your problems.

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread miazo
two versions of libmysql.lib that I could create: the one made from original libmysql.lib from MySQL installation converted with coffimplib utility, and the other one made from libmysql.dll with implib utility. Both versions compile if I stay with extern (C) instead of extern (Windows). I was

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread Mars
He said System, as in literally System, not System as in your System. Your example works fine for me with that.

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread miazo
Well, on http://dlang.org/attribute.html I can read that "System is the same as Windows on Windows platforms, and C on other platforms". BTW, under which Windows version did you check?

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread Adam D. Ruppe
On Wednesday, 22 February 2012 at 17:02:01 UTC, miazo wrote: Error 42: Symbol Undefined _mysql_init@4 libmysql.dll with implib utility. I think the /s switch is needed on that one when doing the mysql libraries on implib. /s changes what's done with the _ in the front. I've done t

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread miazo
Yes, /s or /system is a switch that appends _ in front of names from a .dll file. This is exactly how I've used implib.

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread miazo
Problem solved. :-) I found that it was @4 suffix that was missing. With a libmysql.def file as below: LIBRARY libmysql EXETYPE NT SUBSYSTEM WINDOWS EXPORTS _mysql_init@4 = mysql_init I was able to generate working libmysql.lib file with implib (with /system switch). That, with cha

Re: MySQL connection strange behavior (again...)

2012-02-22 Thread Kapps
On Wednesday, 22 February 2012 at 21:18:32 UTC, miazo wrote: Problem solved. :-) I found that it was @4 suffix that was missing. With a libmysql.def file as below: LIBRARY libmysql EXETYPE NT SUBSYSTEM WINDOWS EXPORTS _mysql_init@4 = mysql_init I was able to generate working libmysql

Re: MySQL connection strange behavior (again...)

2012-02-23 Thread miazo
You are right, coffimplib with -e switch does it.

Re: Frustration [Was: mysql binding/wrapper?]

2012-05-01 Thread simendsjo
On Tue, 01 May 2012 04:04:01 +0200, Ary Manzana wrote: It's sad. I always want to give D a chance. And when I do I always bump into errors and inconveniences. (...) Every time I want to start coding in D, or helping some project, I stumble into all kind of troubles. I have the same feelin

  1   2   >