Solved

Trying to save a datawindow in a  table column of type longvarchar in PowerBuilder 10

Posted on 2008-10-31
3
445 Views
Last Modified: 2013-12-26
Hi there. We are trying to save a datawindow syntax into a table column of type longvarchar.
It was working fine previously with 3 groupby clauses but as soon as we add 4th group by
it won't load. all the groupby's are defined in the datawindow painter The trailer for this new group has 10 computed fields. The datawindow has about 35 columns including computed fields in the trailer bands
for the groupby's. If I remove all computed fields in the new trailer band the datawindow saves fine.


/******** Validate the Syntax of Datawindow *************/	 	

ls_data_source = event ue_datawindow_syntax() 	

IF ls_data_source = "FALSE"  OR  (dw_1.create(ls_data_source,ls_err_buffer ) = -1 ) THEN 

messagebox("Dynamic Reports","Failed to Upload the Dynamic Reports   " +  is_datawindow_name  + ".~r~n Please Contact with IS Department",true)

		IF dw_report_header.deleterow(0) = 1 THEN 

			dw_report_header.update() 

			triggerevent ("ue_reset")

			RETURN -1

		END IF

	END IF

Open in new window

0
Comment
Question by:HARLIBRA
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 500 total points
ID: 22855783
could be the length of datawindow syntax being returned is more than the size of longvarchar column. Check the sqlca.sqlerrtext after the updating that column.

If that is the case then either increase the size of column (if possible) or change the datatype to longbinary or blob or clob(whatever is available and larger in the database you are using).

Regards,
Sandeep
0
 

Author Comment

by:HARLIBRA
ID: 22863867
Sandeep if you look at the attached code its not failing trying to save but  rather when the syntax
is being checked before saving. I have checked SQLCA.SQLCODE. It is 0. The command
dw_1.create(ls_data_source,ls_err_buffer )  is failing.
The ls_err_buffer has a value =  "incorrect syntax" .
iS there a way to check the datawindow syntax and why it is failing

Thanks
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 22871660
what is the code in 'ue_datawindow_syntax' and what it returns to 'ls_data_source'?
Paste the code and value of ls_data_source here.

As you are creating or changing anything dynamically, and there is some PB datawindow syntax error which cause the problem.

Regards,
Sandeep
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error when doin maven update 2 92
VB.Net Reusable Form Layout 4 137
how to bring to back always mid parent image form 21 77
Best free Visio Editor? 2 138
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now