I have a little script that is supposed to check for a certain value in a db column, and then do something if that particular calue is present:Code:
...<%ElseIf rsIDK.Fields.Item("my_column").Value = "/default.asp" then ...
The problem is that my_column can contain up to 300 characters, so the code above doesn't work. What I really need is a wildcard at the end of "/default.asp" but I don't really know the correct way of doing this.
I'm passing a unique identifier from page1 to page2 to page3 querried from MS SQL Server. When I pass the value, it puts the value in the curly brackets. (Page1 is for display and Page2 is for edit and Page3 is update edit)
When I go to Page3, it gives me an error saying "Syntax error converting from a character string to uniqueidentifier" {7171B9BD-4599-43D9-9521-3DA583A1BB1A} This is the value and the error page says "id=%7B7171B9BD-4599-43D9-9521-3DA583A1BB1A%7D" It seems tp put "%7B" and "%7D" for "{" and "}". Has anyone seen this?
I'm also passing numbers and text and they don't seem to have this problem, just the unique key.
I have a script which checks the current page name and write out a certain class if it's true to achieve an active menu item effect.
I want to expand upon it a little and have it check for any pages beginning with business rather than list business_dir_info.asp?id=2517 where there are loads of ids. At the moment it's just set to check for business.asp which is the top level page, is there any sort of wildcard character I can use?
Var1 's content can be "errorone" o "errortwo" or "good". I need to detect if there is "errorone" or "errortwo" with the If clause. How can I do that using the wildcard?
Example that doesnt work: if var1 = *"error"* then
Dear all, if in asp. i wanna to use the command request.querystring to check the URl. For example, my item when passing to next form will be either 4 or 6 character. How do i tell asp what to do if the string pass 4 character and if it pass 6 character.
My code example for 4 character is A100, 6 character is A10001. different number of character will have to perform different task for me.
I try to use "?" as wildcard but it fail Btw if i had stored chiense character in ACCESS, but when it go thru asp n display on IE, it show "???" instead of the chinese character.
I am trying to show a series of movies on a web page. All of the movies are the same width, but have different heights. When I take out the width and height parameters, the pictures display fine, but the movies get the bottom cut off. When I put the parameters back, it stretches out the images to fit the entire box. Any way to make the height parameter a wildcard?
I have an Access database. I am using a dropdown search box. One of the options is "Search All States" and I set the value to %. In the recordset on the results page, I have the default set to %. Here is the SQL statement:
SELECT * FROM ClientInfo WHERE State = 'varState' and varState = Request.Form("State")
However, I get no results when choosing this option in the dropdown Code:.
I want to post a wildcard IP in a varchar field in my mysql table so when I call it in the script it shows up giving that entire range of IP's. I've tried doing it like. 24.129.184.* but it doesn't seem to work.
what I want to do is get read a database entry and if it doesn't start with http:// then I want to include it.
I can't figure out what to use as a wildcard in the first line though
IF rsGuestbook("VisitorHome") = "http://" THEN %> <a href="<%=rsGuestbook("VisitorHome")%>" target="_blank">Name: <% ELSE %> <a href="http://<%=rsGuestbook("VisitorHome")%>" target="_blank">Name: <% END IF
I have a form where a user can choose one or more options from drop-down menus to search the db :
service town county
The id's are all numbers in a MySql database. I have put the default param for each search as % and this only changes if the relevant search option is chosen: Code:
I created an ISAPI dll application to prevent SQL Injection attempts by intercepting the HTTP requests and sanitizing both GET and POST variables (or any combination of both) before the request reaches the intended code. This is especially useful for legacy applications not designed to deal with MS SQL Server Injection attempts. Though this application was designed with MS SQL Server in mind, it can be used with no or minimal changes with other database engines.
This ISAPI is only compatible with Internet Information Server (IIS) 6.0 which comes with Windows 2003. Windows XP uses IIS 5 engine which DOES NOT support ISAPI Wildcard.
I'm trying to pass the wildcard variable % to another page via request.querystring.
When I go to pick up the variable through request.querystring, it will never diplay the "%" if one is included. It will diplay any other characters included in the variable though.
I have a login form in which i have logins for company as 'National City" But when i capture the login name to give it in my query on some other form as Request.Querystring(username) Its recognises it as National%20City... i dont want to chhange my login names and keep it as NationalCity as one full word.How can i tell ASP to recoginze this as a space in the query ?
I am using mySQL with ASP. I have a trouble with Turkish characters as I am tring to get and display data from mySQL database. However, I can see whole Turkish characters exactly when I use phpMyAdmin.I used the following tags on HTML but I couldn't achieve to display Turkish characters in any way.
mySQL database lang: latin5_turkish_ci <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> and
We have an application which uses surname and the date of birth to allow people to login. The SQL gives an error if the user's surname contains the character '
I have a partner sending me by post method to an asp page some text (xml string).
It arrives to my page encoded as follows %9a%2f%Purchaseorder%3....f
The < and > and spaces are replaced by nuùmbers and percentage sign I am using Request.BinaryRead(BytesTotal) and then doing response write and I am getting exactly the same string with the encoding How can tell my asp page to translate the encoded text to normal text?
How do I remove those special characters in a variable? I think there are a dozen special character and so I use a dozen replace object. Is there an object that call this in one call instead of a dozen?
I'm having a problem finding/using an escape character with this ASP/JScript application I'm creating. Basically I have text sometimes that has apostrophes or double quotations in them, but they won't be INSERTED unless I manually take them out.
Ex: INSERT INTO tbl1 (vendor,reason) VALUES (81,"This is only a test, but there is an apostrophe and it's only going to make things worse.")
That apostrophe in "it's" is kiling everything. I've used the replace method to change it to " ' ", but that STILL doesn't work. I can't find MS SQL's ESCAPE CHARACTER. I've tried several directions of the backslash, but no luck.
I am trying to only have a link show if there is a certin value in the DB. This is what I am trying:
<% if (rsWelcome.Fields.Item("access_level").Value) = "admin" then
response.Write("| - <a href="sps_main.asp">Sales Training Support </a>-")
end if %>
BUT... this is the error I get:
Expected ')'
/sta/topnav_test.asp, line 9 response.Write("| - <a href="sps_main.asp">Sales Training Support </a>-") How do I use quotes in a "response" and have the app server ignore them??
The application should have a way of alerting the user if it does not recognize a character used by the website and give the user the ability to make adjustments to the unrecognized characters. The system should then remember the characters that have been adjusted by the user.
how can I add "vbCrLf" after every 80th character of a string. Suppose there is a string containg 600 characters and I want to pass on the string value to some variable, adding "vbCrLf" code after every 80th character.
some one cuts and pastes the chinese charcters. they are saved in DB as ---- case1 : ----
& # 6 5 3 9 6 ; & # 6 5 4 2 7 ; & # 6 5 4 1 9 ; ---- i used the space above as it is converting the characters while posting.. but i noticed some few records which are saved as
-- case 2 -- ÓÀÀÖ´óµäÏ·ÎÄÈýÖÖУ ---
if values are stored as case1 then i have no problem. but with the case2 .the chinese characters are shown good in few pages and at few pages they are shown as it like symbols. when i cheked the its the same.what shd i do to see that in a html page these character codes display correctly?
ive got a string where i woulld like to remove the last character it probably seems simple 2 u but i cant work it out can anyone tell me how to remove it.