Languages :: Delphi :: Jet Engine, Excel, Web Server and Deplhi |
|||
| By: dauve |
Date: 07/07/2003 00:00:00 |
Points: 300 | Status: Answered Quality : Excellent |
|
The setting: Web Application done in Delphi 7 - with an intial webpage asking for suer info. The user hits submit, a query is done and the information is supposed to be saved to an excel file. The compiled exe delphi program resides in the cgi-bin directory and is called by another user through ie explorer (Intranet) I've tested the same code as an appication locally and it worked perfect - its when I put the code into the web application it doesnt want to work. The problem: The code below gives me an unknown error - I have no idea what the error is because the error is given through a webpage and I simply get a 500 error code. cat := CoCatalog.Create; //works fine cat.Set_ActiveConnection('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + FileName + ';Extended Properties=Excel 8.0') //error . . . //MORE CODE Question: Could it have anything to do with any permissions? Does the filename have to be in a particular format? Is there a logfile I can check to see what is happening? Anyone have a solution? Thanks Dauve |
|||
| By: VGR | Date: 07/07/2003 07:04:00 | Type : Assist |
|
| 1) yes 2) no, but probably enclosed in double quotes if containing any space 3) yes, access.log 4) check permissions for the webserver+CGI application to write and read in the destination folder |
|||
| By: mocarts | Date: 07/07/2003 08:03:00 | Type : Answer |
|
| what type of os and web server do you use? ado (and IIS) related user permission problems are discussed here: <A HREF="http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b210457">http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b210457</a> mo. |
|||
| By: dauve | Date: 07/07/2003 08:23:00 | Type : Comment |
|
| OS: Windows 2000 Web Server: IIS 5 |
|||
| By: DragonSlayer | Date: 07/07/2003 14:09:00 | Type : Comment |
|
| also bear in mind that your filename should be a relative path... not the full path e.g. if your .exe resides in C:\WWW_pub\root\cgi-bin\myapp.exe and your Excel file in C:\WWW_pub\root\files\myfile.xls, then for the FileName param of your connection, use '..\files\myfile.xls' or '\files\myfile.xls' instead of C:\WWW_pub\root\files\myfiles.xls (assuming that C:\WWW_pub\root is the root for your IIS) |
|||
| By: dauve | Date: 08/07/2003 02:15:00 | Type : Comment |
|
| The problem was with issues as well as putting an extra set of single quotes around filename should have been: cat.Set_ActiveConnection('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=''' + FileName + ''';Extended Properties=Excel 8.0') And the IUSR_ComputerName permissions had to be set as mocarts mentioned. Filename does not have to be a relative path. In this program I was actually creating an xls file not opening an xls file I could not find a log file called access.log Thanks Dauve |
|||
| By: VGR | Date: 08/07/2003 04:40:00 | Type : Comment |
|
| of course, "access.log" is for the real webserver, ie the indian tribe named "apache" ;-) |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








