Bidirectional Synchronization between Compact and SQL Server DB in Windows Mobile 6.5 - windows-mobile-6.5

I followed the link http://mobileworld.appamundi.com/blogs/andywigley/archive/2008/12/08/building-a-sync-services-for-ado-net-solution-for-mobile-devices.aspx
and was able to sync DB.
Problem is that it is only for static connection string and Server IP where SQL server DB is located which i provided through designer wizard.
now i want to change the connection string and Server IP as provided in some file.So that user can change the Server DB location and synchronize.I don't know how to proceed.Please Help

In the tutorial the MiddleTierServiceLibrary project has an App.Config file with the DB connection string. You can set the DB connection there.

Related

How can I run my project on client pc without installing SQL server on client pc

I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.

How to implement a service in visual studio when host of sql server and wcf are different

Connection string syntax in web config when connecting to a remote host sql server.
How to write correct connection string if your sql server host is www.xyz.com and we have a sql server instance name or we have a port number for connecting to sql server(when sql server host and service host are different).
I found the answer with comma port number . My issue was in data source of connection string when we using a remote sql server. My sql server remote use port number. with adding ,port number to remote IP or host , the connection is true. ... Data Source = www.xyz.com,1434 ; OR Data Source = www.xyz.com\my instance name,1434 .
It could achieve in the WCF. This is a common scenario, using WCF to CRUD(create,read,update,delete) the database. Ado.net is a common tool for persisting the data. In addition, the Entity Framework is also available in WCF.
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/ado-net-code-examples
https://learn.microsoft.com/en-us/ef/ef6/get-started
We could take advantage of server explorer in Visual Studio, or the SQL server object explorer. It could generate a proper connection string.
https://www.c-sharpcorner.com/UploadFile/suthish_nair/how-to-generate-or-find-connection-string-from-visual-studio/
https://learn.microsoft.com/en-us/visualstudio/data-tools/add-new-connections?view=vs-2019
As regards the connection string, please check the following for details.
https://www.connectionstrings.com/sql-server/
Feel free to let me know if there is anything I can help with.

Error when adding Oracle DB to ODBC connection

Hi everyone here,
I am pretty new to Oracle DB configurations as I have been using SAS and Microsoft SQL all this while.
What i want to do is to add Oracle DB to ODBC(64-bit) in a new server.
This is the scenario:
Server A:- Existing Application server that has Oracle configured in ODBC(64-bit)(Been using for the past 3 years, configured by other people).
Server DB:- The Database server
Server B:- Brand new server that i want to configure Oracle DB in ODBC(64-bit)(Brand new).
I copy every single details of the server information in Server A ODBC for the same Oracle DB and put it in Server B ODBC. I have both Server A and Server B remote connection side by side and do "Test Connection".
Server A can connect successfully. However, Server B is giving me this error:
SQLState=08004
This is my first time trying to configure for ODBC to Oracle DB. I have previously configured many Microsoft SQL DB without any issue. Do take note that i have not installed any Oracle driver or any necessary-tool needed for ODBC to link with Oracle as i do not know of any. Is there anything i have to install for this to work or any necessary settings need to be done before configuring it?
All this while for Microsoft SQL connection to ODBC, i just put in the DB credentials and voila.
Your help is very much appreciated.

Visual Basic Sybase connection issue

I am developing code in Visual Basic 2010 and connecting to Sybase16 databases hosted on two servers. I am referencing Sybase iAnywhere in my project.
I use the connection string shown below
Public dbIMS As New SAConnection
dbIMS.ConnectionString="UserID=userid;Password=userpw;DatabaseName=dbname;ServerName=dbname;Host=192.000.000.000;"
Try
dbims.open()
Catch ex as Exception
strErrMsg=ex.Message.ToString
End Try
I can connect to some databases, but not others. Error message is "Database server not found" All databases are active and the service name and db filename are the same for each database. I can connect to some dbs on each server and as yet have been unable to find anything in common with the successful connections or the failed connections. I am certain the ip address is correct and the db and server names are correct.
I am looking for advice on how to diagnose my problem, and thanks in advance.

ASP.NET Membership.ValidateUser failing to connect to remote sql server

I've got an ASP.NET app that uses the standard SQL Server Membership provider to authenticate. Works fine with a local database (this is NOT SQL Svr Express!). When I try to authenticate against a remote database, even with correct connection string, I always get a 'Named Pipes Provider, error 40: Could not open a connection to SQL Server. I've verified that the server allows remote connections and that it supports Named Pipes connections. No one else is using the database at the same time (although others may be connected to the server). Here is the connection string and membership info in my web.config (names dummied and ip address dummied for privacy). Any one have any ideas?
Bob
(same settings as above for roleManager)
Named pipe is valid for local connection only. Need TCP Protocol.

Resources