OpenLink ODBC and field length

Chris Kelleher

Administrator
Staff member
I'm trying to figure out a problem with a customer's OpenLink ODBC link.

Information:
win95 clients, connecting to Progress with Access via OpenLink MT.
8.2B running on SCO OS5

The ODBC is giving them access to only the default field length from the
Progress database schema. Unfortunately, we put more data than the field
format (the field is defined as 'x(25)', but frequently stores as much as
'x(50)'). I need to find how to tell ODBC to show a larger field size.

I have a .dat file, in /usr/openlink/bin. As far as I know, this was put
in place to help handle arrays better. I found what appears to be the
definition of the field that I wanted to change. It was in the format:
'F|LastName|1|25|0|0|yes|The person's last name.'

I modified this line to look like this:
'F|LastName|1|60|0|0|yes|The person's last name.'

This did not seem to make any difference in how the data is presented
within Access. I've stopped and re-started the openlink broker on the
server with the commands 'oplshut' and 'oplrqb', and had the customer
re-link the tables in Access. There is still no difference.

What am I missing here? I was handed this situation, and haven't done much
of anything with ODBC. I may be missing something here, but don't know
what to look for.

Thanks--

--James--

James Burts james@klas.com
Keystone Systems, Inc. (919)782-1143
Manager of Software Development
 

Chris Kelleher

Administrator
Staff member
Hi James,

We are evaluating both the Merant and OpenLink ODBC drivers.

We are having this field length problem with the Merant drivers. I put the
same question to the peg a couple of days ago, and received a couple of
responses to the effect that to guarantee to always pass the entire string,
you have to change the schema to reflect the longest possible field length.
:^(

It was suggested that this was not an issue with OpenLink, so we were hoping
that OpenLink would overcome this problem. Please let me know if you receive
a solution off-line.

PS - We are having trouble getting a connection with OpenLink. You seem to
be running a similar setup to ours. Did you have any problems getting the
initial connection running? Is there anything missing from the docco that
you had to set up?

Regards,
Neil
 

Chris Kelleher

Administrator
Staff member
Hi James,

Try to do this:
1) Increase "beyond format" field size in tableview.dat
(as you have already done) AND
2) In "oplrqb.ini", section "[Environment PROGRESSxxx]"
(xxx is your Progress versions), set variable
MIN_FIELD_LEN to for example 20.
MIN_FIELD_LEN is the min field length you wish to be returned by OL.
3) Restart OL Request Broker. I'm not sure if this step is necessary.

In my case it works fine with:
- Crystal Reports 7,
- MS Access 97,
but it doesn't work with
- MS-Query 8.
- MS-Excel 97 (which use MS-Query 8 to get external data).

Hope this help,
Piotr.
 

Chris Kelleher

Administrator
Staff member
At 11:42 AM 12/7/99 +0100, Piotr.Korpas@alcatel.pl wrote:
>set variable MIN_FIELD_LEN to for example 20.

You've also stumbled on the way to do this for Merant/Intersolv
as well or OpenLink Lite. Go to the PC side, set the same
variable either in the AUTOEXEC (Win 9x) or the Environment
Tab in the System Control Panel (NT).


=================================================================
Geoff Crawford Phone: (973) 361 - 4224
Innovative Client Servers FAX: (973) 537 - 6946
75 Fleetwood Drive, Suite 200 Email: geoff@innov8cs.com
Rockaway NJ 07886 Web: http://www.innov8cs.com
Orange and Black Forever
 

Chris Kelleher

Administrator
Staff member
It sounds to me like you are saying that I stumbled into the right thing
for setting the field length of a particular field. Is the MIN_FIELD_LEN
required somehow to make the 'beyond format' changes take effect?

I'm willing to change the MIN_FIELD_LEN, but that sounds like it will apply
to all the fields in the entire database. What affect will it have to set
the MIN_FIELD_LEN to something like 60? (since this is the length I need
for the LastName field)

Thanks for your help.

--James--

James Burts james@klas.com
Keystone Systems, Inc. (919)782-1143
Manager of Software Development
 

Chris Kelleher

Administrator
Staff member
> It sounds to me like you are saying that I stumbled into the right
thing
> for setting the field length of a particular field. Is the
MIN_FIELD_LEN
> required somehow to make the 'beyond format' changes take effect?
>

I asked OL tech support how to make "beyond format" fields visible
and they told me to use MIN_FIELD_LEN only. So I did it, but it worked
only with OL's "C++ Demo 32 bit" application. Then I changed
tableview.dat's also and it started working with other applications but
not with MS Query.

> I'm willing to change the MIN_FIELD_LEN, but that sounds like it will
apply
> to all the fields in the entire database. What affect will it have to
set
> the MIN_FIELD_LEN to something like 60? (since this is the length I
need
> for the LastName field)

I don't know.

Maybe OL returns field in least, but still usable format.
I mean if field is defined as "x(8)" in tableview.dat and
MIN_FIELD_LEN=60 then only 8 chars are transfered. But if
MIN_FILED_LEN=5, tableview.dat or data dictionary format EQ 8
then 8 chars are transfered.

In my case I need 12 to 30 chars instead of default 8
for a few fields only. I didn't found any disadvantages after
I had made all this modifications.

Please let me know if you get more info off-PEG.

Piotr.
 

Chris Kelleher

Administrator
Staff member
We are fighting the same problem.

Client VB6 App on NT4.
Server 8.2A on SCO Openserver5

We are evaluating both Merant and OpenLink.

We have a field that can contain > 256 characters - maybe a couple of Kb or
so.

If we set the schema display format to 36 and MIN_FIELD_LEN to 360 in both
the oplrqb.ini and in the User Environment on the NT box, we still only
receive 36 bytes into our VB6 app.

Since it is only one field and we have schema changes coming up anyway, we
can work around it by changing the default display setting in the schema,
but I really don't like the idea of having to change the schema if some user
pastes a *lot* of data into that field.

Regards,
Neil
 

Chris Kelleher

Administrator
Staff member
Just had a thought. Say we set the display format = X(2048), to make sure we
get the whole string. (At least for the forseeable future - in light of some
other threads lately, I dread putting artificial limits on content.)

How much data will go across the connection if we have ony 26 characters in
the field? Will we get 26 bytes or 2048 bytes?

What if we just set the format to 32K - the progress limit for char fields
in V8?

Regards,
Neil
 

Chris Kelleher

Administrator
Staff member
> If we set the schema display format to 36 and MIN_FIELD_LEN to 360 in
both
> the oplrqb.ini and in the User Environment on the NT box, we still
only
> receive 36 bytes into our VB6 app.

Only with OpenLink:
Try OL "C++ Demo 32 bit" first. It works always which means:
1) MIN_FIELD_LEN=360 is enough for "C++ Demo" to see 360 chars,
2) "C++ Demo" doesn't need:
- any field length modyfications in tableview.dat,
- tableview.dat at all.

Piotr.
 

Chris Kelleher

Administrator
Staff member
We ran across this problem and worked around it using the substr() function
in our SQL statements.

In the MFG/PRO abs_mstr table, the field abs_id is format x(20). We require
up to 70 characters:

Select substr(abs_id,1,70) from abs_mstr .....

Works a treat.

Cheers

Ken Gardner
Enigma - "Facing the Future"
T +44 (0) 116 239 1219 | F + 44 (0) 116 238 8112
M +44 (0) 7801 743 078 | www.TheEnigma.co.uk
mailto:ken.gardner@TheEnigma.co.uk
 

Chris Kelleher

Administrator
Staff member
> We ran across this problem and worked around it using the substr()
function
> in our SQL statements.

> Select substr(abs_id,1,70) from abs_mstr .....

Works even with MS-Query...
smile.gif


Thanks Ken,
Piotr.
 
Top