Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hey guys, very important question comming up:
in the last year i developed a desktop application in winforms that help the user to organize his bills and money. the software, as said, written in winforms and the database was ms access (because not all of the users are using sql server on there personal computers).
Now, i want to upgrade my software. for start, i want to write it all down on the WPF platform but that not the main thing.
I want my software to connect to a remote database (sql server) in order to retrive data, license and updates.
this is the first time i'm trying anything like this and i would like to know how to get started.
Do i need a remote server that support windows and has sql server?
what will be the connection string?
can u please show me some code snippet?
please, this is very important to me. any tip, link, advice or code will help! :-)
Sergey Alexandrovich Kryukov 28-Dec-15 17:30pm    
Snippet of what? It all depends on what you are using and where. You need to understand what "SQL server" means. It's itself a server.
Are you familiar with ADO.NET? What's the problem?
oronsultan 29-Dec-15 0:45am    
hey sergey, nice talking to u again.
it seems like you angry :-(
please let me explain my self regarding to your reply.
you said "It all depends on what you are using and where"... i'm not sure i understand you. like i said before, i'm using visual studio 2015 and c# (i'm guessing winforms / wpf is not relevant for now). regarding to the "where", i didn't understand you...
Now, i know SQL server Its itself is a server but you need to understand that i didn't try thing like this before and i'm looking for guidance. i'm asking if i need to purchase a remote desktop server with sql server included and if so, how can i connect to it from my home computer. again, please understand i'm new to this method. looking forward to here from you soon :-)
BTW, please look into the answer i wrote to RyandDev below.
Sergey Alexandrovich Kryukov 29-Dec-15 2:12am    
Angry? With what? Even if you did something wrong (and I don't think so, as you are asking legitimate questions, perhaps not quite precise), it would not be a problem for anyone but yourself.
By "what and where" I meant exactly the SQL server and its address. You already got a good advice to check with No, you don't need to purchase any other server to use the SQL server.

Perhaps your confusion is based on (I just looked through some comments below) your experience with Access. I can imagine how this experience can be traumatizing for a beginner. :-) This thingy lacks even such rudimentary and insufficient element as client-server model. I would not advise anyone to take this product seriously and especially to start with it.

Short answer is: use ADO.NET.

oronsultan 29-Dec-15 2:15am    
what u r saying is that an sql server on my personal computer would be enough? user could connect to this sql server and retrieve data? another thing, what if i want the sql server to be on a remote desktop? than what i will have to do?
Sergey Alexandrovich Kryukov 29-Dec-15 2:25am    
You need to read SQL server documentation...
Come one... remote desktop?.. First, you already have it; second, why?!

1 solution

Please see my comment to the questions with the notes on SQL server and Access. See also:
Microsoft Access - Wikipedia, the free encyclopedia[^],
Client–server model - Wikipedia, the free encyclopedia[^],
Pull technology - Wikipedia, the free encyclopedia[^],
SQL Server - Wikipedia, the free encyclopedia[^].

It's possible that experience with Access gave you wrong impression on what "real" database tools should do. The database tool lacking event the client-server model hardly can form a clear vision of database technology.

You don't need any other server to access an SQL server. As to connection strings, you already got a good advice from Homero Rivera to use - Forgot that connection string? Get it here![^].

The quick advice would be: use ADO.NET, learn it:
ADO.NET - Wikipedia, the free encyclopedia[^],

This CodeProject article will help you to get started in no time: Using ADO.NET for beginners[^].

Share this answer
oronsultan 29-Dec-15 3:16am    
Dear sergey, please accept my apologies but i think we have not reached a common understanding regarding the question.
i'm a developer for 5 years now and familiar with the ADO pretty good. My disadvantage is my lack of knowledge in web in general and especially the fact that i used ms access in my code dosent mean i don't know the difference between access and sql server. i appreciate your answers (as always, you are the best replier) and all i am asking is not a tutorial about ms access, client-server or sql server from wikipedia but a good guidance on how to get started with connected to a remote server. basically, you need to see it like that: if a user using the software, how can he retrieve information from a database (sql server) not install on his computer? (of course that there is a lot more than that but this question can give a good perspective on what i am trying to accomplish).
sorry for being a nudg... :-)
Sergey Alexandrovich Kryukov 29-Dec-15 3:32am    
Please, no need to apologize. But please also understand me: I cannot remember who has what experience and cannot correctly evaluate it by just few comments in all cases. I acted based on my impression based on your question and comments, and some mistakes are always possible.

I still think that you did not properly explain your problems; besides, your references to remote desktop show big confusion on certain basics.

Having all that, I would say that even if you don't need to read those Wikipedia articles does not mean I should not have referenced them. You see, I almost never deal with databases, but when I did, I never had any serious problems, even though I had to solve quite serious problems. It's hard for me to understand how "not install on his computer" can be a problem. What's the difference where the database is installed? If it's installed somewhere on LAN (which is the most reasonable case; it's bad to expose it, say, directly to the Web), you can access it exactly as if it was on your own computer. It's hard to understand for me, how can you have any problems, if you say you understand SQL server usage well — it is not related even to ADO.NET. Say, Visual Studio comes with Server Explorer: But I preferred to use a small database client which usually comes with every SQL server product.

Does it answer your question?

By the way, the article on ADO.NET I referenced is very good and useful.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900