Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

744 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

13 Experts available now in Live!

Get 1:1 Help Now