Database:Connecting Promotic to MySQL

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Database:Connecting Promotic to MySQL

Postby WhitNey » Tue 07. Jul 2015 4:13:26

Greetings.

I have encountered the following problem while trying to connect Promotic to MySQL server.

In my MySQL database, I have created a database with the name "database 1" and table named "promotic". I browse through the examples provided and found out that the technology selected is DAO, and it's connecting to a MDB file. However, I need to use an ODBC connection. While trying to change the path of the data source, the path of the data source did not changed automatically when I select the DSN file "A" I created.

I have read through the documentation in the Help content but still it doesn't provide me a clear flow of what I should do since I am a beginner. Am I doing it the wrong way?
Can anyone guide me on how to connect MySQL to Promotic?

Thanks a lot.
WhitNey
 
Posts: 4
Joined: Tue 07. Jul 2015 3:56:44

Re: Database:Connecting Promotic to MySQL

Postby Kazimierz Heczko » Mon 13. Jul 2015 15:21:10

Greetings,

I suppose, that you use PmDatabase object to work with database.
In PROMOTIC there is a better way to work with tha databases, it is the object PmAdo.
In this object you can determine database/table by ConnesctionString.

Description of PmAdo object:
http://www.promotic.eu/en/pmdoc/Objects/Promotic/PmAdo/PmAdo.htm

Description of ConnectionString property:
http://www.promotic.eu/en/pmdoc/Objects/Promotic/PmAdo/PropMeth/DbConnectionString.htm

If you need to use PmDatabase object, you have to select both "Technology" and "Database type" configurator to ODBC.
You also have to install database driver for selected database (in your case for MySQL).
Important information:
PROMOTIC is 32-bit application and these applications need 32-bit driver for the databases on 64-bit systems.

Then you have to create DSN source, but on 64 bit Windows you have to run 32-bit ODBC administrator tool for creating them.
You can find it on path:
Windows/SysWOW64/odbcad32.exe

In this administrator tool you can create DSN source visible in all 32-bit applications.

Best regards.
Kazimierz Heczko
 
Posts: 68
Joined: Thu 13. Dec 2012 9:28:56

Re: Database:Connecting Promotic to MySQL

Postby WhitNey » Tue 14. Jul 2015 1:17:54

Hi, thanks for your help and additional information. I got it using the combination of DAO technology and ODBC. Will try out PmAdo :D
WhitNey
 
Posts: 4
Joined: Tue 07. Jul 2015 3:56:44


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 3 guests

cron