Re: Communicating over the internet
- From: "Jim Carlock" <anonymous@localhost>
- Date: Fri, 1 Apr 2005 17:09:59 -0500
You might want to try this:
Set up your service to run under the System account. That should
give it full access to everything.
Then inside your DLL set up a public property:
Public Enum enuDBCSP
DBFree = 0 'nothing connected
DBPacked = 1 'meDBCSP is never set to this, only used as a return
'value by packing function
DBInUse = 2 'connected and in use
DBPacking = 4 'use this if you compact the db
DBReady = 8 'connected and ready for orders (not in use)
'reminds you of the old BASIC READY prompt?
End Enum
Private meDBCSP As enuDBCSP
Public Property Get DBCSP() As enuDBCSP
DBCSP = meDBCSP
End Property
Public Function OpenDB() As enuDBCSP
'code to open the database
Select Case meDBCPS
Case DBInUse, DBReady, DBPacking
OpenDB = meDBCPS
Exit Function
Case DBFree Then
'code to open the connection
'return DBReady
OpenDB = DBReady
End If
End Function
That way you provide one manner in which to open the database,
a way to pack it, etc. You won't need to keep reopening it, you
could make the OpenDB a private function and provide public
routines like AddRecord().
There's a couple ways to do it, I'm thinking along the lines that you
can keep the connection open and then when someone wants to
add a record they call the procedure to add a record, update a
record, pack the database, etc. you don't need to open a connection,
just add the record, or whatever. But then again, it's almost always
to close the connection so a power surge/power loss doesn't corrupt
the database.
--
Jim Carlock
Please post replies to newsgroup.
"Lauren" <lburr@xxxxxxxxxxxxxxxxxxxxx> wrote:
What I have so far is an activeX DLL being started by IIS. I have used the
SOAP3 toolkit to build this and that part is working. I have control over
both sides of the connection as well as the database. What I want is a way
to not have a database connection that needs to be started every time a
request comes in. I had thought that having a service running on the same
server as the database and the soap dll connecting with a TCP socket. I
have also tried making an activex exe and setting it up to register in the
ROT so the soap dll could use Getobject to get a reference. Neither of
these work. I am pretty sure the reason is the security configurtion, that
is where I am looking right now. The other option is to just live with
database connectioins being created and opend for every request that comes
in, its not going to be a hugely active site, I just would like some thing
better.
The best fruit for my vegetableis exactly what it seems like right now.
Thanks
Lauren
"Jim Carlock" <anonymous@localhost> wrote in message
news:OOuhbFYNFHA.3900@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Lauren,
>
> It sounds like you're asking how to get an .Asp page to send an
> XML document to maybe a service that is running? You mentioned
> CGI, but I'm thinking along the lines that CGI is any environment
> that can accept some form of data and process it. This includes,
> but is not limited to, Perl, IIS (.Asp), ColdFusion, and as well as
> other technologies.
>
> Knowing how the running program interfaces / interracts with things
> could be helpful. The name of the running program might help. If the
> running program is something you created and control would help
> us understand what's going on.
>
> It's hard to guess at what's going on in this case. It's like asking
what's
> the best fruit to go with your vegetable.
>
> --
> Jim Carlock
> Please post replies to newsgroup.
>
> "Lauren" <lburr@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Thank you for the reply. I have found several articles that look like
they
> will be very helpful. I think the problem I'm having is that my DLL is
> running the the IIS security context and is very limited in what it can
do.
> Lauren
>
> "Jim Carlock" <anonymous@localhost> wrote in message
> news:%23fvGelONFHA.3076@xxxxxxxxxxxxxxxxxxxxxxx
> > I don't know how familiar you are with what's going on...
> >
> > Have you looked into using a winsock control to the server's port
> > 80?
> >
> > I haven't really looked at the following page, but I've looked at other
> > things at vbip.com. They have some great tutorials and such. They
> > show you how to use the winsock control to download webpages...
> >
> > http://www.vbip.com/winsock/winsock_http_02_01.asp
> >
> > Once the html file is downloaded you can parse it and extract what's
> > inside the <xml start and stop tags.
> >
> > --
> > Jim Carlock
> > Please post replies to newsgroup.
> >
> > "Lauren" <lburr@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > I am using VB6 W2K or XP for the client and W2K running IIS for the web
> > server. I need to be able to send an xml document to a service on the
> > server and get an xml doc back. I am hoping someone can point me in the
> > right direction as to which technology I should use. I am thinking
maybe
> an
> > ASP webpage on the server side and the internet transfer control on the
> > client side. Or maybe CGI? .Net is not an option. I have managed to
use
> > the internet transfer control to get a file from the server but that
> really
> > doesn't do the job, I need to send the doc to a running program and get
a
> > reply. Can someone point me in the right direction?
> >
> > Thanks for any advice
> > Lauren
> >
> >
> >
>
>
>
.
- Follow-Ups:
- Re: Communicating over the internet
- From: Lauren
- Re: Communicating over the internet
- References:
- Re: Communicating over the internet
- From: Lauren
- Re: Communicating over the internet
- From: Jim Carlock
- Re: Communicating over the internet
- From: Lauren
- Re: Communicating over the internet
- Prev by Date: Re: Can VBA programs be stand alone Applications ? Or must you buy VB.Net ??
- Next by Date: Re: SQL Order by Date `Date` column
- Previous by thread: Re: Communicating over the internet
- Next by thread: Re: Communicating over the internet
- Index(es):
Relevant Pages
|