Link to home
Start Free TrialLog in
Avatar of dinko1
dinko1

asked on

datasnap + unidac example in delphi

can someone please provide me a real example of how can I use UniDAC SQLite with DataSnap? I have one GUI Application with a DBGrid and one other app as Server with UniDAC SQLite that connects to a local sqlite file. Let's assume that those two applications are in different machines. So I need to use datasnap to remotely grab data from Server application and display them in the GUI application (DBGrid).

If you have other simplier method to suggest please let me know!
Avatar of Thommy
Thommy
Flag of Germany image

Following steps are from Unidac SQLite3.dll...
http://www.devart.com/forums/viewtopic.php?t=14970&sid=e2110564a33fda35dc482476d51b8c7d


1. Drop a TSQLiteUniProvider on a form
2. Drop a TUniConnection onto the form
3. Right hand click on the UniConnection1 and select Connection editor. From the provider dropdown box select SQLite, and then manually enter the path to my database i.e. C:\Program Files\MyAPP\MYProgram\Base.sqb

4. From the Connection editor I select the option tab and enter the following path C:\Program Files\MyAPP\MYProgram for the ClientLirary

5. Change back to the connect tab, and click on the Connect button, which is now rasing the following error Connection ClientLibrary differs from already active Connections.

6. Leaving the ClientLirary blank for the option tab raises the following error cannot load client DLL: sqlite3.dll
Any ideas
Remember Devart UNIDAC requires the SQLite DLL...
Avatar of dinko1
dinko1

ASKER

the solution you provided is just single access to the sqlite file. I asked TCP/IP access between machines.
Avatar of jimyX
Hi dinko1,
It should be simple, once the DB supports the TCP/IP connection. As per the attached screenshot, you can specify the Server and connect easily. But the question is, does SQLite supports the TCP/IP connection?

As you can read in the SQLite documentation Using SQLite on a Network, you are going to rely on the filesystem sharing across the network. In order to enable TCP/IP connection to grab data from Server, either use the suggested solutions:
http://www.realsoftware.com/realserver/
http://atensoft.net/dev/sqlite3.php
...

Or move to another reliable DB like Oracle, SQL Server, MySQL,...etc. that support the TCP/IP connections.
UniConnection.JPG
Sorry dinko1,
Have you seen my comment?
Avatar of dinko1

ASKER

yes Jimmy, and I dont want to move to another server solution.
I already work with MySQL and I have lot of troubles with it. Lots of helpdesk requests, mysql not working, server is down. I have a small project and I need a simply database system.

So, I have to stay with SQLite and make it network (DataSnap).
@jimyX

This question is scheduled for deletion.  If you want to continue helping dinko1 you should post a comment and click the Object button
Avatar of dinko1

ASKER

my question is:

an example of UNIDAC + SQLITE + DATASNAP

now white pages on datasnap. I already know how to google and find such info.

thank you anyway.
@dinko1

>>If you have other simplier method to suggest please let me know!
I think the problem you might be having with some of the responses is that you invited experts to suggest alternatives in your original question text.

>>an example of UNIDAC + SQLITE + DATASNAP
So, you will only accept an answer if it supplies a coded example (or link to example) that incorporates all three components -- no alternatives allowed?
Avatar of dinko1

ASKER

i already built my project on UNIDAC + SQLITE and I need to turn this into NETWORK.
I cannot change UNIDAC or SQLITE.
@dinko1

I was trying to clarify the question/problem for the other experts and (potentially) future readers.  I can't offer you a solution, but my questions and your responses might help the other experts with their suggestions.
ASKER CERTIFIED SOLUTION
Avatar of jimyX
jimyX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Waiting for a feedback from the author about my last post.
In my post #35365355, I have provided a complete example (working demo) which is exactly what the author has requested.
Lacking further responses from the Author, I am initiating the close procedure to accept jimyX's comment http:#a35365355 as the solution.

jimyX, thank you for going to the effort of coding up and providing a sample solution!

ModernMatt
Experts Exchange Moderator
Unidac has the unidac providers. So depending what your database is drop the adequate unidac provider on the form.
Then on your uniconnection set Providername to your provider. Drop another uniconnectiondialog - and set your uniconnection to use this connectiondialog (Loginprompt=true). This is fairly simple link. Uniconnection will automatically connect.