Solved

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

Posted on 2008-10-31
3
458 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

730 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