Resolved reading RAW data type

Robert Perkins

New Member
I have a table with at column defined as RAW and when I use it in a select statement I'm told "Column r$_data in Table Pub.t_bin has value exceeding its max length or precision.]". Can someone help me pull the value from this column?

Thank you
 

RealHeavyDude

Well-Known Member
You don't tell anything about your Progress/OpenEdge version but I'll take it that you are at least on some V9 ...

The Progress database is notorious for allowing to put data of any lenght into a field of data type CHARACTER or RAW as long as you don't blow it's limits regardless of the field's format - this is only the standard input/output format used in a frame ...

SQL relies on the SQL width of the fields. AFAIK it is automatically calculated from the 4GL format.

You can use the dbtool to fix the SQL width of the fields - though I've never needed it for fields of data type RAW ...

Heavy Regards, RealHeavyDude.
 

Robert Perkins

New Member
Sorry about that, yes it is 9.1D that I'm running. And I am brand new to Progress so I'm not sure what dbtool you are talking about but I'm looking for it.

But I have a question about what I'm trying to do here. I've been given three different progress databases and been asked to exchange data between this and another system. It appears to me that all the data in one of the databases is in this one table and in the r$_data column. Will it do me any good to read this table as SQL? Do you have a better option? I did not mean to change the subject on you like that but I've been reading many of your postings and you know quite a bit about this product. Thanks for the help.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
It would be helpful to know what operating system you are accessing the Progress databases on, and which product(s) you have installed.

In Unix the command is "showcfg" to get a product list. In case the directory isn't in your PATH, showcfg is in the bin subdirectory of the Progress installation directory which by default is /usr/dlc.

In Windows, look for a Progress folder in the start menu and run the "Config" shortcut. I haven't used 9.1D on Windows but the default location is probably C:\Progress or something similar. The program is called showcfg.exe.
 

RealHeavyDude

Well-Known Member
The dbtool is a command line utility that can be started against the database.

If you really plan to use the Progress databases with SQL you need to do two things ( I'll take it that you are already able to access the database with an account that holds the necessary privileges ):
9.1D is Stone Age software and was Progress' first serious try on SQL - so don't expect too much regarding performance.

Heavy Regards, RealHeavyDude.
 

Robert Perkins

New Member
I found the tool and expanded the column and now with their SQL Explorer tool I can get a results for that column. Of course it is just a string of characters in that window. I have my ODBCs working in MS SQL on all the tables that look like SQL tables but when I try and pull the RAW field across the SQL 2005 server crashes. I've got an open ticket with Progress support. I'm going all out to figure this out.
 

tamhas

ProgressTalk.com Sponsor
How big is the data and what kind and size of a field are you trying to put it in?

If you can read it successfully, it would seem the problem was on the destination end, not with Progress.
 

Robert Perkins

New Member
I'm unsure of the maximum size of the data in the column, I cannot use the length function on a field of type RAW. But even when I try a SELECT TOP 1 * from pub.t_bin and send the result to the screen either the _sqlsrv2 crashes or the SQL Server service crashes.
 

tamhas

ProgressTalk.com Sponsor
If you have run dbtool, you can see the width by looking at the _width field of the _file record for the table.

I can get a results for that column.

even when I try a SELECT TOP 1 * from pub.t_bin and send the result to the screen

These two statements seem contradictory.
 

Robert Perkins

New Member
Originally the field width was set to 16 and when it was set to this I could not select against the table using the Progress SQL Explorer nor the Progress Client tool and the ODBC connection would tell me the column was too long. I used the dbtools to change the length of the field to 30000 and now I can select with the Progress SQL Explorer tool and it shows the random characters I expected. The Client tool tells me it cannot display a column of type RAW. From MS SQL I setup a linked server using ODBC and when I do the 'SELECT TOP 1 * from progress..pub.table' from MS SQL it causes MS SQL or the ODBC driver to crash.

Thank you for the help.
 

tamhas

ProgressTalk.com Sponsor
It has been a while, but isn't the maximum field size in SQL Server 16K? If so, I can see why it would be upset at 30K. In any event, if you can read it with the SQL Explorer, it would appear to be a MS SQL problem, not a Progress problem.
 
Top