Hi,
I'm trying to clean up a text file that I BCP'ed out of SQL Server
using the CleanString method. It works on small files of less than .5 mb,
but truncates larger files of 1mg or greater.
Does any one know why this is occurring? Is there a way to do this in visual
basic?

Re: CleanString() method by Klaus

Klaus
Fri Sep 30 12:20:42 CDT 2005

"chieko" wrote:
> Hi,
> I'm trying to clean up a text file that I BCP'ed out of SQL Server
> using the CleanString method. It works on small files of less than .5 mb,
> but truncates larger files of 1mg or greater.
> Does any one know why this is occurring? Is there a way to do this in
> visual basic?


Hi Chieko,

I either get an error "Buffer too small for returned string" for strings >
32 kB, or a truncated string.

So you may have to do the replacements that are listed in the help for
CleanString yourself, one by one.
Many of them don't seem to make any sense, but then I don't know a thing
about databases.

Regards,
Klaus



Re: CleanString() method by Klaus

Klaus
Fri Sep 30 12:27:37 CDT 2005

> Many of them don't seem to make any sense, but then I don't know a thing
> about databases.

To clarify: CleanText seems to be an old function designed to remove some
characters that some old databases had problems with. It probably was
restricted to 64kB strings, which was further reduced to 32 kB when Office
changed to Unicode.

But with Unicode, there doesn't seem any reason to strip/replace certain
characters, unless I miss something.

BTW, some other old outdated string functions are limited to 32kB, too, like
TypeText.

Klaus



Re: CleanString() method by chieko

chieko
Mon Oct 03 07:03:01 CDT 2005

Okay, thanks for the help.
Chieko

"Klaus Linke" wrote:

> > Many of them don't seem to make any sense, but then I don't know a thing
> > about databases.
>
> To clarify: CleanText seems to be an old function designed to remove some
> characters that some old databases had problems with. It probably was
> restricted to 64kB strings, which was further reduced to 32 kB when Office
> changed to Unicode.
>
> But with Unicode, there doesn't seem any reason to strip/replace certain
> characters, unless I miss something.
>
> BTW, some other old outdated string functions are limited to 32kB, too, like
> TypeText.
>
> Klaus
>
>
>