1. Vladimir K.
  2. PowerBuilder
  3. Tuesday, 26 March 2019 02:48 AM UTC

Greeting all.

appeon pb 2017r2

Amazon>Aurora>MySql database.

Trying to make a connection to it using JDBC ( i think i got right driver )

Having trouble creating pb db profile to build stored procedure based datawindow and also look up correct connect syntax for trans object.

I think i am entering wrong driver name as mysql-connector-java-8.0.15

I am also not sure how to specify database name

Will be greatly appreciated any hint or advise

Thank you

Sincerely

Vlad

Attachments (3)
PRASHANT NIRGUN Accepted Answer Pending Moderation
  1. Wednesday, 10 April 2019 08:35 AM UTC
  2. PowerBuilder
  3. # 1

HI

I am using ODBC and want to use JDBC can any one share the JDBC connection string with parameters. I am going to shift my database from localhost to VPS. It will help me to remove the dependancy of loading MySQL odbc driver copy driver.jar will be enough for me. 

Kindy provide example of how to pass options with connection parameter.

 

O/s : Windows 7 64 Bit

PB : Classical 12.5

Database : MySQL 5.5

 

Thanks in advance 

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 10 April 2019 19:44 PM UTC
JDBC is for Java apps. PowerBuilder is not a Java app. You need to use ODBC.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 March 2019 02:30 AM UTC
  2. PowerBuilder
  3. # 2

Hi Vlad;

  I think that your first avenue using the JDBC route might be the best from what I have read about AWS Aurora. It seems that whatever client you choose - it must support the RDS protocol (of which JDBC does).

FYI:   https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Connecting.html

  Reading further on in the Amazon documentation, it seems that RDS driver needs to be able to also handle "End Points". Many articles seem to recommend using the MariaDB Client driver for this task as another alternative.

  I'll keep on reading. If I come across something PowerBuilder'ish - I will post back.

Regards ... Chris

 

Comment
  1. Vladimir K.
  2. Thursday, 28 March 2019 13:11 PM UTC
Thank You Chris.

Sincerely

Vlad
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 March 2019 21:11 PM UTC
  2. PowerBuilder
  3. # 3

We have not tested out this exact combo at Appeon so I cannot say what are the tips and tricks to watch out for.  But theoretically it should work if you use ODBC.  Hopefully, somebody else can chime in here.

But I will add that from a security perspective it is not recommended to do this, and you could also introduce significant performance issues or you would need to make some noticeable changes to your source code.

From a security perspective you generally don't want to open up the database to the world.  Over the Internet typically you want to keep it to HTTP communication to the Web server and lock down your database.

From a performance perspective, PB roundtripping to the database over an Internet connection has much more latency than the same transmission over a LAN connection.  If you have a couple roundtrips to complete some action then that should be tolerable, but in our experience it's common for an app to have at least some areas that make dozens or hundreds of calls.

Comment
  1. Vladimir K.
  2. Wednesday, 27 March 2019 21:30 PM UTC
Armeen, thank you very match, i completely dismiss security issue.

Case close, i am pushing back this "JDBC connection idea" and will use ODBC.

Sincerely

Vlad
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 28 March 2019 01:15 AM UTC
Just to clarify no matter JDBC or ODBC you would have same potential security concern. The way we recommend to put PowerBuilder apps to the cloud is either use PowerServer or port all your business logic to C# Web APIs with the new features of PowerBuilder 2019.
  1. Helpful
  1. Vladimir K.
  2. Thursday, 28 March 2019 13:11 PM UTC
Got it.

Armeen, thank you again.

Sincerely

Vlad
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 26 March 2019 04:18 AM UTC
  2. PowerBuilder
  3. # 4

Why are you using JDBC?  With PB you would use ODBC driver.

Comment
  1. Vladimir K.
  2. Wednesday, 27 March 2019 13:48 PM UTC
Hi Armeen.

Glad to hear you.

Thank you for getting back to me.

I been ask: can we do it?

That's number one and number two is the fact, that we using ado.net connecting to mssql and in the past, i newer figure out how to use ODBC without creating datasource, connection syntax wise, for example:

SQLCA.DBMS = "ODBC"

SQLCA.AutoCommit = True

SQLCA.DBParm = "ConnectString='DSN=mysql-aws;UID=username;PWD=userpassword',StripParmNames='Yes'"



where "mysql-aws" it is a datasource i need to create first.

There is some references that it is possible to substitute this with driver name, but i newer figure out how to make it work.



Sincerely

Vlad

  1. Helpful
  1. Chris Keating
  2. Thursday, 28 March 2019 12:46 PM UTC
A DNSLess connection can be established using

Driver=;



For example, a DNSLess SQL Anywhere 17 connection would be

Driver=SQL Anywhere 17;eng=MyDbSrv;dbn=DbName;uid=dba;pwd=sql;....



The value for the Driver can be determined in the Drivers tab of the ODBC administer or the Driver column for the DSN mysql-aws.



  1. Helpful
  1. Vladimir K.
  2. Thursday, 28 March 2019 13:10 PM UTC
Thank you Chris.

I did work: mysql_trans.DBParm ="ConnectString='Driver={MySQL ODBC 8.0 ANSI Driver};Server=iwtest.............

Greatly appretiated.

Sincerely

Vlad
  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.