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.
Related
first I want to say that, I'm very new with Azure and Sql server.
second, I have an Excel VBA code that create select query from an Azure SQL SERVER db.
On my local PC it works fine but when I'm trying to use the VBA code from another computer I get the attached error.
Is it something to do with security maybe ?enter image description here
The SQL Database service creates a firewall at the database server level for single and pooled databases. This firewall prevents client applications from connecting to the server or any of its single or pooled databases unless you create an IP firewall rule to open the firewall. For a connection from an IP address outside Azure, create a firewall rule for a specific IP address or range of addresses that you want to be able to connect.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-server-level-firewall-rule
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.
I newly installed SQL server 2012 .when install my Database their is a local server .then i created a db in local server about my new project.my system is in a network i install with admin permition. my db name is E4events and there are many tables in it.am also accessing network server db also from my sql server.i worked in local server db for 2 days on third day it is not connecting i refer and try to clear problem by many reference but still i cant connect .I am not feared about connection .i created lot of tables so if i can connect i will get data or otherwise please suggest me how to get that db and whole tables. so here below i attached meathods i tried to solve problem but i dint become succes
I am writing a Go Web App that displays data to a webpage. The database is in Microsoft SQL Server 2008. When running the program, the URL is properly handled in the main function to a function WebHandler() using ListenAndServe on Port 8080, but as soon as I connect to the SQL database, the web server connection is lost.
WebHandler() connects to the sql database, fills struct values with sql results, and loads the struct into an html/template to fill out a table accordingly.
I am using the github.com/LukeMauldin/lodbc" and "github.com/jmoiron/sqlx" packages to get sql results and they display fine. How do I reestablish the webservice in the WebHandler Function?
The issue was that I was trying to connect to the sql database on every page. The key is to connect only once and defer the close
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.