Click here to Skip to main content
15,877,246 members
Home / Discussions / C#
   

C#

 
GeneralRe: Printing any file using Shell Pin
emran83416-May-06 19:06
emran83416-May-06 19:06 
GeneralRe: Printing any file using Shell Pin
emran83418-May-06 0:09
emran83418-May-06 0:09 
GeneralRe: Printing any file using Shell Pin
Nader Elshehabi18-May-06 16:22
Nader Elshehabi18-May-06 16:22 
GeneralRe: Printing any file using Shell Pin
emran83418-May-06 16:48
emran83418-May-06 16:48 
GeneralRe: Printing any file using Shell Pin
Nader Elshehabi19-May-06 11:34
Nader Elshehabi19-May-06 11:34 
GeneralRe: Printing any file using Shell Pin
emran83419-May-06 21:52
emran83419-May-06 21:52 
GeneralRe: a question about SQL Pin
emran83420-May-06 20:03
emran83420-May-06 20:03 
GeneralRe: a question about SQL [modified] Pin
Nader Elshehabi21-May-06 11:27
Nader Elshehabi21-May-06 11:27 
Hello

Well, It's a kind of a strange problem. I've just finished programming an SQL client/server app, myself few days ago. In my program also there are many clients each Has his own database but your problem never occured to me??

Well, we will go through this step by step, to find out your bug.

First:
Your connection string should look like this:
"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DataFile.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

What you should do:
1) If you use the wizard to add the database right click on the project name in the solution explorer and check the "settings" tab, which is to the lower left of your screen. Check the connection string and see if it looks something like the above.
2) Revise your connection string and compare it to the one above
3) Check if your database file is copied in your directory and check it's modified date after you make modification, also check if the "Copy to output directory" is set to true.
You MUST add the database file to your project and make sure that the "Copy to output directory" is set to true, so that also your deployment project adds the file automatically.

Finally, my guess is:

Actually your Apps are never able to "synchronize" data. The connection string allows each app to connect to one database file only, until you close the connection first and reopen it again using the same or another string. Yes it's called "disconnected" database access, but there is no common relation between your apps, & synchronization must be done intentionaly.

The only way that your applications are all connected to one database file, and by the way it's propably the main database file in your project folder (or wherever you've put it). So try to rename the Main empty database file to something else (ofcouse visual studio must be closed first). then try to run one of your apps. If it gives you an exception when it connects to its database, then that means that it tried to connect to tha main database file, and all your apps do the same. So they are all modifying one database file.
If this happens check your connection string.

If you need more help & the above didn't solve it, I'm waiting for your post, but please put your connection string in it.
Good luck.Smile | :) need more help. I'm waiting for your post, but please but your connection string in it.
Good luck.Smile | :)

GeneralRe: a question about SQL [modified] Pin
emran83425-May-06 13:13
emran83425-May-06 13:13 
AnswerRe: a question about SQL [modified] Pin
Nader Elshehabi28-May-06 5:05
Nader Elshehabi28-May-06 5:05 
GeneralRe: a question about SQL [modified] Pin
emran83428-May-06 18:09
emran83428-May-06 18:09 
AnswerRe: a question about SQL [modified] Pin
Nader Elshehabi29-May-06 13:22
Nader Elshehabi29-May-06 13:22 
QuestionHow to preserve line feed character in C# TextBox ? Pin
TinaQ16-May-06 12:53
TinaQ16-May-06 12:53 
AnswerRe: How to preserve line feed character in C# TextBox ? Pin
Office Lineman16-May-06 13:06
Office Lineman16-May-06 13:06 
AnswerRe: How to preserve line feed character in C# TextBox ? Pin
Christian Graus16-May-06 13:16
protectorChristian Graus16-May-06 13:16 
GeneralRe: How to preserve line feed character in C# TextBox ? Pin
TinaQ16-May-06 13:48
TinaQ16-May-06 13:48 
GeneralRe: How to preserve line feed character in C# TextBox ? Pin
Christian Graus16-May-06 14:00
protectorChristian Graus16-May-06 14:00 
GeneralRe: How to preserve line feed character in C# TextBox ? Pin
TinaQ16-May-06 14:08
TinaQ16-May-06 14:08 
QuestionHow to stop service from being stopped Pin
DUKEMAN16-May-06 11:22
DUKEMAN16-May-06 11:22 
AnswerRe: How to stop service from being stopped Pin
martin_hughes16-May-06 12:26
martin_hughes16-May-06 12:26 
AnswerRe: How to stop service from being stopped Pin
Albert Pascual16-May-06 12:55
sitebuilderAlbert Pascual16-May-06 12:55 
GeneralRe: How to stop service from being stopped Pin
DUKEMAN16-May-06 21:29
DUKEMAN16-May-06 21:29 
GeneralRe: How to stop service from being stopped Pin
thrakazog17-May-06 6:26
thrakazog17-May-06 6:26 
GeneralRe: How to stop service from being stopped Pin
Nader Elshehabi22-May-06 1:31
Nader Elshehabi22-May-06 1:31 
QuestionC# preprocessor variable for CLR version Pin
Rei Miyasaka16-May-06 11:09
Rei Miyasaka16-May-06 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.