Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Paolo_Ricardo

Pages: [1] 2
1
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 07, 2020, 06:26:18 pm »
@SpriggsySpriggs

OK, thanks.

2
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 07, 2020, 06:11:42 pm »
@SpriggsySpriggs

So ''mysql_real_connect(conn, "qb64db2.db.7445102.hostedresource.com", "qb64guest", "QB64forever", "qb64db2", 0, 0, 0)'' is no longer available - and that was the reason for  the problems?

OK, so, apart from the non-functioning SQL Client code, are there any tutorials available on integrating QB64 with MySQL?

Would I be correct in assuming that MYSQL.BM and MYSQL.BI provide a full implementation of MySQL's declarations/functions/subs?

I am quite determined to learn QB64 and MySQL so thanks for your help so far and for any further information.

3
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 11:42:06 pm »
@SMcNeill

It was giving a 'missing .dll' message for the 64-bit version but that seems to have disappeared. The compiled programs are in a work folder. I have now put the .dlls in the work folder. The .BAS and .EXE files are in the same folder.

4
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 11:38:18 pm »
I put the .dlls in the source directory and used the .\ option. At least I get the same result now - a window opening and closing. No message about missing .dll for the 64 bit version.

The message that shows up briefly is, I think,  "MYSQL Client: " + mysql_get_client_info$ . It's a very short message.

Does this have anything to do with nothing else happening? As far as I'm aware I'm not connected to any database.

PRINT mysql_real_connect(conn, "qb64db2.db.7445102.hostedresource.com", "qb64guest", "QB64forever", "qb64db2", 0, 0, 0)


5
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 11:11:53 pm »
No, because the .dlls are in the program folder and not with the source - which is why I used the absolute paths.

6
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 10:55:07 pm »
Attached is Screenshots.docx   [ You are not allowed to view this attachment ]  


7
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 10:12:12 pm »
I have CLIENT32.BAS:

Code: QB64: [Select]
  1. DECLARE CUSTOMTYPE LIBRARY "mysql_helper"
  2.     FUNCTION offset_to_string$ ALIAS offset_to_offset (BYVAL offset AS _OFFSET)
  3.     FUNCTION offset_at_offset%& (BYVAL offset AS _OFFSET)
  4.  
  5. '#### mysql.dll not provided ####
  6. DECLARE DYNAMIC LIBRARY "c:\qb64-32\mysql"
  7.  

and CLIENT64.BAS:

Code: QB64: [Select]
  1. DECLARE CUSTOMTYPE LIBRARY "mysql_helper"
  2.     FUNCTION offset_to_string$ ALIAS offset_to_offset (BYVAL offset AS _OFFSET)
  3.     FUNCTION offset_at_offset%& (BYVAL offset AS _OFFSET)
  4.  
  5. '#### mysql.dll not provided ####
  6. DECLARE DYNAMIC LIBRARY "c:\qb64-64\libmysql64bit"
  7.  

The rest of the code is common to both (SQL Client).

I am using the correct .DLLs for each version - I have copies of  your original  libmysql32bit.dll and libmysql64bit.dll in the appropriate folder (the 32-bit renamed to mysql.dll) and I have checked that the files sizes are correct.

So, unless I am doing something wrong, I am stumped. I am assuming that I just need to compile the SQL Client code.

Thanks for your patience :-)

8
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 07:04:23 pm »
I'm getting inconsistent results. Changed the mysql.dll paths to absolute paths: "c:\qb64-32\mysql" and "c:\qb64-64\libmysql64bit" - the .dlls are in the program folder (not the source folders)

Using the 32-bit compiler I get a window which closes very quickly - I cannot see if anything is written to it. With the 64-bit compiler I get a window opening and then the "cannot find .dynamic library'' message.

9
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 06:07:32 pm »
I've modified SQL Client thus:

DECLARE DYNAMIC LIBRARY "libmysql64bit" (using the 64-bit QB)

and I still get the "Cannot file dynamic library" message. The .dll and the mysql_helper.h are both in the 64-bit folder for QB64 so I'm stuck.

One thing I noticed: you have DIM conn AS _OFFSET and conn is used throughout the code except right at the end:

'*** Close the db ***
mysql_close con

Shouldn't this be conn?

10
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 05:14:36 pm »
@SpriggsySpriggs

Thanks for the clarification. Understood now.

As far as MySQL is concerned, first I wanted to try my hand at Basic, something I haven't done for upwards of 40 years. Second I seem to recall that Basic (apart from Microsoft PDS 7.1) did not have any form of indexed file methods i.e. ISAM, and it appears that there are no ISAM libraries around now. I saw references to MySQL in the QB64 forums and, being familiar with SQL and MS SQL Server, I thought I would have a look.

So I've installed all the MySQL stuff including the Workbench and am slowly trying to familiarize myself with it - and QB64 :-)


11
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 06, 2020, 03:41:27 pm »
@SpriggsySpriggs

OK, I missed the separate 32- and 64-bit downloads.

Code: QB64: [Select]
  1. I have it named libmysql64bit.dll so it would just be easier to know which one goes with which IDE. You can just change the name in the code to match the DLL.

You mean in the SQL Client code?
When you say you've changed to code to OPTION EXPLICIT which code do you mean?

Sorry, I'm a noob at all this stuff.

12
QB64 Discussion / Re: Cannot find dynamic library file
« on: December 05, 2020, 10:33:08 pm »
@SpriggsySpriggs

I compiled the code shown here https://www.qb64.org/wiki/SQL_Client. I also used your libmysql32bit.dll and libmysql64bit.dll (of course renaming them to mysql.dll for each use.)  Was there something else I should have compiled e.g. "some code which uses 'mysql_fetch_fields':"

Also ref 32- or 64-bit, where does one decide that? I can't see anything in the IDE giving a choice. Of course with a name like QB64 I assume that 64-bit is the default.

Thanks

13
QB64 Discussion / Cannot find dynamic library file
« on: December 05, 2020, 08:51:11 pm »
I've been experimenting with mySQL and I tried to use the SQL Client code in the QB64 Wiki. The code compiles without errors and a console screen appears with the above message. There is no indication of which .dll id missing.

I have mysql_helper.h and mysql.dll in the QB64 program folder. I gave tried compiling with both the 32-bit and the 64-bit versions of mysql.dll

Thanks

14
QB64 Discussion / Re: ISAM libraries
« on: December 04, 2020, 06:12:57 am »
@Juanjogomez

Thanks. A search has been most fruitful.

15
QB64 Discussion / ISAM libraries
« on: December 04, 2020, 01:04:18 am »
In my examination of BASIC many years ago I seem to recall that Microsoft PDS 7.1 included ISAM handling routines. Are there any libraries that offer this capability in conjunction with QB64?

Pages: [1] 2