|
Hi Folks:
I have about 7-8 Pages which all connect to the same database but then generate different record sets with different queries..
So i tried giving only my connection object defnition and opening the connection in global.asa file and then using it in the other asp pages as:-
objCommand.activeConnection=session("objconn") OR
objRS.OPEN(QUERYSTRING,objConn")
but then i am told the paramters im passing are wrong.And so i dont understand how..
Can somebody tell me if im making some fundamental mistake or is it just the code that i have to go through..
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
fundamental mistake:
Placing an open connection object is about the quickest way to bring a web server to its knees. I suggest placing only the connection string in the application object (assuming the connection string does not change throughout the lifetime of the application) this will give you something like thus:
Global.asa
Sub application_onstart
application("constring")="PROVIDER=SQLOLEDB;SERVER=localhost;DATABASE=pubs;uid=sa;pwd=;"
end sub
anASPPage.asp
...
objRS.Open QUERYSTRING,Application("constring")
Or to go one step further in conserving resources:
objCon.Open Application("constring")
objRS.Open QUERYSTRING,objCon
...
objRS.Close
objCon.Close
|
|
|
|
|
Hello All
I am building a web service using ASP.NET. This web service will be used bu other ASP developers. My questions is: How can I use my web service from ASP (not ASP.NET) web application???
Thanks in advance
|
|
|
|
|
Hi,
To access the web services form asp page you have to use the XMLHTTP.
The following snippet from my asp page.
Function GetAppSettings(appKey)
'declaration
Dim url, xmlhttp, dom, node
'Call web service using HTTP-GET method
url="http://localhost/myapp/service1.asmx/"
url=url & "GetAppSettings?key=" & appKey
set xmlhttp = server.createobject("Microsoft.XMLHTTP")
xmlhttp.open("GET",url,False)
xmlhttp.send
'parse the result
set dom=server.createobject("Microsoft.XMLDOM")
dom.load(xmlhttp.responsebody)
set node=dom.selectsinglenode("//string")
if not node is nothing then
GetAppSettings = node.text
end if
End Function
Response.Write GetAppSettings("SpecialOffer")
Cheers,
Entry
|
|
|
|
|
Can anyone coroborate a mad client of mine who swears that MS themselves say that Session IDs can sometimes not be unique between active visitors to a web-app?
Session.SessionID <--- that one
I can maybe understand problems creeping in when IIS is being hammered by hundres of thousands of visitors, but this site in question is used by at most three people at a time.
thanks
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Michael P Butler wrote:
Some people fantasise about "real people", others about celebs
|
|
|
|
|
The only thing I'm aware of is this little bit from MSDN
You should not use the SessionID property to generate primary key values for a database application. This is because if the Web server is restarted, some SessionID values may be the same as those generated before the server was stopped. Instead, you should use an auto-increment column data type, such as IDENTITY with Microsoft® SQL Server, or COUNTER with Microsoft® Access.
which makes sense, but it wouldn't make sense to not have unique session id's whilst the server was running. Unless it's a bug of course.
Michael
Logic, my dear Zoe, merely enables one to be wrong with authority. - The Doctor
|
|
|
|
|
Michael P Butler wrote:
Unless it's a bug of course
Thanks Michael, that is the only info I have found on the issue as well.
As for the bug bit, that is what the client is ranting and raving about. We used .NET, but I hardly think even MS would have created a system like ASP.NET which results in non-unique SessionIDs on a low-load app. I can get 10 000 users at once may cause ASP.NET to drop it's pants, but not 3.
Thanks.
I referred to you as a "professional colleague" in my letter to the client
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Michael P Butler wrote:
Some people fantasise about "real people", others about celebs
|
|
|
|
|
Paul Watson wrote:
I referred to you as a "professional colleague" in my letter to the client
LOL. I've been called a lot of things in my time but never that
Michael
Logic, my dear Zoe, merely enables one to be wrong with authority. - The Doctor
|
|
|
|
|
With the SessionID being a 32bit number it's more likely to issue a duplicate than say a 128bit, but still ultra-unlikely.
The only issues I've ever heard of regarding ASP Sessions are the session cookie hashes being sniffed over the network.
|
|
|
|
|
Chris Rickard wrote:
but still ultra-unlikely.
Thanks "professional colleague"*
* read the reply to Michael above
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Michael P Butler wrote:
Some people fantasise about "real people", others about celebs
|
|
|
|
|
I've seen it that when cookies are disabled on the client browser a new sessionid is generated for each page visit.
|
|
|
|
|
I haven't used ASP.NET, but with ASP the Session object relies heavily on cookies to operate. So, this could be a logical conclusion, but personally I haven't seen it happen yet.
If you do have any more info about this, could you please let me know as I am in the middle of rapping up a web app written in ASP that uses this?
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"Victims falling under chains ~ You hear them crying dying pains
The fist of terrors breaking through ~ Now there's nothing you can do"
Song: Phantom Lord - Album: Kill 'em All - Artist: Metallica
|
|
|
|
|
Just installed .NET framework on my Windows NT 4.0 Workstation at work. I´ve PWS installed on it, SP6a and MDAC 2.7. The problem is that thw .aspx pages are not being rendered by .net. Anyone facing the same problem ? How can I solve this ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
The alcohol is one of the greatest enemys of man, but a man who flee from his enemys is a coward.
|
|
|
|
|
asp.net is not supported for nt4.
|
|
|
|
|
i have decided to make a nice an easy admin to my website, so that i do not have to always edit HTML to add more stuff to the site (that way i might actually get ssome content up there), anywaz, i have a script section, and i want to make a script that colourises the code, so i dont have to do it myself, anyone know of one that exists?
p.s. dont forget, i need a php version.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "What goes up must come down. Ask any system administrator"
|
|
|
|
|
I like this version of your site much better. Good job!
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"Half the reason people switch away from VB is to find out what actually
goes on.. and then like me they find out that they weren't quite as good
as they thought - they've been nannied." - Alex, 13 June 2002
|
|
|
|
|
thanks. i started one design, but hated it, then this poped into my head, so i made it. at the mo im practicing my php, by makin an admin for the site, so i can add artwork, downloads, scripts, all by filling in a form, cos my aunt has just got a website, and wants me to make it into a shop
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "What goes up must come down. Ask any system administrator"
|
|
|
|
|
Greetings,
How can VB script be used to open a web page in a seperate browser window?
I have a button message that I catch with vb script, and I want to just open
a html site in a seperate browser instance.
I am new to vb script, so any advice would be great!
Thanks in advance!
|
|
|
|
|
Right after I made my post I stumbled across "window.open" call, and it works perfectly for what I needed.
See below. Hope this helps someone else.
Dim Test
Set Test = window.open("mytestpage.htm", "MyTestPagetitle")
|
|
|
|
|
I have the problem of automatically creating the thumbnails during the uploading of images in my website. My ISP would not allow me to run a component in their server. I must use Javascript or VBScript in my ASP to do this kind of work.
Does anybody know how to do it? Sample code will be much appreciated!
TIA!
|
|
|
|
|
You're probably out of luck... If the server runs .NET you could use GDI+ to do this if not ASP3, JavaScript, and VBScript do not have that functionality built in and must use a COM component.
|
|
|
|
|
if the images are too big, you can get the script to show the pics at thumbnail size, using the HTML code that is output.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "What goes up must come down. Ask any system administrator"
|
|
|
|
|
The downside to this is that the browser still has to download the larger image even if it's scaled down via HTML.
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"Half the reason people switch away from VB is to find out what actually
goes on.. and then like me they find out that they weren't quite as good
as they thought - they've been nannied." - Alex, 13 June 2002
|
|
|
|
|
If you are running a .NET platform you don't need to have a component deployed by the ISP. One great thing about .NET is the xcopy deployment capability, just drop your component into the bin folder.
If your not using .NET I'm sorry I can't help.
|
|
|
|
|
Can anyone explain to me why IIS always start about 10 tftp.exe processes sunday night? Two sundays ago, these processes wanted to access the internet. Of course I told my firewall to say NO. Last sunday tftp wanted me to insert a disk in my cd reader.
This is starting to piss me off! I rule my machine, not vice versa.
Sonorked as well: 100.13197 jorgen
FreeBSD is sexy.
|
|
|
|