QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Juanjogomez on July 15, 2018, 08:05:35 am

Title: SQL client
Post by: Juanjogomez on July 15, 2018, 08:05:35 am
Hello,
I have tried the example to work with SQL client, but it does not work with tables of more than 1 field. Only display the first. Can someone pass me the code to work with tables of several fields (the usual)?
Regards
Title: Re: SQL client
Post by: FellippeHeitor on July 15, 2018, 01:38:49 pm
Hi there Juanjogomez, and welcome to the Forum.

I assume you're talking about http://www.qb64.org/wiki/SQL_Client

I don't remember anyone using that code for any real world projects, to be honest. Hope you can find a solution soon.

Fellippe.
Title: Re: SQL client
Post by: Juanjogomez on July 15, 2018, 03:00:49 pm
Well, I was going to be the first. I have a billing program in QuickBasic and I thought to use Sql to update it
Thanks
Title: Re: SQL client
Post by: Juanjogomez on October 28, 2018, 03:34:55 pm
Good news,
I went back to try the code and it works perfectly. With a table of 40 columns it reads all the data perfectly.
I am considering rewriting the entire program, including Inform, although it will take many months because it is a billing management program with 65 subprograms and I do not have much time.
I'll tell you if I decide to do it.
Thank you
Title: Re: SQL client
Post by: TerryRitchie on October 28, 2018, 10:15:52 pm
Where did you obtain mysql.dll since the .NET link is down? Could you possibly attach your copy here please?
Title: Re: SQL client
Post by: TempodiBasic on October 29, 2018, 02:33:12 pm
Hi
it seems that MySQL is version 5.6 used in examples of wiki made by Galleon
https://dev.mysql.com/downloads/mysql/5.6.html#downloads (https://dev.mysql.com/downloads/mysql/5.6.html#downloads)
Title: Re: SQL client
Post by: TerryRitchie on October 29, 2018, 02:51:40 pm
Thank you for the link Tempo.
Title: Re: SQL client
Post by: TempodiBasic on November 04, 2018, 01:45:08 pm
Hi guys
I have gone depeer in the search of Mysql.dll

here the results:
1.
I downloaded before MySQL.DLL version 5.7, because I find first its link, but I get error !!!
So on one hand I have thought that it is not the real version used in the examples of wiki made by Galleon and I must get the right version of .DLL, but on the other hand I have thought that it seems very unuseful to make innovations without backward compatibilty... so I must get the right version of .DLL version 5.6

2.
to get the right file I download the complete system of MySQL for client and for server... and as you can see from pictures attached
on first I got MySQL.DLL version 5.6 32bit and examples on wiki works for a second and then I get the error1 posted as screenshot.
Why 32bit ? Because the
Quote
This page was last modified on 19 January 2013, at 23:25.
and Galleon talks about also QB64 SDL version...
However I got MySQL.DLL version 5.6 64bit after getting error1! But I have had another surprise! Please see at screenshot named error2. That is showed is the same error that I got with MySQL.DLL version 5.7! :-)

Here I attach a zipfile with the 3 Mysql.DLL  ver 5.6 32 bit , ver 5.6 64bit and ver 5.7 32 bit.

Who can confirm (have) the same results on his system?

Thanks to read


Title: Re: SQL client
Post by: TempodiBasic on November 04, 2018, 02:04:24 pm
I have forgotten the link for info

https://dev.mysql.com/doc/#topic (https://dev.mysql.com/doc/#topic)
https://dev.mysql.com/doc/refman/5.6/en/c-api-functions.html (https://dev.mysql.com/doc/refman/5.6/en/c-api-functions.html)

to download
https://dev.mysql.com/downloads/installer/ (https://dev.mysql.com/downloads/installer/)
To try code you need only MySQL Connectors, but I raccomande you to download the server if you must go deeper with MySQL
https://dev.mysql.com/downloads/mysql/ (https://dev.mysql.com/downloads/mysql/)
Title: Re: SQL client
Post by: SMcNeill on November 04, 2018, 02:43:30 pm
If you're using QB64 from the github repository, or from www.qb64.org, then you're using the standard 32-bit version of QB64 and need the 32-bit DLL to work with it.

Only if you're using QB64x64 from my site, (or built it on your own), will you need a 64-bit DLL.

If you're uncertain what you're running, just compile and test this:

Code: QB64: [Select]
  1. $IF 32BIT THEN
  2.    PRINT "You are on QB64 x32"
  3.     PRINT "You have QB64 x64"
Title: Re: SQL client
Post by: bplus on November 05, 2018, 08:17:35 am
Could just look at the top left corner of your IDE too.
Title: Re: SQL client
Post by: SMcNeill on November 05, 2018, 08:45:20 am
Could just look at the top left corner of your IDE too.

Except it's not always there (such as when you load a program and it displays the filename there).

_TITLE ideprogname + " - QB64"   <--- Like here.

Honestly, I guess it should always say "x64" or "x32", but I've just never taken the effort to search for all the places where _TITLE exists.
Title: Re: SQL client
Post by: bplus on November 05, 2018, 12:10:03 pm
I had not noticed that it changes with _TITLE but it is always there when I start up the IDE.

It would be nice in the About message from Help menu, but that would depend on compiling?
Title: Re: SQL client
Post by: TempodiBasic on November 05, 2018, 02:29:41 pm
Hi guys

I have QB64IDEx32 and so it must use mysql.dll at 32bit.
But Running examples 1 and 2  taken from wiki about SQL I got that it works just for one max two seconds than it crashes and  the manager of crushing of windows starts like you can see in attachment called Error1.

The point of my message was
Quote
Here I attach a zipfile with the 3 Mysql.DLL  ver 5.6 32 bit , ver 5.6 64bit and ver 5.7 32 bit.

Who can confirm (have) the same results on his system?

Thanks
Title: Re: SQL client
Post by: Juanjogomez on November 07, 2018, 02:28:55 pm
Hi.

I do not know what version I use of mysql.dll because I downloaded it some time ago. It works perfectly for me on 64-bit windows 7.

If you want I can send it to you to try it.
Title: Re: SQL client
Post by: TempodiBasic on November 08, 2018, 03:19:31 am
Hi Juan
Thanks to reply

I we wanto go deeper into the issue you can post the mysql.dll that you have, so I can test on my Pc system.
And you can test mysql that I posted (taken from Mysql package 5.6 32 and 64 bit and 5.7) to see if it works on you pc system.

Title: Re: SQL client
Post by: Juanjogomez on November 08, 2018, 01:16:52 pm
Hi TempodiBasic
Here are the files.
Tell me if they work for you
Title: Re: SQL client
Post by: Juanjogomez on November 08, 2018, 01:42:07 pm
I just tried the 32 bit library and it works perfectly. In contrast, with the 64 bit library and the ver57, the program says "cannot find dynamic library file". 

My operating system is windoes 10 64 bits


Title: Re: SQL client
Post by: TempodiBasic on November 10, 2018, 02:06:19 pm
I have made a strange experience

using your .DLL (that you have posted here ) and I get  "cannot find dynamic library file". :-(((
Yes I have downloaded also Helper file.

in the while using the LibMysql.dll (5.6 version 32bit) I got a first success that becomes a windows error (windows closes the program like when a program crashes)
Thanks to share your results.