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

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

HARLIBRAAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sandeep_patelCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HARLIBRAAuthor Commented:
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
sandeep_patelCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.