Transfer data from room database to a local socket server Android Studio - database

I have designed a room database in Android studio kotlin , now I have to get all data from the phone to computer using local socket server , is this possible?
If yes how
Designed the room database also created a socket server go run in the background , I have to just send the data as a whole or as a file

Related

Can't connect to SQL Server from other computers

I want to ask you about a problem.
I have developed a windows application that uses a SQL Server database with SQL Server authentication (with a username and password) to log in.
The database is located on a local server which uses the same network as my company computers.
Now I have published the application and installed it on my computer (where I developed it and in which I also have the SQL server installed).
I also installed the application on the computers of some colleagues who do not have any program installed (they do not have Visual Studio or SQL Server installed).
When I try to log in to the application from my computer everything works fine.
(I can enter in application and database communication works very well).
But when I try to log in to the application from other computers (with the same user which I used on my computer before), it does not work.
I get this error:
Named pipes provider error 40 could not open a connection to SQL Server
I did these steps on the server where the application is located as:
Enable TCP / IP in SQL Server Configuration
Open Port in Windows Firewall 1433
Allow remote connections to this server
Can you help me with any suggestions?
I would try creating a ODBC connection to your machine from the client as a quick test - using the ODBC control panel. If that works, then check your connection string in the app. Maybe it's configured as a local connection? (The connection string would be my first guess.)
There are so many things that can be wrong that it a guessing game. This link might help.
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15

Copy all data from local to server and server to local

I have a win form app which is running at local using SQL Server database. The second database is at server and working. Because of internet connection problem I don't save data to server all time. My aim is that how can I copy (mirroring) data in local database to server database and copy data from server to local when added or changed data. There are foreign key problems etc.
My last goal is reach, add, or edits data from remotely on mobile or website. I tried signalR Socket it is good when local machine has connection. When connection lost I can't reach local database with signalR.

Datasnap server with multiple database connections

I am creating a new version of my Datasnap server for Firemonkey apps to connect to in Delphi 10.2 Tokyo.
My main issue is that the Datasnap server must be able to connect to multiple Firebird databases. The apps will give a parameter to the server so it knows which one to use.
For know I use an .INI file for administrating my Firebird databases. On creation of the server it reads all the locations of the database files and settings.
What is the best way to safely connect to the databases in your opinion?
I've had a few ideas my self:
On device connect create new connection component and then connect to
database that the app has set in parameter. After the device disconnects close the connection and free the component from memory.
After reading the INI file create the connection components and put them in a list. Then when a device connects search for the connection with the parameter the app sends and then open the database connection. Then after the device disconnects close the connection.
Create new TDSServer per database with a set database connection and add to
list. When device connects search for the server it needs to use with the parameter the app sends. No further database connection handling is necessary.
Only opening the connection and closing.
Or something else entirely? Maybe multi-threading?
Remarks
If a new database is added to the INI file the server is restarted so it reads all settings again. So no need for accounting for new databases runtime.
I do also want to use database transactions arround calling different methods in the server. The apps send when to start/commit/rollback the transaction.

Problems faced in keeping SQL Compact Edition Database on another machine in same network

I am using SQL CE 3.5 for one of my project, the front end is WPF application which process the given files and dumps the data to SQL CE database.
Presently application and DB is on same machine.
Client wants that he should be able to run the application from any machine on the network but database should remain on shared location of Server.
User will select the path to SDF file in the Application and then when any file is processed application will dump the data to database.
My question is, if keep SDF file on network shared location and access it from any machine then does it will work fine or could give problem?
actually, it is not possible - SQL CE does not support network-hosted operations: everything related to the sdf-file (temp data) is recorded to the local machine, not network source, thus server is unable to process requests correctly.
You can use SQL Express Server that acts like data storage, for the local client the only thing you need is Microsoft Synchronization library 2.1 (it also works with SQL CE 4.0 SP1)
Summarising, create the SQL CE database, fill it with tables, index them, then port it to SQL Server express, add sync module to your app (in a separate thread ofc) and that's it.
Another solution is to use MS Access DB, which allows such mess, but it is incredibly slow not to mention no way to allow simultaneous writing to the db.

Can a silverlight application open a socket (TCP/IP) connection to the same server or another server?

I want to develop a Silverlight application that opens a dedicated TCP/IP connection to the server that it is run from. What are the restrictions?
The only restriction in this scenario is that the port number you are connecting to must be in the range of 4502-4534.

Resources