|
Sadly, the hosting service doesn't support SQL Server without an additional charge, and this site is for a charity that can't afford it. On the bright side, using an Access DB, by stuffing the connection object into the global.asa file I seem to be getting lucky. I haven't started constructing recordsets yet, but it hasn't choked on opening the connection. The connection object seems to be accessible from all the pages, as well. I think I may be on the right track here - wish me luck!
It is ok for women not to like sports, so long as they nod in the right places and bring beers at the right times.
Paul Watson, on Sports - 2/10/2003
|
|
|
|
|
You might want to research that a bit. I don't believe that your approach is recommended. I think it will actually work but it won't scale since all your requests will block on access to that single connection object.
I think a search on msdn.microsoft.com for keywords ASP ADO Access MDB will find several articles discussing this isssue.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
You're right. I searched through the PSDK docs and found what I need; unfortunately it doesn't work. According to the docs, creating an object in global.asa with session scope makes an object that is accessible from any page visited during a session. They even use a ADODB.Connection as an example! But when I actually try it (I copied the code and pasted it in my .asa file, changing only the name of the connection), it fails every time. The actual failure occurs when opening a recordset. Again following the PSDK example for opening multiple recordsets on a connection, I tried both the rst.Open and conn.Execute techniques given. Neither works, and the message reports that one or more required parameters is missing. The Recordset docs state that the parameters are all optional, though I did provide a SQL string to define the recordset, and the name of the connection object to use.
Back to square one, as always when I try to make anything work from the MS instructions...
It is ok for women not to like sports, so long as they nod in the right places and bring beers at the right times.
Paul Watson, on Sports - 2/10/2003
|
|
|
|
|
Hi,
I have the following doubt. I have an ActiveX Control embedded in one of my webpage, with a valid CodeBase from where the browser can download the CAB,unpack it, verify with Microsoft Authenticode and install. All goes well with my logon account as it has administrative rights.
But if I try on a different machine, and if the account does not have administrative rights, I think installation fails...
Does ActiveX Controls installation from webpage need Admin Access for the first time? Or is the above observation wrong and am I doing some other mistake in configuration?
Please advise...
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
I don't think so, but check the browser settings on that account, maybe ActiveX disabled there?
Also you can try to navigate to some Flash site (http://www.macromedia.com[^] for example) and see if Flash installs automatically (since it is ActiveX as well)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Hi all,
I need to get some information about a specfied remote server using ASP. Does anybody know how to do this?
Thanks
Anthony
|
|
|
|
|
All,
If anyone could tell me how to check if another machine is running IIS, that would be great also.
Thanks again,
Anthony
|
|
|
|
|
To gather information about machine where you execute your ASP code, you can use WScript object. Look for a good example here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8205&lngWId=4[^]
antbates wrote:
If anyone could tell me how to check if another machine is running IIS
It already has IIS,if you are executing ASP code, not?
Also forget about network in ASP. You cannot access any network resources (unless you change access rights for the default internet guest account)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Maybe I should have explained myself more clearly. I am on Machine A, running an ASP script on Server B, and need to check if Machine C has IIS. What I have done is to make a component in VB which uses NetServerGetInfo. As you say though, it doesn't work very well due to permissions problems.
Thanks for your help.
|
|
|
|
|
your looking in the wrong place..
From what I've gathered, considering Im a frequent user here at Code Proyect, all you'll find here are legal codes and sources....but...you should look around www.astalavista.com,...look for scanners...
There you'll find applications that can preform these tasks..cuz I personally havent heard or seen of a way of reading from another server through web-enabled applications...
http://www.astalavista.com/archive/
luck,
Jon
X-ZD Designs
|
|
|
|
|
I have no experience with HTML, but I have a task that requires to start an application from an HTML page. I have tried to use MC FrontPage to create a hyperlink liked to my application, but Explorer opens a dialog " Download or open .....". How can I avoid this dialog? Or if anyone knows better way to do it? Thank you
|
|
|
|
|
Maybe make the application a COM app so you could create it as an object in HTML?
Jason Henderson "You must be the change you wish to see in the world." - Gandhi
articles profile
|
|
|
|
|
Short answer is you can't, not your way.
What you would have to do is write an ActiveX control that gets downloaded to the client and then that runs an EXE. But the client has to allow calls out of the sandbox so to speak because naturally normally allowing an ActiveX to run executables could be rather dangerous (e.g. format c: /q)
Best to get the user to run the app themselves.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
Want a job?
|
|
|
|
|
It depends how you view the HTML file. If you are browsing to it (e.g. in Internet/intranet) then you can't.
If the file is stored on your computer and you just double click on it (e.g. local), then this piece of code will work fine:
<script>
function runProgram(){
var oShell = new ActiveXObject("WScript.Shell");
oShell.Run("notepad.exe");
oShell = null;
}
</script>
<input type=button value="Click me" onclick="javascript:runProgram()">
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
What is the best way to automatically highlight (make bold) the current page that a user is on. I have a navigation bar that goes down the left side of the screen with links. If the user is on page three, I would like the page to look like the following:
Link One
Link Two
Link Three
Link Four
I would like to do this using ASP Code but have been unable to find any scripts that meet my needs.
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
Hi Chris..
basically what you need to do is send a value that informs the seccion you are in and create a validation in the following pages that recieves this value. I made an example using the same page as the reciving target. Im sending the variable "seccion" that contains the values 1 through 4. The page verifies if the value recived is the same as itself, and preforms to things afterward: either converts the word into a link or i simply keeps in bold.
Here's the code...
<code>
<li><b><% if request.QueryString("seccion") <> "1" then %><a href="<%= request.ServerVariables("URL") %>?seccion=1" target=_self><%end if%>Link One<% if request.QueryString("seccion") <> "1" then %></a><%end if%></b></li>
<li><b><% if request.QueryString("seccion") <> "2" then %><a href="<%= request.ServerVariables("URL") %>?seccion=2" target=_self><%end if%>
Link Two
<% if request.QueryString("seccion") <> "2" then %></a><%end if%></b></li>
<li><b><% if request.QueryString("seccion") <> "3" then %><a href="<%= request.ServerVariables("URL") %>?seccion=3" target=_self><%end if%>
Link Three
<% if request.QueryString("seccion") <> "3" then %></a><%end if%></b></li>
<li><b><% if request.QueryString("seccion") <> "4" then %><a href="<%= request.ServerVariables("URL") %>?seccion=4" target=_self><%end if%>
Link Four
<% if request.QueryString("seccion") <> "4" then %></a><%end if%></b></li>
</code>
Hope it works..
luck,
Jon
<a href="http://www.radiostatic.net/jon/index.html" target=_new>GET TO KNOW ME</a>
|
|
|
|
|
Hi, everyone!
Here are some codes discussing html span tag used
with innerHTML tag. Who can show me the function
of the piece of codes here?
Codes:
--------
<img id='obj1' style='cursor:hand' src='1.gif'>
<img id='obj1' style='cursor:hand' src='11.gif'>
<a class = item href = "test1.jsp"> abc </a></br>
<span id = 'span1'></span>
<img id='obj2' style='cursor:hand' src='2.gif'>
<img id='obj2' style='cursor:hand' src='22.gif'>
<a class = item href = "test2.jsp"> cba </a></br>
<span id = 'span2'></span>
--------
In some other places,
Codes
--------
span2.innerHTML='<div align=left>Uploading...</div><br>'
--------
Who can explain the meaning and function of the two pieces
of codes here? (I think it is used to insert html scripts between
<span id = 'span2'> and </span>, but I am not sure.)
Thanks in advance,
George
|
|
|
|
|
Well, right, innerHTML used to insert any text (HTML formatted as well) between starting and ending tags. So for example you have:
<span id="span1"></span>
and somewhere in the script you write:
span1.innerHTML = "<font color='red'>Hello World!</font>";
, the result will be:
<span id="span1"><font color="red">Hello World!</font></span>
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Thanks, Philip buddie!
George
|
|
|
|
|
On my page, I have several HREF links to jpg files. However, when I click on them, only some get loaded. Others don't appear (although there's a small empty picture frame at the top left corner of the page). I notice that all the jpgs that do load are small in size (50 Kb - 100 kb). The rest are rather big files (500 - 900 kb).
How can I get the browser to display these larger image files?
A related problem is that, instead of displaying these images on the browswer when clicked, how can I force a file download dialog box so that the user can immediately download the jpg file? (Right now, clicking the image link will just display the pic on the screen (for small pics only).
|
|
|
|
|
If you have ASP at your disposal you can force a file download with a small amount of server-side code:
Code Snippets:
http://www.codeproject.com/script/comments/forums.asp?msg=424837&forumid=1640#xx424837xx[^]
I actually asked the same question a few days back and answered it myself
As to why some images would display and others won't ... that's a new one to me. Per chance, could you share a link to this page?
Wally Atkins Newport News, VA, USA
|
|
|
|
|
I really cant give out the site (and you probably cant access it anyway) because it part of my company's intranet. All I have on the page are some logo pictures. When the use clicks on a logo, I want a file download or "save as" dialog box to pop up and prompt the user to save it. I dont want the browser to display the image file (jpg).
However, my browser doesnt even display these images if the file is too big. I dont know to fix that. Is there a configuration file that I need to set in IIS?
|
|
|
|
|
Hi, everyone!
Here are some codes discussing html span tag used
with img tag. Who can show me the function of the span
tag here?
Codes:
--------
<img id='obj1' style='cursor:hand' src='1.gif'>
<img id='obj1' style='cursor:hand' src='11.gif'>
<a class = item href = "test1.jsp"> abc </a></br>
<span id = 'span1'></span>
<img id='obj2' style='cursor:hand' src='2.gif'>
<img id='obj2' style='cursor:hand' src='22.gif'>
<a class = item href = "test2.jsp"> cba </a></br>
<span id = 'span2'></span>
--------
Thanks in advance,
George
|
|
|
|
|
It has no meaning in the code as it is here. But I guess there is a script which will alter the contents of those spans later
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Thanks, Philip buddie!
George
|
|
|
|