problems with chr(0) in sql output 
Author Message
 problems with chr(0) in sql output

We have some large databases on DB2 running on an RS/6000 and are using VFP
5.0 as the front end to access them.  We use the IBM DB2 ODBC driver and pass
sql commands back and forth.  Our problem is that we seem to be getting some
sporadic problems with entire records or portions of records of the resulting
output being corrupted with chr(0).  I don't believe that we have the
corruption in the DB2 environment, it just seems to come across in the output
I receive in Foxpro.  I've seen some messages in other newsgroups about
chr(0), but they all seem to believe the problem was Novell servers.  We do
have Novell servers, but the data is not on those servers and never gets
stored as temp files on the server.  Its getting pretty frustrating as it is
starting to affect the reports we run.  Our numbers are suddenly not
reliable.

I've searched the MS Knowledgebase and found nothing, and have tried to
search through the IBM help files but found nothing there either.

I've asked for permission from the powers that be to go to VFP 6 but have
been unable to get the wheels moving very fast.

ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
Jeremy

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 26 Feb 2003 02:32:16 GMT  
 problems with chr(0) in sql output
It's not the Novell servers, it's the Novell client software.  Are you
running the Novell Client or the Microsoft Client?

--
Fred

Quote:

> We have some large databases on DB2 running on an RS/6000 and are using
VFP
> 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver and
pass
> sql commands back and forth.  Our problem is that we seem to be getting
some
> sporadic problems with entire records or portions of records of the
resulting
> output being corrupted with chr(0).  I don't believe that we have the
> corruption in the DB2 environment, it just seems to come across in the
output
> I receive in Foxpro.  I've seen some messages in other newsgroups about
> chr(0), but they all seem to believe the problem was Novell servers.  We
do
> have Novell servers, but the data is not on those servers and never gets
> stored as temp files on the server.  Its getting pretty frustrating as it
is
> starting to affect the reports we run. Our numbers are suddenly not
> reliable.

> I've searched the MS Knowledgebase and found nothing, and have tried to
> search through the IBM help files but found nothing there either.

> I've asked for permission from the powers that be to go to VFP 6 but have
> been unable to get the wheels moving very fast.

> ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> Jeremy

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 26 Feb 2003 02:48:55 GMT  
 problems with chr(0) in sql output

Yes, I have seen the problem and having it now.  I am running SQL Server 7
and VFP 6.0.  I have no Novell boxes in my neighborhood, much less on my
network.  In many cases my text fields have the chr(0) at the end of the
field as if the 'c' type string was written to the table and the count was
off by one, leaving the chr(0).  What is strange is that some of the records
are ok.  Sucks!

I have tried to RTRIM all the fields using SQL update, I have done the same
reading them into an updatable VFP cursor, ALLTRIM() then back out, etc. but
no luck so far.  So the theories about Novell causing the problem are not
complete.

Mike

Quote:

> We have some large databases on DB2 running on an RS/6000 and are using
VFP
> 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver and
pass
> sql commands back and forth.  Our problem is that we seem to be getting
some
> sporadic problems with entire records or portions of records of the
resulting
> output being corrupted with chr(0).  I don't believe that we have the
> corruption in the DB2 environment, it just seems to come across in the
output
> I receive in Foxpro.  I've seen some messages in other newsgroups about
> chr(0), but they all seem to believe the problem was Novell servers.  We
do
> have Novell servers, but the data is not on those servers and never gets
> stored as temp files on the server.  Its getting pretty frustrating as it
is
> starting to affect the reports we run. Our numbers are suddenly not
> reliable.

> I've searched the MS Knowledgebase and found nothing, and have tried to
> search through the IBM help files but found nothing there either.

> I've asked for permission from the powers that be to go to VFP 6 but have
> been unable to get the wheels moving very fast.

> ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> Jeremy

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 26 Feb 2003 04:37:25 GMT  
 problems with chr(0) in sql output
Jeremy,

If you are talking about large blocks of chr(0)'s appearing in your cursor
sometime after the initial SPT cursor is returned, then yes I've seen the
problem. Only we experienced this problem with Sybase. Your issue with DB2
would seem to point the finger more at FoxPro.

Our only work around was to immediately after the SPT call was to reselect
the data to a "normal" VFP cursor:

SQLExec( "select ..." )
select * ;
   from sqlresult ;
   into cursor stablecursor
--
df    - (Microsoft FoxPro MVP) http://www.geocities.com/df_FoxPro/

Quote:

> We have some large databases on DB2 running on an RS/6000 and are using
VFP
> 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver and
pass
> sql commands back and forth.  Our problem is that we seem to be getting
some
> sporadic problems with entire records or portions of records of the
resulting
> output being corrupted with chr(0).  I don't believe that we have the
> corruption in the DB2 environment, it just seems to come across in the
output
> I receive in Foxpro.  I've seen some messages in other newsgroups about
> chr(0), but they all seem to believe the problem was Novell servers.  We
do
> have Novell servers, but the data is not on those servers and never gets
> stored as temp files on the server.  Its getting pretty frustrating as it
is
> starting to affect the reports we run. Our numbers are suddenly not
> reliable.

> I've searched the MS Knowledgebase and found nothing, and have tried to
> search through the IBM help files but found nothing there either.

> I've asked for permission from the powers that be to go to VFP 6 but have
> been unable to get the wheels moving very fast.

> ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> Jeremy

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Thu, 27 Feb 2003 06:44:32 GMT  
 problems with chr(0) in sql output
We are using the Novell Client version 3.2.0.0, but if you take a look
at some of the subsequent posts to this thread people are having this
problem without Novell servers so I doubt they are using the Novell
Client.

Jeremy



Quote:
> It's not the Novell servers, it's the Novell client software.  Are you
> running the Novell Client or the Microsoft Client?

> --
> Fred




Quote:
> > We have some large databases on DB2 running on an RS/6000 and are
using
> VFP
> > 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver
and
> pass
> > sql commands back and forth.  Our problem is that we seem to be
getting
> some
> > sporadic problems with entire records or portions of records of the
> resulting
> > output being corrupted with chr(0).  I don't believe that we have
the
> > corruption in the DB2 environment, it just seems to come across in
the
> output
> > I receive in Foxpro.  I've seen some messages in other newsgroups
about
> > chr(0), but they all seem to believe the problem was Novell servers.
 We
> do
> > have Novell servers, but the data is not on those servers and never
gets
> > stored as temp files on the server.  Its getting pretty frustrating
as it
> is
> > starting to affect the reports we run. Our numbers are suddenly not
> > reliable.

> > I've searched the MS Knowledgebase and found nothing, and have tried
to
> > search through the IBM help files but found nothing there either.

> > I've asked for permission from the powers that be to go to VFP 6 but
have
> > been unable to get the wheels moving very fast.

> > ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> > Jeremy

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Fri, 28 Feb 2003 22:34:15 GMT  
 problems with chr(0) in sql output
Which flavor of VFP6 are you using?  Any Service Packs?

What I get is a mixture of good records and bad records.  Sometimes the
CHR(0) starts in the middle of one of the fields and then continues
through the end of the record and sometimes it is the whole record.
This will continue for a few records sometimes and then I'll get a block
of records that are OK, then the chr(0) starts again.  Sometimes it is
the last several hundred records that are completely filled with chr(0).
 There just doesn't seem to be a pattern.  What I'm worried about is how
often does this happen and I don't notice it.  Some reports it's obvious
because the numbers are so drastically different than I would expect,
but others could have been off by a little bit for months.

Jeremy



Quote:

> Yes, I have seen the problem and having it now.  I am running SQL
Server 7
> and VFP 6.0.  I have no Novell boxes in my neighborhood, much less on
my
> network.  In many cases my text fields have the chr(0) at the end of
the
> field as if the 'c' type string was written to the table and the count
was
> off by one, leaving the chr(0).  What is strange is that some of the
records
> are ok.  Sucks!

> I have tried to RTRIM all the fields using SQL update, I have done the
same
> reading them into an updatable VFP cursor, ALLTRIM() then back out,
etc. but
> no luck so far.  So the theories about Novell causing the problem are
not
> complete.

> Mike




- Show quoted text -

Quote:
> > We have some large databases on DB2 running on an RS/6000 and are
using
> VFP
> > 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver
and
> pass
> > sql commands back and forth.  Our problem is that we seem to be
getting
> some
> > sporadic problems with entire records or portions of records of the
> resulting
> > output being corrupted with chr(0).  I don't believe that we have
the
> > corruption in the DB2 environment, it just seems to come across in
the
> output
> > I receive in Foxpro.  I've seen some messages in other newsgroups
about
> > chr(0), but they all seem to believe the problem was Novell servers.
 We
> do
> > have Novell servers, but the data is not on those servers and never
gets
> > stored as temp files on the server.  Its getting pretty frustrating
as it
> is
> > starting to affect the reports we run. Our numbers are suddenly not
> > reliable.

> > I've searched the MS Knowledgebase and found nothing, and have tried
to
> > search through the IBM help files but found nothing there either.

> > I've asked for permission from the powers that be to go to VFP 6 but
have
> > been unable to get the wheels moving very fast.

> > ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> > Jeremy

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Fri, 28 Feb 2003 23:01:43 GMT  
 problems with chr(0) in sql output
Always a possibility there are other causes/situations that produce the same
problem.  The only places I've seen it are with workstations using the
Novell Client.  That certainly doesn't qualify it as THE only way it
happens.

--
Fred


Quote:
> We are using the Novell Client version 3.2.0.0, but if you take a look
> at some of the subsequent posts to this thread people are having this
> problem without Novell servers so I doubt they are using the Novell
> Client.

> Jeremy



> > It's not the Novell servers, it's the Novell client software.  Are you
> > running the Novell Client or the Microsoft Client?

> > --
> > Fred



> > > We have some large databases on DB2 running on an RS/6000 and are
> using
> > VFP
> > > 5.0 as the front end to access them.  We use the IBM DB2 ODBC driver
> and
> > pass
> > > sql commands back and forth.  Our problem is that we seem to be
> getting
> > some
> > > sporadic problems with entire records or portions of records of the
> > resulting
> > > output being corrupted with chr(0).  I don't believe that we have
> the
> > > corruption in the DB2 environment, it just seems to come across in
> the
> > output
> > > I receive in Foxpro.  I've seen some messages in other newsgroups
> about
> > > chr(0), but they all seem to believe the problem was Novell servers.
>  We
> > do
> > > have Novell servers, but the data is not on those servers and never
> gets
> > > stored as temp files on the server.  Its getting pretty frustrating
> as it
> > is
> > > starting to affect the reports we run. Our numbers are suddenly not
> > > reliable.

> > > I've searched the MS Knowledgebase and found nothing, and have tried
> to
> > > search through the IBM help files but found nothing there either.

> > > I've asked for permission from the powers that be to go to VFP 6 but
> have
> > > been unable to get the wheels moving very fast.

> > > ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be appreciated.
> > > Jeremy

> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sat, 01 Mar 2003 00:38:03 GMT  
 problems with chr(0) in sql output
Any ideas on fixing it?  What have you done in the situations that you
have seen it?  Is there a fix for the client or must it be removed?

Jeremy



Quote:
> Always a possibility there are other causes/situations that produce
the same
> problem.  The only places I've seen it are with workstations using the
> Novell Client.  That certainly doesn't qualify it as THE only way it
> happens.

> --
> Fred



> > We are using the Novell Client version 3.2.0.0, but if you take a
look
> > at some of the subsequent posts to this thread people are having
this
> > problem without Novell servers so I doubt they are using the Novell
> > Client.

> > Jeremy



> > > It's not the Novell servers, it's the Novell client software.  Are
you
> > > running the Novell Client or the Microsoft Client?

> > > --
> > > Fred



> > > > We have some large databases on DB2 running on an RS/6000 and
are
> > using
> > > VFP
> > > > 5.0 as the front end to access them.  We use the IBM DB2 ODBC
driver
> > and
> > > pass
> > > > sql commands back and forth.  Our problem is that we seem to be
> > getting
> > > some
> > > > sporadic problems with entire records or portions of records of
the
> > > resulting
> > > > output being corrupted with chr(0).  I don't believe that we
have
> > the
> > > > corruption in the DB2 environment, it just seems to come across
in
> > the
> > > output
> > > > I receive in Foxpro.  I've seen some messages in other
newsgroups
> > about
> > > > chr(0), but they all seem to believe the problem was Novell
servers.
> >  We
> > > do
> > > > have Novell servers, but the data is not on those servers and
never
> > gets
> > > > stored as temp files on the server.  Its getting pretty
frustrating
> > as it
> > > is
> > > > starting to affect the reports we run. Our numbers are suddenly
not
> > > > reliable.

> > > > I've searched the MS Knowledgebase and found nothing, and have
tried
> > to
> > > > search through the IBM help files but found nothing there
either.

> > > > I've asked for permission from the powers that be to go to VFP 6
but
> > have
> > > > been unable to get the wheels moving very fast.

> > > > ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be
appreciated.
> > > > Jeremy

> > > > Sent via Deja.com http://www.deja.com/
> > > > Before you buy.

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 01 Mar 2003 05:02:02 GMT  
 problems with chr(0) in sql output
One of my clients switched to the Microsoft Client, one changed their Novell
Client settings, and yet another dumped Novell and went with NT.  None of
them are experiencing any more problems, to my knowledge.  If they were, I'm
sure I'd still be hearing about it. <g>

If you stay with the Novell Client, be sure you've got the latest version
(whatever that is) and check the Novell web-site for suggestions on the
settings.

--
Fred


Quote:
> Any ideas on fixing it?  What have you done in the situations that you
> have seen it?  Is there a fix for the client or must it be removed?

> Jeremy



> > Always a possibility there are other causes/situations that produce
> the same
> > problem.  The only places I've seen it are with workstations using the
> > Novell Client.  That certainly doesn't qualify it as THE only way it
> > happens.

> > --
> > Fred



> > > We are using the Novell Client version 3.2.0.0, but if you take a
> look
> > > at some of the subsequent posts to this thread people are having
> this
> > > problem without Novell servers so I doubt they are using the Novell
> > > Client.

> > > Jeremy



> > > > It's not the Novell servers, it's the Novell client software.  Are
> you
> > > > running the Novell Client or the Microsoft Client?

> > > > --
> > > > Fred



> > > > > We have some large databases on DB2 running on an RS/6000 and
> are
> > > using
> > > > VFP
> > > > > 5.0 as the front end to access them.  We use the IBM DB2 ODBC
> driver
> > > and
> > > > pass
> > > > > sql commands back and forth.  Our problem is that we seem to be
> > > getting
> > > > some
> > > > > sporadic problems with entire records or portions of records of
> the
> > > > resulting
> > > > > output being corrupted with chr(0).  I don't believe that we
> have
> > > the
> > > > > corruption in the DB2 environment, it just seems to come across
> in
> > > the
> > > > output
> > > > > I receive in Foxpro.  I've seen some messages in other
> newsgroups
> > > about
> > > > > chr(0), but they all seem to believe the problem was Novell
> servers.
> > >  We
> > > > do
> > > > > have Novell servers, but the data is not on those servers and
> never
> > > gets
> > > > > stored as temp files on the server.  Its getting pretty
> frustrating
> > > as it
> > > > is
> > > > > starting to affect the reports we run. Our numbers are suddenly
> not
> > > > > reliable.

> > > > > I've searched the MS Knowledgebase and found nothing, and have
> tried
> > > to
> > > > > search through the IBM help files but found nothing there
> either.

> > > > > I've asked for permission from the powers that be to go to VFP 6
> but
> > > have
> > > > > been unable to get the wheels moving very fast.

> > > > > ANYBODY SEEN SOMETHING LIKE THIS???   Any help would be
> appreciated.
> > > > > Jeremy

> > > > > Sent via Deja.com http://www.deja.com/
> > > > > Before you buy.

> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sat, 01 Mar 2003 06:16:05 GMT  
 problems with chr(0) in sql output

W2K SP1, VFP 6.0 SP4, and since I wrote the note SQL 8.00.100 (aka) SQL2K.
Not that SQL2K helped anything, probably just made a bigger mess.  No, the
only thing I am getting, so far, is chr(0) at the end of a text field just
like it was a 'c' string.


Quote:
> Which flavor of VFP6 are you using?  Any Service Packs?



Sat, 01 Mar 2003 10:48:14 GMT  
 problems with chr(0) in sql output
Jeremy,

If you find changing network clients fixes the problem please let me know
I'd like to get the info up to the right folks at Microsoft. For us the
problem was very intermittent ans we use the Novell client. Do you have a
reproducible scenario where the corruption will always occur?

Have you tried the secondary VFP SELECT command I posted in my other reply
to see if that cursor remains stable?
--
df    - (Microsoft FoxPro MVP) http://www.geocities.com/df_FoxPro/


Quote:
> Which flavor of VFP6 are you using?  Any Service Packs?

> What I get is a mixture of good records and bad records.  Sometimes the
> CHR(0) starts in the middle of one of the fields and then continues
> through the end of the record and sometimes it is the whole record.
> This will continue for a few records sometimes and then I'll get a block
> of records that are OK, then the chr(0) starts again.  Sometimes it is
> the last several hundred records that are completely filled with chr(0).
>  There just doesn't seem to be a pattern.  What I'm worried about is how
> often does this happen and I don't notice it.  Some reports it's obvious
> because the numbers are so drastically different than I would expect,
> but others could have been off by a little bit for months.



Sat, 01 Mar 2003 12:01:08 GMT  
 problems with chr(0) in sql output
I haven't tried the secondary select yet but if I don't have any other
problems today I might give that a try.  I might also check into the
client scenario.  I do have one report that if run with certain
parameters seems to produce the data corruption almost always.  Its
really odd.  If I run the report for the current month, I get reasonable
 numbers and although I haven't stepped through it to verify, I would
bet no corruption.  If I select it to be run for a month in the past I
get the chr(0) data in various tables.

I'll let you know what I find out today.

Jeremy



Quote:
> Jeremy,

> If you find changing network clients fixes the problem please let me
know
> I'd like to get the info up to the right folks at Microsoft. For us
the
> problem was very intermittent ans we use the Novell client. Do you
have a
> reproducible scenario where the corruption will always occur?

> Have you tried the secondary VFP SELECT command I posted in my other
reply
> to see if that cursor remains stable?
> --

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 01 Mar 2003 21:17:15 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. problems with chr(0) in sql output

2. Problem with SQL Query Designer output to Report

3. Can SQL output be input to another SQL?

4. Import From SQL with field name more than 10 Chr

5. Help! CHR Problem

6. FP 2.6 CHR(7) problem on NT

7. Printing Problem with ???chr(27)+ ... on Visual Foxpro

8. chr problem in foxpw

9. CHR() Problems in 2.6

10. ?CHR(7) problem in 2.6 on NT

11. chr() problem

12. Formatting SQL Select Output

 

 
Powered by phpBB® Forum Software