Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datatype change problem (char to varchar) - overflow error?

Status
Not open for further replies.

computergeek

Programmer
May 23, 2001
193
0
0
CA
Hello,

PB 5.0 (Not sure if any patches were installed or not...)
SQL Server 6.5 (With current service pack)

I am in the midst of performing what was supposed to be a quick, small upgrade to an older PB application.

I changed the underlying tables and procedures datatypes from Char(5) to Varchar(10). Then within development environment I opened window/datawindow where table was accessed... removed and readded the column within the datawindow to ensure PB picked up on the new datatype. When I run the application when the retrieve is executed I get an Error - "Select Error: Data-Conversion resulted in overflow". Code example:

dw_master.Retrieve(selected_project_value)

Does anyone have any ideas on what to check?! I am baffled...

Computergeek
 
You might want to use the tried and true Powerbuilder technique of re-building the datawindow object from scratch.
This often 'fixes' these types of problems.
 
Regenerating the object sometimes resolves this sort of problem - try regenerating the datawindow and main window (in that order).

If this doesn't work, you could try exporting the datawindow (is export available in PB5? I've only used 6.5, 8, and now 9), deleting it, and re-importing it.

If this also fails (or is unavailable), then rebuild it from scratch as already suggested.
 
Hi,

I figured it out. The base window had a datawindow attached to it. I re-added the column to this base window and no more error.

Computergeek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top