|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Web Server and Modules » View Thread|
|Messages 1 to 8 of 8 total|
|Local Database Manager and Remote MSSQL Database on EWS|
|Thu, Apr 26 2018 9:00 PM||Permanent Link|
I have set up on the server:
a) a MSSQL database on a dedicated windows server
b) Elevate Web Server listening to port 8085
c) The Database (ccDB) is configured in EWS, along with one Dataset (clients). Can preview. The dataset was configured as ADO and the test connection is ok.
d) on the server, locally, the EWS responds and seems to be alive.
e) No content dir or file is set, because it is intended to serve only EWB database requests.
f) Ports are open in the firewall.
On the development computer, in EWB, Database Manager, I have not found a [visual] way to connect to the database located on the server. ADO will try to connect insecurely to the internet located Server, so it is not an option. EDB and DBIsam have not any option that I can see.
Tried to connect at runtime by assigning values, like changing the baseURL of the Database, names of dataset, database, Etc. No success.
Am not trying yet to connect over https but just via http to the server with the URrtL, to a dataset that has only test data.
This is not php on the server, but the EWS alone. Enabled the cross origin content, but it still is not seen by my development, client PC running EWB.
I did check all the samples but they refer the test data, which is local, not remote as in my case.
Am assuming of course that if I use EWS I can use the default database functionality, and can avoid the use of server requests and processing the datafields myself from a JSON response.
Need some help to know how can I:
- Connect and setup visually to the server hosted MSSQL DB using the Database Manager and EWS (server)/.
- Or, connect at runtime in code and bind data controls (grid, edit, DBnavigator Etc).for use the built in DB functions with EWS.
I thought of installing EWB on the server itself, but in the end all live requests will come from a client located device, so am not sure if that would work, and it is not usual or convenient. I access the dedicated server via remote desktop for setup tasks only.
|Fri, Apr 27 2018 3:49 AM||Permanent Link|
Not sure I can help much, but I suspect that the key way forward is to not be connecting to your live SQL Server. You say it can connect via ADO but not securely - that's the clue IMO. Create a local database that doesn't need the security, and link to that. The live system can link to its version.
Linking your development system to a live server is never a good idea. It risks you breaking all the live data, and it stops you understanding how the links work on deployment, which is important when you need to be sure you can change deployment.
|Fri, Apr 27 2018 3:59 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< c) The Database (ccDB) is configured in EWS, along with one Dataset (clients). Can preview. The dataset was configured as ADO and the test connection is ok. >>
Did you define the database and dataset on the EWB Web Server itself, or only in the IDE ? You need to define them for both (there's an import databases option the EWB Web Server configuration dialog):
|Fri, Apr 27 2018 6:24 PM||Permanent Link|
I defined the database on the server as well as one dataset. They are previewed without problem in the server itself.
I could not define the database on the IDE by using the database manager, because of the reasons exposed in the first post. That method would be desired. As I said there, I did a runtime version, changing the values but the running app can't seem to find the database.
It is connecting somehow because when I try to stop the server it says it has active connections. That is why I am asking for help, maybe am not assigning the correct values. Am thinking as it is delphi, of course, and did not find documentation that cover this specific case.
|Sat, Apr 28 2018 11:44 AM||Permanent Link|
On 4/27/2018 6:24 PM, jdforce wrote:
> I could not define the database on the IDE by using the database manager, because of the reasons exposed in the first post. That method would be desired. As I said there, I did a runtime version, changing the values but the running app can't seem to find the database.
> It is connecting somehow because when I try to stop the server it says it has active connections. That is why I am asking for help, maybe am not assigning the correct values. Am thinking as it is delphi, of course, and did not find documentation that cover this specific case.
If you think the EWB app is connecting then run it in a browser and use
browser debug tools (usually F12 and then use network tab to see actual
requests) - it will will show exactly what requests are going out, what
the URL is and what the server response is or if there is an error.
Without some additional info from http layer (browser debug) it's tricky
to help here but my first suspicion is CORS.
Assuming you are running EWB app from IDE then you need ot make sure
your web server allows cross origin resource sharing (CORS) - basically
app and data come from different domains/ports so browser blocks it (in
production this would not be an issue since your web server that hosts
data would also host the ewb app)
|Tue, May 1 2018 10:57 AM||Permanent Link|
Well I managed to connect it. The trouble was not the cross origin limitation because it was enabled as I indicated in the original post.
What happened is that for some reason in the ADO connect string dialog the password is accepted and the test connection passes, but when accepting it the password is not saved, unless the "allow save password" is ticked. Semantics in action...
The real limitation is the lack of a secure means to connect to the server for development. ADO through the internet is insecure. Probably a good idea would be to make the EWS itself a IIS dll, so it could communicate using the server's domain SSL certificate.
At this point I installed EWB in the server and access it via remote desktop in order to accelerate the development.
|Tue, May 1 2018 12:43 PM||Permanent Link|
On 5/1/2018 10:57 AM, jdforce wrote:
> The real limitation is the lack of a secure means to connect to the server for development. ADO through the internet is insecure. Probably a good idea would be to make the EWS itself a IIS dll, so it could communicate using the server's domain SSL certificate.
I believe there is an encryption option in the MSSQL ADO connection
string that might help a bit ?
Otherwise EWS is meant as a small included built-in web server and i'm
not sure IIS DLL is a good fit.
In terms of handling the dataset JSON natively here is the spec that one
would need to implement:
It's pretty straightforward.
|Tue, May 1 2018 1:37 PM||Permanent Link|
Well the truth is that am very new to this products and am still getting acquainted with it. Even though I have years working (for web apps) with php, js, IIS dll and other technologies where you collect parameters, compose and script every detail, I really miss working with the delphi RAD style, which is very straightforward, just connect, get the info, update and the engine takes care. It is very efficient in terms of rapid prototyping and development.
I thought the EWS was that kind of fast and from what I see today it is not quite too far from being. However there is the need of more documentation or maybe more examples. As they say, it is easy once you know how to do something.
My goal is to do it the Delphi-BDE-Client Server way of RAD. And multiplatform... I think it is possible.
When am done with the experiment will post an example for others to go fast.