1. Sathishkumar S
  2. PowerBuilder
  3. Monday, 9 May 2022 13:18 PM UTC

Hi Appeon,

 

I am getting error Column Does not exist when I try to retrieve datawindow from stored procedure in MSSQL Database but same I am doing form SQL anywhere which is not giving error.

 

 

In Datawindow I have 49 columns in Stored procedure I have 48 columns when I retrieve i am getting below error (which I can resolve by removing the extra columns in the datawindow but since the application is already running in different database so like to find way out).

 

 

But I do the same by connecting the SQL anywhere Database where I am not getting error.

 

So I would like to know is there any option or settings available to omit the additional columns in the datawindow if it is not available in the Store Procedure result set.

Kindly advise me on this.

 

Thanks in advance.

Sathishkumar S.

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Monday, 9 May 2022 15:49 PM UTC
  2. PowerBuilder
  3. # Permalink

Hello, Sathishkumar -

If a stored procedure is used as the data source for a DataWindow and the stored procedure produces a result set of say, 49 columns, then the DataWindow must also define its columns to exactly match the number and datatype of these 49 columns. 

You are not required to utilize (display) all of the 49 columns, but in order for the result set to be correctly parsed and loaded into the DW's primary data buffer, the DW's column "signature" must match the data source, be it a stored procedure or a SELECT statement.

I've seen/used examples of stored procedures that produce different result sets based on the argument value(s) passed into the stored procedure (an abbreviated summary report versus a details report of the same internal dataset, for example), and this kind of stored procedure can be successfully used as the data source for a DW, but each unique result set configuration produced by the stored procedure must be matched to a separate DW that is designed for each of the unique result sets - and you as the developer must ensure the proper DW is assigned/used via code.

Regards, John

Comment
  1. Sathishkumar S
  2. Monday, 9 May 2022 16:51 PM UTC
Hi John,



Thank you for the clarification,



When I check in the Datawindow retrieval from SQL Anywhere sybase central database it is not giving any error

Store procedure having 48 columns and datawindow having 49 columns it is working fine.

Thats why curious to check what may the reason for that

if there is a settings available in SQL Anywhere sybase central which i may not aware will help.



Thank you

Sathishkumar S.
  1. Helpful
  1. John Fauss
  2. Monday, 9 May 2022 19:12 PM UTC
I am unable to answer your question, as I have no experience using SQL Anywhere. Hopefully, others in the Appeon Community will offer you some advice.
  1. Helpful
  1. Sathishkumar S
  2. Wednesday, 11 May 2022 16:53 PM UTC
Hi John,



Thank you, I will wait for response from others.



Thank you

Sathishkumar
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 9 May 2022 17:29 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

Are you running maybe one of Appeon's demo applications?

I'm asking, because the SQL for sqlanywhere demo apps is different to the demos with other databases.

regards,

MiguelL

Comment
  1. Sathishkumar S
  2. Monday, 9 May 2022 18:21 PM UTC
Hi MiguelL,



No, It is not a Demo application, I am running on the actual application with SQL Anywhere Sybase Central DB in the development environment which is also running on the production environment with any issues.

Thank you,

Sathishkumar.





  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 10 May 2022 00:36 AM UTC
Just a wild guess: try using dbparm "DisableBind=1", it has been a workaround for several bugs with the mssql oledb driver.

Can you show us your SQLCA values?

regards,

MiguelL
  1. Helpful
  1. Sathishkumar S
  2. Tuesday, 10 May 2022 11:13 AM UTC
Hi MiguelL



Please find the Connection profile which I am using and DisableBind=1 is not helping to avoid the error.



[DB Transaction]

DisplayName=DB Main Test

DBMS=MSOLEDBSQL SQL SERVER

Database="DB_TEST"

Servername="sql-dev"

DBParm= "Database='DB_TEST',DelimitIdentifier=1,DelimitIdentifierToDB='Yes',DisableBind=1"

Autocommit = True

EncryptName=EncryptHP::





Thank you

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