Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > ISAPI and Databaseaccess (MFC, DAO, ADO, ...)?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 31st March 10:56
brian
External User
 
Posts: 1
Default ISAPI and Databaseaccess (MFC, DAO, ADO, ...)?


Hello
Please see the following article. It applies to all versions of Access
databases.
299974 ACC2002: Using Microsoft Jet with IIS
http://support.microsoft.com/?id=299974

Remember ASP is also ISAPI.

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Philipp Ott" <philipp_ott@hotmail.com>
| Subject: ISAPI and Databaseaccess (MFC, DAO, ADO, ...)?
| Date: Tue, 28 Oct 2003 11:30:30 +0100
| Lines: 19
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: base64
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eGOpE6TnDHA.1296@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.platformsdk.internet.server.isapi -dev
| NNTP-Posting-Host: firewall.avalon.at 195.26.203.99
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP09.
phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.platformsdk.internet.server.isapi -dev:3419
| X-Tomcat-NG: microsoft.public.platformsdk.internet.server.isapi -dev
|
| Hello!
|
| I read in the MSDN docs that the combination of ISAPI-Extensions with DAO
is bad or at least was unsuable until MFC 4.2 came around and DAO 3.5 got
threadsafe.
|
| I m playing around with the samples from MSDN for
multi-threaded-ISAPI-Extensions and need to connect to an Access97-MDB.
|
| Which technology do I use best? I want to make sure the app runs on IIS
5.1 or IIS 6 and keep the Access-DB. What do I write? A
MFC-ODBC-multithreaded-ISAPI-Extension, or do I have to use ADO or OLEDB?
|
| I have a working MFC-CGI which uses many invocations of CDaoRecordset(),
->Get/SetOleVariant(), ->AddNew(), ->Edit() and ->Update(). I m not afraid
to convert all these calls to SQL-UPDATEs and -INSERTs but I would like to
know beforehand I start changing the souce which database technology I
should use. At present I d like to stay and keep the Access-databasefile
and not migrate (costly) to another DB-solution.
|
| Any help/experience/input welcomed,
| thanks
| Philipp Ott
|
  Reply With Quote


  sponsored links


2 31st March 10:56
david wang [msft]
External User
 
Posts: 1
Default ISAPI and Databaseaccess (MFC, DAO, ADO, ...)?


Do you actually need an ISAPI to do this, or can you do this all in an ASP
page?

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//


Hello!

I read in the MSDN docs that the combination of ISAPI-Extensions with DAO is
bad or at least was unsuable until MFC 4.2 came around and DAO 3.5 got
threadsafe.

I m playing around with the samples from MSDN for
multi-threaded-ISAPI-Extensions and need to connect to an Access97-MDB.

Which technology do I use best? I want to make sure the app runs on IIS 5.1
or IIS 6 and keep the Access-DB. What do I write? A
MFC-ODBC-multithreaded-ISAPI-Extension, or do I have to use ADO or OLEDB?

I have a working MFC-CGI which uses many invocations of
CDaoRecordset(), ->Get/SetOleVariant(), ->AddNew(), ->Edit() and ->Update().
I m not afraid to convert all these calls to SQL-UPDATEs and -INSERTs but I
would like to know beforehand I start changing the souce which database
technology I should use. At present I d like to stay and keep the
Access-databasefile and not migrate (costly) to another DB-solution.

Any help/experience/input welcomed,
thanks
Philipp Ott
  Reply With Quote
3 31st March 10:56
brian
External User
 
Posts: 1
Default ISAPI and Databaseaccess (MFC, DAO, ADO, ...)? (attn: longer)


Hello
There is no right or wrong here, you will need to look at how you want to
spend your dev time and the future design and goals for this application.
You can then look to see which dev tool and methods best fit your needs.
ISAPI, ATL Sever (new with VS.Net, and is built on ISAPI), ASP.Net. With
ASP.Net you are not just stuck with ASPX pages. You can create your own
HttpHandlers or HttpModules. An HttpHandler is like ISAPI extension but
runs in the .net framework. HttpModule is like ISAPI Filter but also runs
in framework.

If you already have many static HTML pages you may be able to just change
the Form Action to go to a different handler and be able to reuse the them.

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Philipp Ott" <philipp_ott@hotmail.com>
| References: <eGOpE6TnDHA.1296@TK2MSFTNGP09.phx.gbl>
<OfV8cyZnDHA.2012@TK2MSFTNGP12.phx.gbl>
| Subject: Re: ISAPI and Databaseaccess (MFC, DAO, ADO, ...)? (attn: longer)
| Date: Wed, 29 Oct 2003 11:48:35 +0100
| Lines: 86
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: base64
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eI3Q2ognDHA.2012@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.platformsdk.internet.server.isapi -dev
| NNTP-Posting-Host: firewall.avalon.at 195.26.203.99
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.platformsdk.internet.server.isapi -dev:3422
| X-Tomcat-NG: microsoft.public.platformsdk.internet.server.isapi -dev
|
| Hello!
|
|
| "David Wang [Msft]" <someone@online.microsoft.com> schrieb im Newsbeitrag
news:OfV8cyZnDHA.2012@TK2MSFTNGP12.phx.gbl...
| > Do you actually need an ISAPI to do this, or can you do this all in an
ASP
| > page?
| >
| > --
| > //David
|
|
| I do have a Visual C++ 5.0 MFC-CGI application, which uses heavily
CDaoRecordset and the Crpe32 4.6 engine. It has some 100 template HTML
pages (and as many forms), which have about 10 different <!-- --> comments
hidden in them and those comments get parsed by the application and then
invoke stuff like setting of session variables, conditional branches
depending on values in session variables, printing of session variables or
return value of subroutines etc.
|
| To speed up things a bit and keep the 550 KB EXE in memory and get rid of
the session-mdb I d like to turn this app into an ISAPI extension.
|
| In the long run I d like to convert it to an ASP.NET/C# project but I
read that all the ASPX C# pages are single form pages and it is very hard
and tricky to make differnt forms into one ASPX page (with the help of
setting stuffs visible and not etc) but anyway, there is no elegant
solution yet (that I see). Also I d like to "automagically" turn my HTML
pages into ASPX pages, at least to avoid to code/design 100 times again the
forms - since all of the info is there in the HTML anyway and to write a
converter i dont know yet enough about ASPX...
|
| Also I d like to stay with the Access-MDB and not migrate to a costly SQL
server, since up to now, 10 concurrent users can work fine from Mo-Fr
7:30am to 5pm :-). 4 ppl work connected to the server by LAN and usually
3-5 ppl out of 150 partners from outside the internet. Also I wouldnt know
how to convince the customer of a costly SQL server solution unless the app
starts falling apart under heavy load. Also the application was developed
in early 1996 and went online in mid-1996 with the then-current hardware.
|
| So currently I d like to turn this into an ISAPI extension to get rid of
the session-mdb, the CGI startup time and the loading of the template HTML.
Unless there is some report to inlude or so the buttoncode(), callbacks()
and run() codes executes unmeasurable quick, however to start the cgi, open
the 2 databases takes time (from milliseconds to even 10th of a second) and
the file-reading of the template-pages also
|
| thanks
| Philipp Ott
|
|
|
| Here is an abstraction of the CGI application.
|
|
|


|
| int main
| {
| CGI *me = new CGI(argc, argv);
| me->InitInstance("c:\customer\customer.mdb");
| me->OpenSession("c:\temp\session.mdb");
| me->PerformButton();
| me->LoadTemplate();
| me->Run();
| me->ExitInstance();
| delete me;
| exit (0);
| }
|
| CGI:InitInstance
| {
| // some init code
| }
|
| CGI:OpenSession
| {
| // loads the database and hashes the QUERY_STRING and all
| // HTTP variables into an array of Name, COleVariant value
| // looks for a sessionid
| // if there is an sessionid f merges session-data with array
| // if not set template to "default-login" template and creates a
session f
| // in the session mdb and returns
| }
|
| CGI:PerformButton
| {
| // walks through the array and looks if a set value
| // matches with a name of the available button-callbacks
| // and if so calls this routine
| }
|
| CGI:Run
| {
| // parses the html template
| // and substitutes <!-- CMD parameter --> with the result
| // like <!-- INCLUDE myreport.rpt --> runs report and
| // injects the HTML output into the template
| // or <!-- PRINT sessionvar -->
| // or <!-- VAR somehtmlvar --> generates <input name=somehtmlvar ....

| // or <FORM> with <FORM app=me encoding=etc> and injects a hidden form
| // variable f with the sessionid
| // etc.
| }
|
|
| usuall button routine:
|
|
| bool performSomeButton(CGI *me)
| {
| // process form values and then depending on this
| // set template to appropiate "next" page
| if (ok) me->LoadTemplate("loadcontractinfostep2.html"); | else | {
| me->SetVariable("errorline", "plz enter all fields appropiate");
| me->LoadTemplate("loadcontractinfostart.html");
| }
| // if i want to store a session variable i simply call
me->SetSession("name", COleVariant whatIwant);
| // if i need a session variable i simply call COleVariant x=
me->GetSession("name");
| }
|
| usuall callback routine (invoked by the Run() from a template like CALL
"performSomeCallback")
|
| bool performSomeCallback(CGI *me) | {
| // usually used to create <table>'s of database lists,
| // or to create <select>'s based on some database tables
| me->writestream(my_result); // injects the string into the template
instead of the comment
| }
|
|
|
  Reply With Quote
4 31st March 10:56
brian
External User
 
Posts: 1
Default ISAPI and Databaseaccess (MFC, DAO, ADO, ...)? (attn: longer)


Hello
If you query using IHttpHander you should get quite a bit of information
and some MSDN articles on how ASP.Net handles requests. However you may
want to post your questions on how ASP.Net works to one of the ASP.Net
newsgroups as this one is for ISAPI questions and the ASP.Net newsgroups
should have folks that can give you a better answer on your HttpHandler
questions.

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Philipp Ott" <philipp_ott@hotmail.com>
| References: <eGOpE6TnDHA.1296@TK2MSFTNGP09.phx.gbl>
<OfV8cyZnDHA.2012@TK2MSFTNGP12.phx.gbl>
<eI3Q2ognDHA.2012@TK2MSFTNGP12.phx.gbl>
<sPVmdhinDHA.2808@cpmsftngxa06.phx.gbl>
| Subject: Re: ISAPI and Databaseaccess (MFC, DAO, ADO, ...)? (attn: longer)
| Date: Thu, 30 Oct 2003 14:36:11 +0100
| Lines: 24
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: base64
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#HhdKrunDHA.1764@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.platformsdk.internet.server.isapi -dev
| NNTP-Posting-Host: firewall.avalon.at 195.26.203.99
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.platformsdk.internet.server.isapi -dev:3425
| X-Tomcat-NG: microsoft.public.platformsdk.internet.server.isapi -dev
|
| Hello!
|
|
| "Brian Combs" <Brian@online.microsoft.com> schrieb im Newsbeitrag
news:sPVmdhinDHA.2808@cpmsftngxa06.phx.gbl...
| > [...]
| > ASP.Net you are not just stuck with ASPX pages. You can create your own
| > HttpHandlers or HttpModules. An HttpHandler is like ISAPI extension but
| > runs in the .net framework. HttpModule is like ISAPI Filter but also
runs
| > in framework.
|
| I m reading on MSDN and have a miniature IHttpHandler-Class already. Now
I want to write a sample for the Asynchronous mode.
|
| > If you already have many static HTML pages you may be able to just
change
| > the Form Action to go to a different handler and be able to reuse the
them.
|
| This is my idea, because the handler can read the templates and parse
(and cache) them like my old CGI core code.
|
| Where can I find info about the lifetime and such of IHttpHandler-Stuff?
When I enter the httphandler into the Visual Studio search I get some
information but I m missing for example an explanation how the DLL is
loaded, if static declared c# variables of the class are shared among all
instances or not etc.
|
| > Thanks
| > Brian [MS]
| > Microsoft Developer Support
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| Thanks,
| Philipp Ott
|
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666