1. Dan Cooperstock
  2. PowerBuilder
  3. Thursday, 17 August 2017 16:10 PM UTC

I'm not finding an entry for MySQL in the ODB170.INI file, so retrieval of identity keys isn't working. I found the following on the web somewhere:

[MySQL]
PBSyntax='MySQL_SYNTAX'
PBNoCatalog='YES'
PBTableOwner='NO'
DelimitIdentifier='NO'

[MySQL_SYNTAX]
;GetIdentity='SELECT LAST_INSERT_ID()'
GetIdentity='Select @@identity'

(I actually added the 2nd through 4th lines in the [MySQL] section.) I think either version for GetIdentity in [MySQL_SYNTAX] will work.

Is there anything else I should add there? What I have so far definitely solves the retrieval of identity keys problem.

Thanks.

Dan Cooperstock Accepted Answer Pending Moderation
  1. Thursday, 17 August 2017 19:36 PM UTC
  2. PowerBuilder
  3. # 1

I'm observing a problem with the minimal ODBC170.INI section I added for MySQL (or perhaps the problem is with something else).

In the database painter, if I connect to a MySQL datasource, open Tables, and then try to open one of the tables to see its columns, I get a messagebox saying "Table foo has no columns; possible invalid table format".

I tried adding a few lines into the [MySQL_SYNTAX] section that were present in another of my sections for another DB (where I can see a table's columns fine), as follows, in case they were relevant:

CreateTable='CREATE TABLE &TableName (::ColumnElement[::ColumnElement]...)'
ColumnElement='&ColumnName &DataType'
DropTable='DROP TABLE &TableName'
 

But that didn't make any difference. (Yes, I exited and restarted PB 2017 so it would see the change.)

Any bright ideas?

Comment
  1. Gerry Whitmarsh
  2. Friday, 18 August 2017 07:13 AM UTC
Hi Dan,



I think that the problem lies elsewhere. I am using MySQL 5.7 with the 32 bit ODBC connector 5.3 and have no problem. I also do not have any MySQL section in the PBODB170.INI.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.