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!
dinko1Asked:
Who is Participating?
 
jimyXCommented:
The thing is that I just started the Datasnap in D2009, I used to use MIDAS in D7. So I though giving you the sources that I use would help you as well, anyway I created a small demo for DataSnap + UniDac + SQLite hope it helps.

Steps before starting this project:
At the Server side adjust the UniConnection1 and the UniQuery1 to connect to your local DB and make sure to test the connection and ensure it's successfully connects. In the Server folder add your DB file and the sqlite3.dll.

At the client side adjust the HostName for the "SQLConnection1" at which it should find the Server and make sure the Server is running before opening the Client. As test I set it to the localhost.

For more clarification and extra knowledge you may spend some time reading this sources beside the above whitepage:
http://blogs.embarcadero.com/pawelglowacki/2009/01/20/38649
http://www.drbob42.com/examine/examinA8.htm
UniDac-DataSnap.zip
0
 
ThommyCommented:
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
0
 
ThommyCommented:
Remember Devart UNIDAC requires the SQLite DLL...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
dinko1Author Commented:
the solution you provided is just single access to the sqlite file. I asked TCP/IP access between machines.
0
 
jimyXCommented:
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
0
 
jimyXCommented:
Sorry dinko1,
Have you seen my comment?
0
 
dinko1Author Commented:
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).
0
 
jimyXCommented:
OK I see.

Here is a good DataSnap whitepaper:
http://www.arena.net.au/2010/content/embarcadero/edn/Delphi_2010_WP_DataSnap_091016.pdf

For more materials and learning videos:
http://www.drbob42.com/examines/examinB8.htm
0
 
aikimarkCommented:
@jimyX

This question is scheduled for deletion.  If you want to continue helping dinko1 you should post a comment and click the Object button
0
 
dinko1Author Commented:
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.
0
 
aikimarkCommented:
@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?
0
 
dinko1Author Commented:
i already built my project on UNIDAC + SQLITE and I need to turn this into NETWORK.
I cannot change UNIDAC or SQLITE.
0
 
aikimarkCommented:
@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.
0
 
jimyXCommented:
Waiting for a feedback from the author about my last post.
0
 
jimyXCommented:
In my post #35365355, I have provided a complete example (working demo) which is exactly what the author has requested.
0
 
ModernMattCommented:
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
0
 
senadCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.