1. Bhanu Prakash
  2. PowerBuilder
  3. Wednesday, 1 August 2018 20:40 PM UTC

Hello,

I am getting this error while I am trying to run the powerbuilder(Version 12.5) application. I make sure the data source name,user name and password is correct. But still I am getting this error.

FYI - My SQL authentication mode is SQL and Windows Authentication Mode.

Please help me to fix this.

Alfredo Aldama Accepted Answer Pending Moderation
  1. Friday, 3 August 2018 03:16 AM UTC
  2. PowerBuilder
  3. # 1

Hi 

I hope your issue is solved, if not, you can make a test:

 

1.-Make  Database profile  and connect using PowerBuilder IDE, If you get Connection successful  then 

2.- In tab connection-> check Prompt for database Information √

3.-  Use only this in your string  to connect  "ConnectString='DSN=SS2017;" -> SQLCA.DBParm = "ConnectString='DSN=SS2017;"

4.- When the code execute CONNECT ...;  Box Prompt for Login and Password 

 

Regards !

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 2 August 2018 22:36 PM UTC
  2. PowerBuilder
  3. # 2

I don't see a semicolon after "PWD=".

 

Olan

Comment
There are no comments made yet.
Bhanu Prakash Accepted Answer Pending Moderation
  1. Thursday, 2 August 2018 14:32 PM UTC
  2. PowerBuilder
  3. # 3

Chris,

Added a DSN as System DSN with 32-bit and tried. But no use and still having same connection issue.

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 2 August 2018 15:11 PM UTC
The key now is to see what the values in your Transaction Object's SQLDBCode and SQLErrText fields are right after the DB "Connect" command is issued. Also, make sure that your DBParm field values are set correctly. ODBC is really picky about quotes (placement and single vs double) and semicolons in the correct place and sequence.



FYI: Here is my ODBC connection settings that I use on my PC's SS ...



// Profile SS_2017

SQLCA.DBMS = "ODBC"

SQLCA.AutoCommit = False

SQLCA.DBParm = "ConnectString='DSN=SS2017;UID=sa;PWD=;PBMaxBlobSize=1000000',Async=1,DBGetTime=5,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT',PacketSize=2048"





  1. Helpful
There are no comments made yet.
Bhanu Prakash Accepted Answer Pending Moderation
  1. Wednesday, 1 August 2018 21:16 PM UTC
  2. PowerBuilder
  3. # 4

Chris,

Thank you for the quick response! Appreciate your time for looking into my issue. I've enabled the trace and below is the trace log. Anything you can see from it?

FYI - I am new to the powerbuilder and this is my first application :)

/*---------------------------------------------------*/
/* 8/1/2018 16:11 */
/*---------------------------------------------------*/
(84c0008): LOGIN: (55.248 MS / 55.248 MS)
(84c0008): CONNECT TO TRACE ODB:
(84c0008): SERVER=TXDMV4ASQLPDB2
(84c0008): DBPARM=ConnectString='DSN=MCCSPRD;UID=MCCSPRD;PWD=' (9.057 MS / 64.305 MS)
(84c0008): PREPARE: (0.000 MS / 64.305 MS)
(84c0008): BEGIN TRANSACTION: (0.019 MS / 64.324 MS)
(84c0008): COMMIT: (0.007 MS / 64.331 MS)
(84c0008): DISCONNECT: (0.445 MS / 64.776 MS)
(84c0008): SHUTDOWN DATABASE INTERFACE: (0.000 MS / 64.776 MS)
/*---------------------------------------------------*/
/* 8/1/2018 16:11 */
/*---------------------------------------------------*/
(84c0008): LOGIN:(DBI_LOGIN) (41.609 MS / 41.609 MS)
(84c0008): CONNECT TO TRACE ODB:
(84c0008): SERVER=TXDMV4ASQLPDB2
(84c0008): DBPARM=ConnectString='DSN=MCCSPRD;UID=MCCSPRD;PWD='(DBI_CONNECT) (3.808 MS / 45.417 MS)
(84c0008): (DBI_ADJUST_CONNECT) (0.000 MS / 45.417 MS)
(84c0008): (DBI_CURRENT_OF_CURSOR) (0.000 MS / 45.417 MS)
(84c0008): PREPARE:(DBI_PARSE_ONLY) (0.000 MS / 45.417 MS)
(84c0008): (DBI_SPECIAL_CURSOR) (0.000 MS / 45.417 MS)
(84c0008): (DBI_SKIP_VERIFY) (0.000 MS / 45.417 MS)
(84c0008): (DBI_DESCRIBE_BEFORE_EXEC) (0.000 MS / 45.417 MS)
(84c0008): (DBI_SUPPORT_INPUT_PARM_BIND) (0.011 MS / 45.428 MS)
(84c0008): BEGIN TRANSACTION:(DBI_START_TRAN) (0.006 MS / 45.434 MS)
(84c0008): COMMIT:(DBI_COMMIT) (0.003 MS / 45.437 MS)
(84c0008): DISCONNECT:(DBI_DISCONNECT) (0.431 MS / 45.868 MS)
(84c0008): SHUTDOWN DATABASE INTERFACE:(DBI_SHUTDOWN_INTERFACE) (0.000 MS / 45.868 MS)

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 1 August 2018 21:54 PM UTC


Can you connect OK to that DBMS from the ODBC Administrator utility on the same machine as your App?
  1. Helpful
  1. Bhanu Prakash
  2. Wednesday, 1 August 2018 22:08 PM UTC
Yes Chris. The ODBC is good and it connects successfully.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 2 August 2018 03:01 AM UTC
Excellent! Also ,make sure that you create the DSN as a SYSTEM DSN and that its 32bit in nature.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 1 August 2018 21:10 PM UTC
  2. PowerBuilder
  3. # 5

Hi Bhanu;

  I wonder if the App is not

  1. concatenating the UserID & Password properly in your Transaction Object's DBParm field?
  2. The instance of SS you are trying to connect to does not have your UserID & Pwd set-up properly

Tip: try setting an SQL trace for more information in your App ...

ie: SQLCA.DBMS = "TRACE ODB"

Also, have a look at the Transaction object's SQLCode, SQLDBCode and SQLErrText properties for more information on the connection failure.

 

HTH

Regards ... Chris

Comment
  1. Bhanu Prakash
  2. Wednesday, 1 August 2018 21:16 PM UTC
Chris,



Thank you for the quick response! Appreciate your time for looking into my issue. I've enabled the trace and below is the trace log. Anything you can see from it?



FYI - I am new to the powerbuilder and this is my first application :)



/*---------------------------------------------------*/

/* 8/1/2018 16:11 */

/*---------------------------------------------------*/

(84c0008): LOGIN: (55.248 MS / 55.248 MS)

(84c0008): CONNECT TO TRACE ODB:

(84c0008): SERVER=TXDMV4ASQLPDB2

(84c0008): DBPARM=ConnectString='DSN=MCCSPRD;UID=MCCSPRD;PWD=' (9.057 MS / 64.305 MS)

(84c0008): PREPARE: (0.000 MS / 64.305 MS)

(84c0008): BEGIN TRANSACTION: (0.019 MS / 64.324 MS)

(84c0008): COMMIT: (0.007 MS / 64.331 MS)

(84c0008): DISCONNECT: (0.445 MS / 64.776 MS)

(84c0008): SHUTDOWN DATABASE INTERFACE: (0.000 MS / 64.776 MS)

/*---------------------------------------------------*/

/* 8/1/2018 16:11 */

/*---------------------------------------------------*/

(84c0008): LOGIN:(DBI_LOGIN) (41.609 MS / 41.609 MS)

(84c0008): CONNECT TO TRACE ODB:

(84c0008): SERVER=TXDMV4ASQLPDB2

(84c0008): DBPARM=ConnectString='DSN=MCCSPRD;UID=MCCSPRD;PWD='(DBI_CONNECT) (3.808 MS / 45.417 MS)

(84c0008): (DBI_ADJUST_CONNECT) (0.000 MS / 45.417 MS)

(84c0008): (DBI_CURRENT_OF_CURSOR) (0.000 MS / 45.417 MS)

(84c0008): PREPARE:(DBI_PARSE_ONLY) (0.000 MS / 45.417 MS)

(84c0008): (DBI_SPECIAL_CURSOR) (0.000 MS / 45.417 MS)

(84c0008): (DBI_SKIP_VERIFY) (0.000 MS / 45.417 MS)

(84c0008): (DBI_DESCRIBE_BEFORE_EXEC) (0.000 MS / 45.417 MS)

(84c0008): (DBI_SUPPORT_INPUT_PARM_BIND) (0.011 MS / 45.428 MS)

(84c0008): BEGIN TRANSACTION:(DBI_START_TRAN) (0.006 MS / 45.434 MS)

(84c0008): COMMIT:(DBI_COMMIT) (0.003 MS / 45.437 MS)

(84c0008): DISCONNECT:(DBI_DISCONNECT) (0.431 MS / 45.868 MS)

(84c0008): SHUTDOWN DATABASE INTERFACE:(DBI_SHUTDOWN_INTERFACE) (0.000 MS / 45.868 MS)
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.