473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does GetObject work with ASP?

Hello,

I have not been working with ASP for too long at this time
and am not real familiar with a lot of things about ASP.
I have searched for articles on the following question but
not come up with any definite answers. I would like to
know if it is possible to use GetObject in order to
read/write data between an ASP and an activeX
application. VBS supports GetObject, so I thought ASP
might, but I have not had any luck. Interestingly I can
use CreateObject with ASP but not GetObject. I
experimented with a homemade ActiveX exe I slapped
together with no luck - Can't create ActiveX object
error. I even tried it with an Excel workbook. Also did
not work. Before I assume you can't use GetObject with
ASP I thought I would check if maybe it is a special
syntax I need or GetObject isn't designed for ASP (Note: I
am adding my apps to the ROT to get the GetObject
functionality - which works fine from vbs). Any comments
appreciated.

Thanks,
Rich
Jul 19 '05 #1
10 4271
Look into FSO (FileSystemObje ct)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Rich <an*******@disc ussions.microso ft.com> wrote in message
news:15******** *************** *****@phx.gbl.. .
Hello,

I have not been working with ASP for too long at this time
and am not real familiar with a lot of things about ASP.
I have searched for articles on the following question but
not come up with any definite answers. I would like to
know if it is possible to use GetObject in order to
read/write data between an ASP and an activeX
application. VBS supports GetObject, so I thought ASP
might, but I have not had any luck. Interestingly I can
use CreateObject with ASP but not GetObject. I
experimented with a homemade ActiveX exe I slapped
together with no luck - Can't create ActiveX object
error. I even tried it with an Excel workbook. Also did
not work. Before I assume you can't use GetObject with
ASP I thought I would check if maybe it is a special
syntax I need or GetObject isn't designed for ASP (Note: I
am adding my apps to the ROT to get the GetObject
functionality - which works fine from vbs). Any comments
appreciated.

Thanks,
Rich

Jul 19 '05 #2
Thanks for that suggestion. I think I have played around
a little bit with FileSystemObjec t but was using the wrong
syntax and lost hope. Finally got it to work:

set fso = CreateObject("S cripting.FileSy stemObject")
Set info = fso.CreateTextF ile("ActiveXasp testR.txt")
info.WriteLine "testing"
info.Close

Just needed a little encouragement.

Thanks again,
Rich
-----Original Message-----
Look into FSO (FileSystemObje ct)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Rich <an*******@disc ussions.microso ft.com> wrote in messagenews:15******* *************** ******@phx.gbl. ..
Hello,

I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP.
I have searched for articles on the following question but not come up with any definite answers. I would like to
know if it is possible to use GetObject in order to
read/write data between an ASP and an activeX
application. VBS supports GetObject, so I thought ASP
might, but I have not had any luck. Interestingly I can
use CreateObject with ASP but not GetObject. I
experimented with a homemade ActiveX exe I slapped
together with no luck - Can't create ActiveX object
error. I even tried it with an Excel workbook. Also did not work. Before I assume you can't use GetObject with
ASP I thought I would check if maybe it is a special
syntax I need or GetObject isn't designed for ASP (Note: I am adding my apps to the ROT to get the GetObject
functionality - which works fine from vbs). Any comments appreciated.

Thanks,
Rich

.

Jul 19 '05 #3
hehe, no problem ;o)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Rich <an*******@disc ussions.microso ft.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
Thanks for that suggestion. I think I have played around
a little bit with FileSystemObjec t but was using the wrong
syntax and lost hope. Finally got it to work:

set fso = CreateObject("S cripting.FileSy stemObject")
Set info = fso.CreateTextF ile("ActiveXasp testR.txt")
info.WriteLine "testing"
info.Close

Just needed a little encouragement.

Thanks again,
Rich
-----Original Message-----
Look into FSO (FileSystemObje ct)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Rich <an*******@disc ussions.microso ft.com> wrote in

message
news:15******* *************** ******@phx.gbl. ..
Hello,

I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP.
I have searched for articles on the following question but not come up with any definite answers. I would like to
know if it is possible to use GetObject in order to
read/write data between an ASP and an activeX
application. VBS supports GetObject, so I thought ASP
might, but I have not had any luck. Interestingly I can
use CreateObject with ASP but not GetObject. I
experimented with a homemade ActiveX exe I slapped
together with no luck - Can't create ActiveX object
error. I even tried it with an Excel workbook. Also did not work. Before I assume you can't use GetObject with
ASP I thought I would check if maybe it is a special
syntax I need or GetObject isn't designed for ASP (Note: I am adding my apps to the ROT to get the GetObject
functionality - which works fine from vbs). Any comments appreciated.

Thanks,
Rich

.

Jul 19 '05 #4
> info.Close
set info = nothing
set fso = nothing
Jul 19 '05 #5
Thank you for pointing this out. Actually, I do set fso
to nothing. While I'm at it, may I ask how or if you
could use FileSystemObjec t to write/pass data to an
ActiveX app? (VB6 activeX app). Like in MS Access I could
make a reference to myApp (which would be running and
visible) and do this:

Dim x As New myApp.Class1
x.letSomething = "test"
set x = nothing

where .letSomething is some Public Property Let... in
Class1 and "test" would end up in a textbox on a form of
myApp. Is it possible to use FileSystemObjec t to do
something similar in ASP (or vbs for that matter? For vbs
I added GetObject functionality to my activeX app by
adding it to the Windows Running Object Table and hooking
it, but GetObject not working with ASP this way - which is
what this post is about). If I can do something like this
with FileSystemObjec t, may I ask how this is done? sample
syntax.

Thanks,
Rich
-----Original Message-----
info.Close

set info = nothing
set fso = nothing
.

Jul 19 '05 #6
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:Od******** ******@TK2MSFTN GP12.phx.gbl...
info.Close

set info = nothing
set fso = nothing


Doesn't ASP release its variables after it's done with the response? I
mean, as long as you release resources (e.g., close open files, recordsets,
connections, etc.), is there something about taking advantage of ASP's
implicit cleanup that is somehow distasteful? Not trying to be
argumentative, just really want to know. Thanks.

Jul 19 '05 #7
Jon Mundsack wrote:
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:Od******** ******@TK2MSFTN GP12.phx.gbl...
info.Close

set info = nothing
set fso = nothing


Doesn't ASP release its variables after it's done with the response?
I mean, as long as you release resources (e.g., close open files,
recordsets, connections, etc.), is there something about taking
advantage of ASP's implicit cleanup that is somehow distasteful? Not
trying to be argumentative, just really want to know. Thanks.


There are situations when automatic cleanup cannot occur, especially with
recordsets (and therefore connections as well). It pays to be explicit.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #8
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message
news:#E******** *****@TK2MSFTNG P11.phx.gbl...
Jon Mundsack wrote:
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:Od******** ******@TK2MSFTN GP12.phx.gbl...
info.Close
set info = nothing
set fso = nothing


Doesn't ASP release its variables after it's done with the response?
I mean, as long as you release resources (e.g., close open files,
recordsets, connections, etc.), is there something about taking
advantage of ASP's implicit cleanup that is somehow distasteful? Not
trying to be argumentative, just really want to know. Thanks.


There are situations when automatic cleanup cannot occur, especially with
recordsets (and therefore connections as well). It pays to be explicit.


Again, not being argumentative, but can you give me an example of a
situation where letting a variable fall out of scope would have a different
effect than setting it to Nothing? Granted, you've got to close recordsets
and connections, etc., but it seems like you're saying ASP can hold a
reference to an object that from all outward appearances has fallen out of
scope. Is that correct? (The reason I'm so concerned is that I rely on ASP
to release variables all the time, so naturally if it turns out this is bad
I'll have to change my ways.)

Jul 19 '05 #9
Jon Mundsack wrote:
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message
news:#E******** *****@TK2MSFTNG P11.phx.gbl...
Jon Mundsack wrote:
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:Od******** ******@TK2MSFTN GP12.phx.gbl...
> info.Close
set info = nothing
set fso = nothing

Doesn't ASP release its variables after it's done with the response?
I mean, as long as you release resources (e.g., close open files,
recordsets, connections, etc.), is there something about taking
advantage of ASP's implicit cleanup that is somehow distasteful?
Not trying to be argumentative, just really want to know. Thanks.


There are situations when automatic cleanup cannot occur, especially
with recordsets (and therefore connections as well). It pays to be
explicit.


Again, not being argumentative, but can you give me an example of a
situation where letting a variable fall out of scope would have a
different effect than setting it to Nothing? Granted, you've got to
close recordsets and connections, etc., but it seems like you're
saying ASP can hold a reference to an object that from all outward
appearances has fallen out of scope. Is that correct? (The reason
I'm so concerned is that I rely on ASP to release variables all the
time, so naturally if it turns out this is bad I'll have to change my
ways.)


It's been a while since I read about this so I don't remember the details
but a recordset object can be in a state where it cannot be closed by going
out of scope (for example, there may be an ongoing or pending Update
operations). This leaves it in memory causing a memory leak which can
eventually crash IIS if it happens enough times.

It has been very well documented in these groups where people have had
problems with IIS crashing every few days, which they have resolved by
modify their code and explicitly closing and destroying their ADO objects.

My simple rule is: If I open it, I close it. If I create it, I destroy it.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4796
by: Gerry | last post by:
I have a developer here with a website running with only "Windows Integrated Authentication" set on a Windows 2000 member server that uses GetObject to get a user's group membership in the domain. This is the code she's using: set adsUser = getobject("WinNT://" & strUsername) for each group in adsUser.groups GrpList = GrpList &...
2
5980
by: CJM | last post by:
I'm building an ASP app that uses Windows Authentication (IWA). I have an authentication routine that assesses if & how the user can use the application (see code snippet below). Users of a particular group have full permissions (configured via IIS) and all other users have read/execute permissions. When I call the authentication page...
5
6348
by: Andrei | last post by:
Hello, I posted yesterday the same problem, but now I want to be more specific about it. My intention is to create a windows service to process some Word documents. If I use CreateObject to create a reference to a Word object everything is working fine. If I use GetObject to get a reference to Word object (of
4
6383
by: bic | last post by:
When porting my Windows app to asp.net I get an System.Exception: Cannot create ActiveX component. What function can I use instead? Thanks for your comments. -- bic
3
20275
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet (MyXL). It uses the worksheet's Application property to make Microsoft Excel visible, to close it, and so on. Using two API calls, the DetectExcel Sub...
4
3107
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give it a go). What I want to do is this: Have a server instance of the program, this server instance will receive communication from client programs...
18
1743
by: Daniel | last post by:
Hey guys I have an instance of an object say: List<Object> myList = new List<Object>(); Object myObject = new Object(); myObject.PositionVector = new Vector3(10,10,10); myList.Add(myObject);
0
1565
by: kanu | last post by:
Hi, We have moved our domain controllers from win2K to win3K. The script below doesnt work at all now because by default Win3K disables "Network access: Let Everyone permissions apply to anonymous users" GetObject("WinNT://domain/domainController/username,user") We are using GetObject to get the user groups, so as to restrict them to...
0
1508
by: Trezore | last post by:
Migrated website from Windows 2000 IIS 5.0 to Windows 2003 IIS 6.0 Used to get the Computer name resolved via shell, but that won't work anymore. Found the following to work if I step though the logic in VB 6.0: Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & (IP ADDRESS OF...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.