Once you downloaded and installed, you will found the MySQL ODBC driver on your ODBC Windows.
Create a User DSN profile to connect to your MySQL Database, put the Data Source Name, etc.
Ceate a new Database Profile in Powerbuilder Database Painter and link the data source into the User DSN. Put the Username and Password.
Select the Preview tab then click the Test Connection button to make sure that you can connect to your database.
As a powerscript, click the Copy button and put inside the event that you want to connect
- // Profile MySQL
- SQLCA.DBMS = "ODBC"
- SQLCA.AutoCommit = False
- SQLCA.DBParm = "ConnectString='DSN=xxxxx;UID=xxxx;PWD=<******>'"
- CONNECT USING SQLCA;
No comments:
Post a Comment