Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

CleanString() method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chieko - 30 Sep 2005 15:15 GMT
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?
Edward Thrashcort - 30 Sep 2005 16:58 GMT
More information required

Eddie

> 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?
Klaus Linke - 30 Sep 2005 18:20 GMT
> 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
Klaus Linke - 30 Sep 2005 18:27 GMT
> 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
chieko - 03 Oct 2005 13:03 GMT
Okay, thanks for the help.
Chieko

> > Many of them don't seem to make any sense, but then I don't know a thing
> > about databases.
[quoted text clipped - 11 lines]
>
> Klaus

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.