Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I have an interview on Monday and I have been asked to deliver an application that shows my skills in C# and relational databases, preferably SQL server. The application does not have to run, just show the source code, however I would like to be able to demonstrate it if possible.

The problem being, is that all the work I have done regarding C# and SQL server, or any relational database for that matter has had the database running locally.

Is there a free solution to allow my database to run on a machine other than my developer machine so that the employer can have play about with the application and access the database without the use of my machine?

If so is it easy enough to transfer the database and it's data to the solution?

Thanks very much in advance,
Senior Crispy.

EDIT: I realise now that a free solution for hosting a SQL server is probably unlikely. I could temporarily host SQL server on my home machine, any ideas on what ports I would need open on my router and how would I go about sorting the login details for the database?
Posted
Updated 2-Jul-10 7:11am
v2

You can connect to SQL database hosted on remote machine. To connect to the database, hosted server should allow remote connections. Also, you should have following permissions for connection.
1. Connect to SQL server.
2. Connect to database, read and write(if needed).

The SQL server listens on 1433 port (a default port).

Install SQL server management studio to view the databases. The SQL server client allows you to backup/restore the databases with pretty simple steps.

Look at following MSDN articles.
How to: Back Up a Database (SQL Server Management Studio)[^]
How to configure SQL Server 2005 to allow remote connections[^]
 
Share this answer
 
Comments
Walby 3-Jul-10 3:32am    
Thanks very much for all your answers, these articles seem to be exactly what I was after. :) Much appreciated
"Is there a free solution to allow my database to run on a machine other than my developer machine "
Yes. Only the connection string would change and remote server where database is present needs to be configured to accept remote connections.

is it easy enough to transfer the database and it's data to the solution
Yes. With SQL Server, taking backup & restoring on other system is quite easy.
 
Share this answer
 
Comments
Walby 2-Jul-10 13:09pm    
I've tried this once before but I could only seem to transfer the actual database structure and tables, but not the data. Any ideas how to?
Sandeep Mewara 2-Jul-10 13:21pm    
Use SQL server backup option. We do all the time and it works great (with data!).
Google for SQLServer DB backup, you should get ample material on it.
Perhaps you could use Access as your relational db backend instead of SQL. It would be more work for you this weekend to modify the app to look at Access...
 
Share this answer
 
I also have this problem and i do all things for connect my database from another PC but i am not successful to do it any one can tell me hole process from remote Sql server to Connection String.
Currently i am using this connection string

"Data Source=192.168.1.113; initial Catalog=ndts_tm247; integrated security=false; User Id=sa; Password= ******; MultipleActiveResultSets=True";
 
Share this answer
 

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