Error on Connecting ISAPI to Access Xp DB

Hi Experts,
I have Two questionS:
Q1-I Defined a DSN in ODBC of Windows 2000 advanced server(system DSN section).I used  database,query,session components For connecting To  My DSN .and when I pressed connected on My object inspector , Connect it,I writed my query and ...
finally compile my ISAPL.dll and worked properly
but when i want to work with submit button  on my web page in my browser, I see this Error:
 "Key violation. [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'.It is already opened exclusively by another user, or you need permission to view its data. [Microsoft][ODBC Microsoft Access Driver]Invalid connection string attribute DATABASE General SQL error.

How can I connect To my database ?

Q2- How can i debug my ISAPI.dll ?
That can be  behave as a process .

Note 1 : My database is Access Xp. I tested this work from my browser.I logged to computer as administrator Role.
Note 2 :
Q1 has 75 points value
Q2 has 50 points  value

best  regards
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


About your second question read this:,1410,20901,00.html

Regards, Geo

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
About your first question:

Have you set your Session.AutoSessionName to true and assigned that session to your Database.SessionName instead of the Default one?

Regards, Geo
ImbeginnerAuthor Commented:
my Os is windows 2000 advanced server and
has not user manager
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

This is in 'Administrative Tools-Local Security Policy'
ImbeginnerAuthor Commented:
ok, i m in win98 , i go to my win2000 advanced server
and tell you  result 3 hours later.
ImbeginnerAuthor Commented:
I forget on thing:
Thanks a lot of You.
ImbeginnerAuthor Commented:
>>Have you set your Session.AutoSessionName to true and assigned that session to your Database.SessionName
 instead of the Default one?<<

I do 1,2,3
but at 4
when i want to stop IIS admin show me the SMTP and NNTP related to IIS admin and i
stopoed these services and set these sevices to manual
5- i did it
6- i did it
At run parameter we have two pages
I set on local page
Host application:
parameters :
-e w3svc
working directory :
                           <--- blank

click ok

8-I setted breakpoints and I clicked on run button but dont remain on running state
9-I writed in my browser the address of my ISAPI dll
but show me this page:
"The page cannot be displayed|"

I went to internet service manager and i saw that  all of services stopped in this page.

Finally,can you guide me how can i solve theses problems?

ImbeginnerAuthor Commented:
Any Feed back From You, GooBul

About 1:
Do you have other Delphi ISAPI application running on the same IIS? If this is the first app then I'd try the IIS without DB first.

1. Create one simple ISAPI with one action only returning a static HTML page on 'GET' request (no databases).
2. Copy the DLL to your scripts folder.
3. Call the link in a browser.

If you get your static HTML page then the IIS is working OK. Try that and let me know the result.

One more thing: the error looks like there is some kind of security/permissions problem. What is your Database.LoginPrompt property set to? Can you use the same DSN with a standalone app (not ISAPI) and when connecting to the db are you receiving a login dialog? You should not see such a dialog.

About 2:
I'm sorry but I can't help you more because I've never had to do so.

Regards, Geo
ImbeginnerAuthor Commented:
my ISAPI has three actions
the first is restricted to returning back the html page(teturn this page  well ) but when I want to refer to action that have database operations show me above Result page.

>> on more thing :<<
i set my database.loginpromt:=false
and i can connect to this DSN with datacontrolls(such as Dbgrid).
OK, thanks. That makes things clearer. My proposal is to forget about BDE and migrate to ADO using 'Microsoft Jet OLE DB Provider' in the ConnectionString property for accessing mdb databases. You need TADOConnection instead of TDatabase, no TSession, TADOQuery instead of TQuery. If you want to use DSN you might set 'Microsoft OLE DB Provider for ODBC Drivers' in the TADOConnection.

Alternatively you may try CGI instead of ISAPI just to see if it would work as expected.

Regards, Geo
ImbeginnerAuthor Commented:
Hi,thanks for advice,
but i think my problem was existed in security issue of IIS scripts file,
because when in dicetory security of my anynomouse to administrator my program was
worked. but i dont knoe that i did a good selection for anynomous account.

Finally,what is the best configuring for IIS for connecting to DB ?
ImbeginnerAuthor Commented:
on thing :
about debugging ISAPI please refer to this article,
it is sepcial for windows 2000,1410,23024,00.html

with your guideing i can catch it.

best regards

ImbeginnerAuthor Commented:
11/08/2003 12:51AM PST comment is Full of mistakes(grammer)
ImbeginnerAuthor Commented:
Hi, I changed  BDE to ADO  component  but  My  last problem  was existed ,
I dont know what is the good configurations For my IIS(5)  to supporting my web applications(ISAPI).

Note  1  : My web application want  to interact  with internet Users . <-- important
NOte 2 :  In Future, I want to implement my tables on Oracle Databases
IF you say the answer of below question,I can increase points To 200 with  A grade.
Q:How my web applications(such as ISAPI.dll or CGI ) can connect to oracle database For supporting internet users?
My purpose From upper question is configuring my server side for connecting To db from my web application.
I know, How local users can connect to server side but i dont know how can i configure my web server for
connecting users from my isapi to my DB.

best regards

About configuring your IIS:
Perhaps you should ask a question in another area - 'Web Servers->IIS'.
What I could say is that the anonymous access uses one special account 'IUSR_MachineName' (in my IIS at least). You have to grant that account access to your mdb file. Select the file and open its properties. Go to 'Security' tab and add full access to that account (named 'Internet Guest Account' in my XP).

About Oracle:
There is nothing special about Oracle db compared to other SQL servers, I think. Connect to the sql server as you'd do it in normal apps. The only thing you should check is that your local account (described above) has been granted an appropriate access to the server.

Regards, Geo
ImbeginnerAuthor Commented:
About Your IIS Idea:
I read a article in  about this data entry with ISAPI
Create an ODBC alias for this mdb file called WEBSITE_ODBC using the ODBC Manager.
The ODBC DSN should be a System DSN since it will be used by the Webserver(IIS) and not
by a logged-on user. This point is very important to note. On Windows NT, IIS uses IUSER_ as the user. This user has limited access to the system. <<

what is your idea about this thing ?
Using ADO you don't need any ODBC DSN. ODBC is the old database access technology while OLE DB Provider (which ADO uses) is the new one. Add TADOConnection component (equvalent of TDatabase), set its ConnectionString property and use TADOQuery, TADOTable, etc ADO components setting their Connection property to that ADOConnection1 (or whatever you name it). Don't forget to grant full access to the mdb file as I said before.
ImbeginnerAuthor Commented:
I often use of ADO ,
but if we attention to article,we can find that
this article say giving  access to tables only special for system (not IUSER_<machinename>).
with your proposed work we give Full permissions to IUSER_<machinename) for accessing to Db,

about :
>>There is nothing special about Oracle db compared to other SQL servers
From BDN :

FAQ663D.txt - InterBase access from a web server application

Category   :Internet/WEB
Platform   :All-32Bit
Product    :

How can I access Local Interbase from a web server application?

I'm using NT and getting the error message "Unknown user name
or password." when attempting to access Local Interbase from a
Web server application. How do I fix the problem?

Make the following changes to your configuration:
1-Interbase must be running as a service (not as an app w/
tray icon).  Which you can change by clicking on the
Properties for the tray icon for IB.
2-Both the Interbase server and WWW Server must have the
following right set: Control Panel | Services |
InterBase Server | Startup make sure "Allow Service to
Interact with Desktop is checked". <--- my purpose is this


ImbeginnerAuthor Commented:

thanks for your assisting
but you can give only 50 points with A grade of total points.
At this moment I have several ISAPI and CGI apps (IIS) working perfectly with mdb files via ADO (MS Jet OLE DB) in the way I've already described. I also have one ISAPI using System DSN ODBC (MS Access Driver) but with MSAccess97 database. I don't know what else I could say.

If you want to give me 50 points then ask a question (for zero points) in the Community Support (CS link at the top of the page) to decrease the points of this question and to refund you the rest. Add a link to this question there also.
ImbeginnerAuthor Commented:
Sorry For everything,
Becasue the experts effort in this site are for helping others.
But i compared your effort with points,
also,you are a best man in delphi related work.
I will give you all of points(125 with A grade)

>>I also have one ISAPI using System DSN ODBC (MS Access Driver) but with MSAccess97
database. I don't know what else I could say<<
Do you define IUSER_<machinename> user  in properties/security for your mdb file ?
IF yes,in really your IUSER_<macinename> uses for Writing/Reading  To/From your DB(not system user)
IF No, I will intall access( 2000 or  97) For this work .


>Sorry For everything,
There is nothing you have to sorry for.

>you are a best man in delphi related work.
Thank you.

>I will give you all of points(125 with A grade)
You don't have to. Just ask a question in CS and site moderators will handle the issue. They are always very helpful.

>Do you define IUSER_<machinename> user  in properties/security for your mdb file ?
Yes. You could try both ways yourself and see if there will be any difference.

>IF yes,in really your IUSER_<macinename> uses for Writing/Reading  To/From your DB(not system user)
I really don't know :-)

Regards, Geo
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.