Solved

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

Posted on 2008-10-31
3
469 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

717 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