cancel
Showing results for 
Search instead for 
Did you mean: 

Datawindow Error: ct_describe(): user api layer: external error

Former Member
0 Kudos

Hi,

In my application using Powerbuilder 12.5 and sybase 15.

While running my application, In some occassions i am getting this below error message.

"Select error: ct_describe(): user api layer: external error : An

illegal value of 4 given for parameter item."

i don't understand the above error message.Please suggest upon this.!

Thanks,

Krishna.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Your DataWindow has a column defined with the wrong datatype or a char column is too small. This can also happen if it is a stored procedure DataWindow and the resultset of the stored procedure changed but the DataWindow was not changed to match.

Former Member
0 Kudos

Hi Krishna;

  In concert with Roland's theory and adding to my suggestion to use the SQL Trace feature in PB .. make sure that you have the DBError event coded on your DW Control and DataStore's to trap the point where the CT_Describe error occurs. That might help you to pin-point the exact DWO in question when a bad column is encountered as the DWO runs its own internal FETCH loop when unpacking & retrieving the DBMS buffer contents is in play.

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

I have changed the DBMS = TRACE ASE. i'm checking on it. Thanks.

In my application i have found the DBparm value. Can you help me the difference between these two as shown below.

1. DBParm=ConnectString='DSN=EMPLOYEE_DB;UID=DBA;PWD=SQL'

2. DBParm="StaticBind=0"

Can you suggest upon this. Thanks.

Regards,

Krishna

Former Member
0 Kudos

Hi Krishna;

  FYI:  When StaticBind is set to 1 (the default), PowerBuilder does not validate the SELECT statement against the database server before retrieving data. It assumes that the result set matches the column format of the DataWindow object or report into which it is being retrieved. If a mismatch occurs, PowerBuilder displays an error.

  FWIW: I always let PB use the default (1 = yes) unless doing some special DML.

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Ok thanks for your information, So Static Bind is applicable only for SELECT statement. It can use for UPDATE/DELETE Statement.??

Regards,

Krishna

Former Member
0 Kudos

Yes, it only affects the SELECT statements. Its used when getting ready to do a Fetch on the result set to compare the RS's data types to ensure consistency.

Former Member
0 Kudos

Hi Chris,

I have trace the data window error message. please find the comment below where the exact error message is dropped.

"(2c10008): UPDATE kg_doc_move_request SET PRINT_STATUS = 'I' WHERE ENTRY_DT = '6-28-2013 9:32:55.636' AND EMPLOYEE_NO = 'AFFU542587' AND SYSTEM_ID = 'P' AND DOC_TYPE_IND = 'B' AND DOC_VERSION_NO = 999 AND BR_OFC_CD = 'PHL' AND PRINT_STATUS = 'N' AND DOC_SRC_IND = 'C'  (0.063 MS / 10768.962 MS)

(2c10008): EXECUTE: (0.001 MS / 10768.963 MS)

(2c10008): GET AFFECTED ROWS: (0.000 MS / 10768.963 MS)

(2c10008): ^ -1 Rows Affected

(2c10008): CANCEL: (0.001 MS / 10768.964 MS)

(2c10008): PREPARE:

(2c10008): SELECT kg_doc_move_request.ENTRY_DT, kg_doc_move_request.EMPLOYEE_NO, kg_doc_move_request.SYSTEM_ID, kg_doc_move_request.USER_ID, kg_doc_move_request.DOC_TYPE_IND, kg_doc_move_request.DOC_VERSION_NO, kg_doc_move_request.BR_OFC_CD, kg_doc_move_request.PRINT_STATUS, kg_doc_move_request.USER_NM, kg_doc_move_request.RISK_NO, kg_doc_move_request.REMARKS_IND, kg_doc_move_request.rtf_details FROM kg_doc_move_request  (5.794 MS / 10774.758 MS)

(2c10008): DESCRIBE: (0.022 MS / 10774.780 MS)

(2c10008): *** ERROR 999 ***(rc -1) : No CS_Command pointer passed to function: DESCRIBE

(2c10008): CANCEL: (0.001 MS / 10774.781 MS)"

Can u please suggest upon this. Tanx.!

Regards,

Krishna

Former Member
0 Kudos

Hi Krishna;

   What happens when you run failing the SQL statememt ...

SELECT kg_doc_move_request.ENTRY_DT, kg_doc_move_request.EMPLOYEE_NO, kg_doc_move_request.SYSTEM_ID, kg_doc_move_request.USER_ID, kg_doc_move_request.DOC_TYPE_IND, kg_doc_move_request.DOC_VERSION_NO, kg_doc_move_request.BR_OFC_CD, kg_doc_move_request.PRINT_STATUS, kg_doc_move_request.USER_NM, kg_doc_move_request.RISK_NO, kg_doc_move_request.REMARKS_IND, kg_doc_move_request.rtf_details FROM kg_doc_move_request

  in either the DBA Painter's ISQL pane or another DBA tool?

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Actually SQL statement fails when processing an update statement its return -1 rows affected.After that executing the above select SQL statement i'm getting the error message.You can refer the DB trace comments as i have shared to you in the above post.

It is Datawindow SQL. When i tried with DBA painter is working as expected

In sometime its failing but not everytime.

I'm totally confused, when executing the update statement why its should return -1 rows affected.!!

It should be either 1 or 0 rows affected right.?

Thanks.!

Regards,

Krishna

Former Member
0 Kudos

Hi Krishna;

  Yes, I would of expected a RC of 0 with Rows Affected = 1 if the where clause resolves to a unique key (which I assume it should).

  There now seems to be a "Cause & Effect" here as you seem to state that after an UPDATE fails the next DML command (in particular the SELECT) gets the CT_Describe ( ) error. It seems to me that you need to resolve why the UPDATE command is failing as this seems to destabilize the DBMS session.

  Can you can your DBA check the DB logs to see if there is any more information on the DBMS side as to the reason for the UPDATE failure?

Also - when the UPDATE fails does your PB application perform a ROLLBACK at that point?

Regards ... Chris

Former Member
0 Kudos

Take a look at the following url.  It may give you a good point to troubleshoot the problem:

http://manuals.sybase.com/onlinebooks/group-cnarc/cng1110e/ocerrors/@Generic__BookTextView/4081;hf=0

Former Member
0 Kudos

Hi Ted,

Thanks for a URL, but i am not able to solve that problem/ error message.

Any other suggestion upon this.?

Regards

Krishna

Former Member
0 Kudos

Everything I've read on this points to a datatype mismatch.  I would verify that datatypes of all the columns in the datawindow match the datatypes you're expecting from ASE.

You can try enabling trace on your connection.  Go into the DSN in your DBProfile and check the Generate trace checkbox. 

Former Member
0 Kudos

Hi Ted.

I agree with your suggestion about possible datatype mismatch. Also I remember similar messages with wrong column lengrh in the datawindow (but I think it was in older PB versions).

Andreas.

Former Member
0 Kudos

Hi   Krishna ;

1)  Are you using the ASE 15.x native client driver?

2) What release of ASE ... 15.??

3) PB Classic or PB.Net?

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Answer for your  Questions:


1.All our dataservers are Sybase ASE 15.7 ESD2
2.Adaptive Server Enterprise/15.7.0/EBF 20373 SMP ESD#02 /P/x86_64/Enterprise
3.PB Classic

Regards,
Krishna

Former Member
0 Kudos

Hi Chris,

Answer for your  Questions:


1.All our dataservers are Sybase ASE 15.7 ESD2
2.Adaptive Server Enterprise/15.7.0/EBF 20373 SMP ESD#02 /P/x86_64/Enterprise
3.PowerBuilder Classic 12.5 Build 2511

Regards,
Krishna

Former Member
0 Kudos

Hi      ;

  The #1 question is "how are you connecting to ASE"?

ie: SQLCA.DBMS = {OLE, ADO, SYC, ASE}  etc

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

SQLCA.DBMS = {SYC sybase system 10 CTLIB}

Former Member
0 Kudos

Ahhh .. that's the old ASE 12.5 client.

Can you try ....

SQLCA.DBMS = "ASE"

Former Member
0 Kudos

Hi Chris,

Again, i am getting the error message.

Any suggestion upon this..? Thnks..

Former Member
0 Kudos

1) Since PB 12.5.x is still 32 bit  .... you did install the ASE 15.x 32 bit client - correct?

2) Can you connect to ASE from the same PC that fails with PB using another DBMS tool?

Former Member
0 Kudos

Hi chris,

Connection is woking perfectly with ASE settings. But again i'm getting the same error message. Can you help me upon this.!

Former Member
0 Kudos

Hi Chris.

Ya, Connecting with ASE settings is perfect.But again i am getting the same error message.

Can u help me upon this.

Former Member
0 Kudos

Hi Chris,

I have changed the DBparm as ASE in my application is working fine in a machine which power builder is available.

But i have got below error message in another machine where i dont have powerbuilder.

"Error -1 DBMS ASE is not supported in your current installation.

connecting kg_code_db database."

Former Member
0 Kudos

Hi Chris,

Can u please share the URL to download ASE 15.x 32 bit client/ASE 15.x 64 bit client.

Thanks.!

Former Member
0 Kudos

Hi   ;

  The ASE client drivers are included in the ASE 15.x installation. Just run the ASE set-up again and select the "client" only. That should install everything you need from the ASE side.

FYI: Don't forget to deploy the PB DB interface driver ... PBASE125.dll with your application.

Regards ... Chris

Former Member
0 Kudos

Hi Chris.

Actually there is a separate client installer, wich is also available in MySybase with EBF's. The last one I've seen is 15.7 ESD #4.2.

Andreas.

Former Member
0 Kudos

Hi chris,

I can able to run my application after deploying the PBASE12.5.dll with DBparm as ASE in my connection.But again i'm getting the same error message as i mentioned in the beginning.

"ct_describe():user api layer: external error: An

illegal value of 4 given for the parameter item".

Any other suggestion upon this to solve/solution for this error message

Thanks.

Regards,

Krishna

Former Member
0 Kudos

Hi Chris,

Any other solution to solve this issue..?? Can you please suggest upon this..?? I am not able to resolve it.!! Its is server problem or source code problem..???

Thanks.

Regards,

Krishna

Former Member
0 Kudos

Hi Krishna;

  I would now suggest doing an SQL trace and see where the exact DML is issued that causes the DB client to fail.

  To have the PB run-time trace your PB application's SQL activity just add the following to your code ...

SQLCA.DBMS = "TRACE ASE"

HTH

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Thanks for ur suggestion. Let me try with using DBMS = TRACE ASE and find the exact DML.

Regards,

Krishna