Hi Chopstik,
Unfortunately it's not quite working. I got the error as described here.
I don't have access to server so guess I'm outta luck. A star for you anyway.
Thanks again.
Just to clarify what I'm try to do, I need to provide a link to online webmail to users. The problem is the main secured webmail site is sometime down, so I need to detect this and if that's the case, redirect users to an alternate webmail site.
So, the sample link is:
<a...
Hi Chopstik,
I have control of detect_link.asp but not the pages under the secured site. Could you please give an example of the code you referred to?
Hi Sheco,
Would you please care to explain more?
Here's the code I currently have on the detect_link.asp page:
<% Response.Buffer = true %>...
Hi, could someone please advice how I can use VBScript to redirect to another link if the original link is invalid?
Here's my issue:
<a href="detect_link.asp">GO LINK</a>
at "detect_link.asp", I need to have script to detect if the URL is accessible (https://some.secured.site.com/)
if the...
Thanks Miller & Mike. The solution I was looking for indeed lied somewhere between string's search/replace & file system ops. It was for a web search result, in which links to text files were to be replaced by html files.
I tried to implement Miller's solution but unable to on a shared...
...tricky:
$origStr = "C:/root/sub/level/text/somefile.txt"
to become: "C:/root/sub/level/somefile.html"
(remove "text/" and replace ".txt" with ".html")
And it only applies to strings that contains "/sub/", that is, for example, "C:/root/any_other_sub/level/text/*.txt" does not apply.
Thanks.
Hi,
Could someone please help me with a perl script to search & replace a text string such that:
$org_str = "C:/root/sub/text/somefile.txt"
to become: "C:/root/sub/somefile.html"
Basically: "/text/*.txt" will become "/*.html"
Much appreciated for your help.
Thanks smah.
The client was trying to access a protected PDF file from a dropdown list on a web page. The web page presents a dropdown list of PDF files. Some of these PDFs are stored behind an .htaccess protected folder. Normally upon selecting a protected one from the list, the user...
Hello, has anyone had problem with accessing .htaccess protected folder on Windows Vista's IE7 browser? A client reported he didn't get a popup screen asking for Username/Pwd when trying to access an .htaccess protected directory on a website, hence didn't get access to that part of the site...
Hi Kantaru,
Would you kindly describe how you got your network working? I'm interested in this subject too. I'd like to connect my laptop (wireless) to my desktop (wired) for shared files & printer. Both are running XP Home SP2.
Thanks much.
Sorry, I do have the quote on my actual code.
SET @runSQL = ('DECLARE @dynVar1 varchar(2), @dynVar2 varchar(2), @dynVar3 varchar(2) ' +
'SELECT @dynVar1=SomeField2, @dynVar2=SomeField2, @dynVar3=SomeField3
FROM MyDB.dbo.' + @dynTBL + ' WHERE myField = ''' + @myCriteria + '''')...
Thanks Jim, but that's still not right. I've changed the script to:
SET @runSQL = ('DECLARE @dynVar1 varchar(2), @dynVar2 varchar(2), @dynVar3 varchar(2) ' +
SELECT @dynVar1=SomeField2, @dynVar2=SomeField2, @dynVar3=SomeField3
FROM MyDB.dbo.' + @dynTBL + ' WHERE myField = ''' +...
Hello,
Can someone please help me with this problem? Below is my sample code:
DECLARE @dynVar1 varchar(2)
DECLARE @dynVar2 varchar(2)
DECLARE @dynVar3 varchar(2)
DECLARE @runSQL varchar(500)
DECLARE @myVariable varchar(50)
SET @runSQL = ('SELECT @dynVar1=SomeField2, @dynVar2=SomeField2...
Thanks James.
Yes, your comment is absolutely right. I however used dynamic SQL because of a dynamic field to retrieve the data from.
My apology for not fully describing the script. I ended up using cursor to solve the problem. Here's part of the solution:
SET @sqlStr = 'DECLARE...
Thanks Catadmin. I indeed had (xx) in all my char/text variables.
Here's a better description to my syntax problem:
CREATE PROCEDURE myProc (
@input1 varchar(20),
@input2 varchar(20)
)
AS
BEGIN
DECLARE @var1 varchar(20),
@var2 varchar(20),
@var3 int
DECLARE @sqlStr varchar(500)...
JamesLean: I've shortened the query to highlight the syntax problem that I have. The actual query is much longer and it carries dynamic criteria in the WHERE clause.
Thanks all again for your help.
Hello,
Can someone please tell me what'd be the correct syntax in using:
DECLARE @sqlStr varchar, @familyName varchar
SET @sqlStr = ('SELECT @familyName=LastName FROM someTable WHERE id=3')
EXEC(@sqlStr)
When running this, I get error: "Must declare the variable '@familyName'" (even though...
My apology. I mixed part script part pseudo code, hence came the above code. By FOR EACH (pseudo), I meant to use cursors to loop through the query above it.
Allow me to provide more info & clean up the above code a bit:
Table structures:
- tblPools
. RegNumber
. subPool
. TotalPlayers
-...
Hello,
Can someone please help me with the following script?
SELECT DISTINCT RegNumber FROM tblPools WHERE (NOT (RegNumber IS NULL))
FOR EACH RegNumber
SELECT poolNumber, COUNT(DISTINCT players) AS numPlayers
FROM R_#RegNumber#
GROUP BY poolNumber
HAVING (poolNumber IN (SELECT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.