Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1065
  • Last Modified:

Datawindow column change after database change

Hi,
I have Powerbuilder 5.0 using a database in PostgreSQL. I have a datawindow column whose field width I set to 15 during creation. Now, I want to change it to 100. I can make this change on the database side, but the datawindow does not get updated with this. I tried to 'regenerate' the datawindow, but the change still does not take place. I also have the setting 'Retain Data to Design' checked on in the DataWindow options.
When I try to set the field value to something containing more than 15 characters, for the first time, it adds it. But when I try to add a second such value, it gives me the error that says 'Error Number 6. Error text = Invalid DataWindow row/column specified.' and it gives me the name of the object, function and line in script where it has a problem.
Is it even possible to make the field length change without creating a new datawindow? Incidentally, this works fine, without problem when a Oracle database is used.

Thanks in advance.
0
pcasxd0
Asked:
pcasxd0
  • 2
  • 2
2 Solutions
 
Vikas_DixitCommented:
You can export the dw and do the change in the .srw file and import it back.
Please remember to take backup of your pbl before trying this.
Regards,
Vikas
0
 
diasroshanCommented:
hi,
the solution is kinda crude/funny but it always works and the problem u've posted is very common....

open ur datawindow and go to the sql view of the datawindow(SQL syntax)....
now u can see the sql statement of ur datawindow....
remove any comma and return...it would give an error of incorrect syntax...now add the comma and return to ur datawindow view...save the datawindow...ur problem is solved!!!


check the column specification of ur datawindow....now it should show 100 in the 'type'...

do ask if u need more assistance...

Cheers,
Rosh
0
 
pcasxd0Author Commented:
Hi VikasDixit,
Thanks for the answer. I'll try and do that.

Hi Rosh,
Thanks for the answer. The problem with PostgreSQL is that it does not open the SQL view in the PB datawindow. When we click on the SQL icon in the toolbar, it simply hangs. I don't know why this is. When the database is Oracle, the SQL Editor gets opened without problems.  Your solution does sound interesting, though! Thanks.

I'll try this out and grade pretty soon.
0
 
diasroshanCommented:
hi,

the problem stated by u is a bug in PB5...
"The problem with PostgreSQL is that it does not open the SQL view in the PB datawindow. When we click on the SQL icon in the toolbar, it simply hangs"

DONT live with it... its a bug and many other such bugs which can be solved by applying the relevant patches...

go to www.sybase.com

---> go to the download option
---> in the download page there is a link EBFs/Maintenance
---> u will be asked to register once u go to that link....
---> register onto sybase(this will help in future)...its free
---> there will be a selection of time frame...select 'all'
---> now when u search u will find 'PowerBuilder - PowerBuilder 5.0.04 EBF#3
'---> Download it
Install this patch and many of ur errors will be solved...


do ask for more assistance...

Cheers,
Rosh
0
 
pcasxd0Author Commented:
Rosh:
Vow, really, that's a great tip. You might have guessed by now that I'm a total newbie here. I will certainly do that download. I thought that there was no way around it.
VikasDixit: Since I like both answers, I'm going to split the points.
Thanks.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now