PC Review


Reply
Thread Tools Rate Thread

Clearing Hidden Characters

 
 
Kirk P.
Guest
Posts: n/a
 
      6th Feb 2009
I've got VBA written that supplies the SQL for a pass-through query. The
user supplies the order numbers they want to search for (separated by
commas), and the SQL is written. The WHERE clause contains this VBA code:

division_order_id IN " & "('" & Replace([txtOrder], ",", "','") & "') "

The intention here is to clear out any spaces that may be contained in the
string. When the SQL is written to the pass-through query, the WHERE clause
looks like this:

division_order_id IN ('142211238','
142211662')

Oracle only finds the first item. However if I simply hit the delete key
just after the 3rd apostrophe, the SQL changes to this

division_order_id IN ('142211238','142211662')

There appears to be some hidden character that's causing the line break.
How do I identify and get rid of these "hidden" characters?


 
Reply With Quote
 
 
 
 
Rob Wills
Guest
Posts: n/a
 
      6th Feb 2009
looks like you have a Carriage return...

Try this


replace(insert_String_here,Chr(10),"")


"Kirk P." wrote:

> I've got VBA written that supplies the SQL for a pass-through query. The
> user supplies the order numbers they want to search for (separated by
> commas), and the SQL is written. The WHERE clause contains this VBA code:
>
> division_order_id IN " & "('" & Replace([txtOrder], ",", "','") & "') "
>
> The intention here is to clear out any spaces that may be contained in the
> string. When the SQL is written to the pass-through query, the WHERE clause
> looks like this:
>
> division_order_id IN ('142211238','
> 142211662')
>
> Oracle only finds the first item. However if I simply hit the delete key
> just after the 3rd apostrophe, the SQL changes to this
>
> division_order_id IN ('142211238','142211662')
>
> There appears to be some hidden character that's causing the line break.
> How do I identify and get rid of these "hidden" characters?
>
>

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      6th Feb 2009
"Rob Wills" <(E-Mail Removed)> wrote in message
news:804A5033-A6D5-49AE-A21C-(E-Mail Removed)...
> looks like you have a Carriage return...
>
> Try this
>
>
> replace(insert_String_here,Chr(10),"")



Chr(10) is a line feed, not a carriage return. That could still be what the
"hidden" characters are, so if the above replacement does the job, great.
If it doesn't, try replacing Chr(13) instead, or as well.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden Characters Gene Mills Microsoft Excel Programming 1 14th Nov 2008 04:15 PM
Clearing 1 or 2 characters in a field & not retype all the charact =?Utf-8?B?bHV2MmJpa2Uy?= Microsoft Access 3 23rd May 2007 06:57 PM
Hidden characters =?Utf-8?B?Um9va2llIDFzdCBjbGFzcw==?= Microsoft Excel Programming 1 21st Nov 2005 10:24 PM
Word 2002 Clearing and removing hidden and collaboration data Jamess B. Holladay Microsoft Word Document Management 1 15th Nov 2005 03:59 PM
Accessing/Clearing range in hidden workbook DarrenW Microsoft Excel Programming 2 17th Jul 2003 04:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:05 PM.