Has anyone ever managed to get a datasnap system (BDS2006) running in apache?
I have set up my apache to acceot cinnections to the httpsvr.dll as per this article
http://www.distribucon.com/blog/HTTPSRVRWithApache.aspx
.
My TWebConnection objects connects perfectly but as soon as my clientDataset becomes active I get an error saying "cannot load library/dll"
I assume it is a problem loading the com server into memory? Any Ideas?
(I am trying to get away without having to change my com server, so that i can use it on both IIS and apache installations.
If your application is using clientdataset, it also needs midas.dll.
You should deploy midas.dll or your application uses block should contain midaslib unit.
Related
I have a small test application, made with Delphi 10.3.1 as an Stand Alone HTTPSYS Intraweb service. It has an ADOConnection and a ADOTable and in FormShow of unit1, I open the connection, and the table and reads the first 10 rows and add them to a listbox. Just to see that it works and is possible.
When running the application as a Stand Alone HTTPSYS, vith visual GUI, it's working nicely, but when I compile it as a service, and install it, on the sql server, or on the development machine, it fails with access Violation, trying to open the table. I suppose it is an Authentication problem.
I have tried to open connection with both Windows Auth, and with a specific SQL login, and I have tried running the service with both local system (default) and with the specific SQL account.
What am I missing ?
The Specific SQL login, works in SSMS. I'm able to use it to login and access my tables.
Also, if I create the application as a DLL and put it on my IIS10, it works fine.
You are right. It has nothing to do with authentication.
For the IntraWeb HttpSys Stand Alone program to run as a service, the ServerController.ComInitialization property must be set to ciMultiThreaded.
Thanks for your comment which lead me to look elsewhere. You do deserve the credit.
Regards
Soren
My D7 dBExpress project is supposed to connect to a local Interbase XE7 server.
It has the usual DBX setup: SqlConnection, SqlQuery, DataSetProvider and
ClientDataSet and does a simple 'select * from mytable'.
Last time I used it, it was working fine, but today when I ran it inside the IDE,
I get an exception as I call
ClientDataSet1.Open;
in my FormCreate (that call is the entire code of the project, btw). The
exception is an EDatabaseError with msg "No mapping for Error Code Found." and happens in TSqlConnection.DoConnect
That sounds familiar - I got that error myself one time, when I went back to an IB project after a few weeks.
It turned out that in the meantime something had sneaked Firebird onto my machine and it had hijacked the port IB usually listens on, and it was actually this FB server which was rejecting the connection, not the Interbase one!
Take a look under Services to see whether there is an FB server running. If there are, close it down (and start the IB server if not already running, of course). Then try your DBX project again.
Somewhere in the IB docs, I found something which seemed to suggest there was a way of getting FB and IB servers to coexist, but to avoid falling into a similar trap another time, I wrote a couple of batch files to shut down one of them and start the other. One is called "UseIB" and contains:
net stop "Firebird server - DefaultInstance"
net start "InterBase XE7 Server gds_db"
The other one, "UseFB" just does the opposite, of course.
I am trying to create a sample Delphi XE7 desktop app that will connect to SSRS 2005 web service but every time I try to call LoadReport web method, the following error is shown:
This is what I have done so far:
Create a desktop app.
Import WSDL for ReportExecution2005 and ReportService2005.
Create a button that call the web service based on the code shown
here. The web service locations as well as report are hardcoded for
simplicity purposes.
This is the code snippet from the link:
HTExec := tHttpRio.Create(nil);
rsExec := GetReportExecutionServiceSoap(False, ExecURL, HTExec);
// Load the selected report.
LRParams.Report := 'ReportName';
LoadParamsResponse := rsExec.LoadReport(LRParams); //here it fails
Note: I have already created a .NET win form app (VS2010 and VS2013) that consumes this web service without any issues, thus I know the web service and report to render are working OK. Sadly our requirements is for a Delphi solution, My educated guess is that the WSDL importer generated code is not correct and somebody out there may have come across with this issue before and know how to solve it.
I did a quick search for "http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/LoadReport"
and found this.
If it applies to you as well, it may be the case you're calling the service on an incorrect URL, use the one with ReportExecution2005.asmxin it, not ReportService2005.asmx
(There's a lot more here)
To find out differences between the Delphi version and the working version, use a HTTP proxy (Fiddler2) to capture the SOAP HTTP traffic in both setups.
If you have no access to the working environment, use SoapUI to create SOAP requests.
I have a datasnap server app developed originally with XE5 that was working fine with a client app on a mobile tablet accessing a Firebird database on a server. I have recompiled the code with XE7. The only change I had to make to the code to compile without any errors was to add DataSnap.DSProviderDataModuleAdapter to the uses of the methods unit. Have replaced the server app on the server (stop service/uninstall/reinstall/start service) and now I can no longer insert/update records in the database on the server. Whenever I reach the line of code to ApplyUpdates(0) I get the following error:
Remote Error: Access violation at address 0093CB3F in module Snackerservice.exe. Read of address 00000000.
Retrieving data from the database to display on the tablet is not a problem so the connection is working.
If I change the server app back to the one developed under XE5......all works fine again. The other strange thing is that there are no problems with the XE7 compiled app when using 'localhost' to access a copy of the database on my development machine......only when accessing through an IP connection to a server.
Can someone please help me solve this frustrating problem.
Bill Zwirs
To hopefully make it a little clearer, here is a bit of code that causes the issue:
iLic := ServerMethodsClient.Get_Licences;
iDev := ServerMethodsClient.Get_NumDevices;
if (iDev < iLic) then
begin
iDevID := ServerMethodsClient.Get_NewDevID;
MobClientDM.DevicesClient.Open;
MobClientDM.DevicesClient.Insert;
MobClientDM.DevicesClientDEVID.AsInteger:= iDevID;
MobClientDM.DevicesClientMACADDRESS.AsString := sMacAddress;
MobClientDM.DevicesClient.Post;
if (MobClientDM.DevicesClient.ChangeCount > 0) then
MobClientDM.DevicesClient.ApplyUpdates(0); ....................Error occurs here
end;
Problem solved at last.
When I installed the server app on the server I also added Midas.dll to the directory which worked fine until I compiled with XE7. So I have now included MidasLib in the uses clause of the server app and removed the Midas.dll file from the install directory. Compiled and installed and all works good again.
Hope this helps others who might have a similar problem.
Bill Zwirs
If I try to terminate the Borland SocketServer application for Delphi 2009 the message above appears.
The application window remains open and I can only terminate the application in the task manager.
Operating system is Windows 2000 Professional SP4
The same error also occurs with the Delphi 2007 version of scktsrvr
scktsrvr attempts to store its settings under HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Socket Server registry key which probably fails under a limited user account. Try running it as administrator, or as a service.
Edit: you can also modify it to use HKEY_CURRENT_USER, for example. It comes with source code.
Run the socketserver as a service, and add the proper permission to the registry key the service user needs to set. Remember that the user you use to run the SocketServer is important. The server acts like a proxy, and in turn call the DCOM server that implements the remote server. Unless changed, the user of the connecting process is used for DCOM security, thereby you have to ensure the right user is used, or you may lead to big vulnerabilities.