Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
it's still me (from thread "problem using BindingSource to write to DB"

used : visual studio 2008 xpress, sql server 2005 xpress

recoding (slightly) has solved my problem of writing data to db.
so project however is wothless if there's no solution to problem 2:
once opening management studio, selecting the db and checking it's tables
i can't access the db without restarting the computer.
since i've never entered any data for connecting to server neither in C# nor in
Mangagement Studio (only thing i did is set it to "windows authentication") i'm
totally helpless in this case.

no more ideas ?
Posted
Comments
Mehdi Gholam 21-Aug-12 10:03am    
Please state your problem completely, do not reference some other post.
bbirajdar 21-Aug-12 10:22am    
So where is the question here?

For connecting to a database you always needs to have values like the database name, the source, username and password to access it. These can either be provided directly as user inputs or can be retrieved from some where like web.config file in case of web applications or any other file.

Try to be more specific in your question, then only we would be able to solve it.
 
Share this answer
 
Comments
fheyn 22-Aug-12 8:30am    
hi,
up to now the application writes data to the database.
all's fine, the connection works and the table is filled as it should be.
Now i switch to sql server, start management studio and check the table.
i close ms and change back to vs.
i click the database icon and get an error-message :

Cannot open user default database. Login failed.
Login failed for user 'YELLOWMACHINE\M'

Only thing that helps is restarting the computer.
It seems that the service of sql server is getting stopped. When you exit the management studio the service stops and hence you get the "Login Failed Error". For once try switching back to Visual Studio with out exiting the management studio, and if it works. You have got your problem....
 
Share this answer
 
Comments
fheyn 31-Aug-12 7:02am    
thanks for your suggestion
however :
a) when exiting management studio service (sql server express is the only one i found) is NOT stopped.
b) switching back to Visual Studio without exiting management studio does NOT work

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