Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

I have a windows application (exe) which is running fine in some systems but not working in windows server systems where there is no sql installed.

I want that exe to be installed on each users computer but users wont have sql in there system.

Can anyone guide me is there anything i am missing.


Thanks


Suman
Posted
Comments
ashok rathod 5-Sep-14 6:52am    
have you used any reference of database related task in your code?
babli3 5-Sep-14 6:54am    
I didnt attach any database to the set up ...do i need to attach the database aswell?

1 solution

If you are using SQL database, then the PC running the code needs to to be able to contact the PC running the SQL server instance - it almost certainly won't be on the "local" PC, because outside of development, it is very, very rare for a user to have SQL server installed: it's a complex install which it is very easy to get wrong.

So: either you need to provide a customisation facility to let the user contact the right SQL instance (the one with the right DB attached) on his network via a connection string, or change your software to use a database which doesn't require SQL server.
If you are not expecting the DB to be multiuser, then I would strongly recommend the later. SqLite, SQLCE, or even Access are much better for single user as they don;t require much (if any) additional installation - a couple of DLLs is all.
 
Share this answer
 
Comments
babli3 5-Sep-14 7:13am    
Thank you. My windows forms contains only a grid and connection string is in web.config.
But the users where this exe will be installed will not have sqlserver installed at all.
Do i still need to attach my db?
OriginalGriff 5-Sep-14 7:26am    
Woah, woah, woah...
A couple of things here: web.config doesn't work for WinForms: you should be using settings.settings (or App.Config) instead.

And if your users will not have SQL server, you can't use MSSQL at all - so there is nothing to attach to.
I think you need to look at changing to a different database - but if your users expect to share info via the database, you will need to get them to install SQL Server (or MySql) on one PC on their network, and add the DB to that.

What exactly are you trying to do?
babli3 5-Sep-14 7:31am    
sorry i mean app.config.
Ok Thanks alot

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