Ask a Question related to ASP Database, Design and Development.
-
Roland Hall #1
Re: Using ASP to Generate SQL Select Statement creates unexpected blank spaces
"Kaven Tan" wrote in message
news:F2CAE485-4014-40C7-9A52-1007B51B290E@microsoft.com...
: I am having a problem removing the blank space that is generated by my
code as follows using ASP
:
:
: SELECT * FROM [USER_TABLE] WHERE [USER_ID]=' 0221 ' OR [USER_ID]=' ASDF '
:
: As you experienced chaps will know I should now get any blank space in
between = and 0221 or ASDF it should be
:
: SELECT * FROM [USER_TABLE] WHERE [USER_ID]='0221' OR [USER_ID]='ASDF'
:
: Snippet of code as follows:
:
: For i=1 to Delete_NO
: ourkey=trim("[USER_ID]="&chr(39))
: ourkey=trim(ourkey&trim(deletearray(i-1))&trim("'"))
:
: sqlkey=sqlkey & ourkey
: If i<Delete_NO then
: sqlkey=sqlkey & " OR "
: End if
: Next
:
: Dim strsql
: strsql="SELECT * FROM [USER_TABLE] WHERE " & sqlkey
: Response.Write strsql
What will this do?
For i = 1 to Delete_NO
sqlkey = sqlkey & "[USER_ID]='" & trim(deletearray(i-1)) & "'"
If i < Delete_NO then
sqlkey = sqlkey & " OR "
End if
Next
Dim strsql
strsql="SELECT * FROM [USER_TABLE] WHERE " & sqlkey
Response.Write strsql
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - [url]http://www.microsoft.com/technet/scriptcenter/[/url]
WSH 5.6 Documentation - [url]http://msdn.microsoft.com/downloads/list/webdev.asp[/url]
MSDN Library - [url]http://msdn.microsoft.com/library/default.asp[/url]
Roland Hall Guest
-
blank spaces in text fields in form
I am a newbie. I have a simple form with just a few fields. A user fills out the form, goes to another page to preview his/her entries, and then may... -
Scanning in Adobe Acrobat 6 creates multiple blank pages
Hi, I have a problem with Adobe Acrobat 6. When scanning documents on an HP Office JEt v45, Adobe is creating multiple blank pages. It creates... -
Blank Spaces in the Score?
I know this is pretty basic and vague, but I have some scenes in my movie that automaticall play strung together with lingo that run in this order. ... -
Export EPS creates a blank file
When exporting an EPS (any kind), the resulting EPS is empty! There is a low res header which is shown in Quark, but Distilling the EPS or opening it... -
Trimming Blank Spaces in String
You can use the VB.NET function RTRIM. -- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net "Temp" <tempmail@temp.com> wrote in...



Reply With Quote

