Click here to Skip to main content
15,881,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: Service does not start Pin
Jordanwb15-Dec-09 7:17
Jordanwb15-Dec-09 7:17 
QuestionPerhaps a threading problem? Pin
George Quarton14-Dec-09 10:12
George Quarton14-Dec-09 10:12 
AnswerRe: Perhaps a threading problem? Pin
Luc Pattyn14-Dec-09 11:56
sitebuilderLuc Pattyn14-Dec-09 11:56 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:17
George Quarton14-Dec-09 12:17 
GeneralRe: Perhaps a threading problem? Pin
Luc Pattyn14-Dec-09 12:41
sitebuilderLuc Pattyn14-Dec-09 12:41 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:45
George Quarton14-Dec-09 12:45 
GeneralRe: Perhaps a threading problem? [modified] Pin
Luc Pattyn14-Dec-09 13:00
sitebuilderLuc Pattyn14-Dec-09 13:00 
QuestionTiming-related issue when connecting to a newly created database Pin
vtchris-peterson14-Dec-09 8:38
vtchris-peterson14-Dec-09 8:38 
Using SMO with SQL Express 2005, I'm experiencing some frustrating behavior.

I'm using SMO Server and Database classes to script my database using Database.ExecuteNonQuery. The database objects are getting scripted correctly, but I'm having problems re-connecting to the database (using SqlConnection.Open). I get a SqlException ("System.Data.SqlClient.SqlException: Cannot open database \"MyDatabase\" requested by the login. The login failed.\r\nLogin failed for user 'MyDomain\\MyUser'.\r\n at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)\r\n at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)\r\n at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)\r\n at System.Data.SqlClient.SqlConnection.Open()\r\n at MyCodePath\\DataAccessFactory.cs:line 57")

The problem "goes away" if I just wait before trying to create the second connection e.g. if I use a breakpoint and step through the code it works fine.

I am closing my previous connection (the one where I scripted the database) and everything is sequential on a single (the UI) thread.

I'd hate to have to code some delay or retry logic for something that seems pretty standard.
AnswerRe: Timing-related issue when connecting to a newly created database Pin
Migounette14-Dec-09 20:44
Migounette14-Dec-09 20:44 
GeneralRe: Timing-related issue when connecting to a newly created database Pin
vtchris-peterson15-Dec-09 3:56
vtchris-peterson15-Dec-09 3:56 
QuestionC# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 8:13
ikurtz14-Dec-09 8:13 
AnswerRe: C# RichTextBox strange behaviour Pin
OriginalGriff14-Dec-09 8:42
mveOriginalGriff14-Dec-09 8:42 
GeneralRe: C# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 8:50
ikurtz14-Dec-09 8:50 
GeneralRe: C# RichTextBox strange behaviour Pin
OriginalGriff14-Dec-09 9:09
mveOriginalGriff14-Dec-09 9:09 
GeneralRe: C# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 9:14
ikurtz14-Dec-09 9:14 
QuestionWONDER Pin
farokhian14-Dec-09 7:58
farokhian14-Dec-09 7:58 
AnswerRe: WONDER Pin
loyal ginger14-Dec-09 8:08
loyal ginger14-Dec-09 8:08 
AnswerGOLDEN WONDER Pin
Keith Barrow14-Dec-09 8:09
professionalKeith Barrow14-Dec-09 8:09 
GeneralRe: GOLDEN WONDER Pin
farokhian14-Dec-09 8:16
farokhian14-Dec-09 8:16 
AnswerRe: WONDER Pin
OriginalGriff14-Dec-09 8:39
mveOriginalGriff14-Dec-09 8:39 
GeneralRe: WONDER Pin
farokhian14-Dec-09 8:59
farokhian14-Dec-09 8:59 
GeneralRe: WONDER Pin
Luc Pattyn14-Dec-09 9:24
sitebuilderLuc Pattyn14-Dec-09 9:24 
GeneralRe: WONDER [modified] Pin
0x3c014-Dec-09 9:26
0x3c014-Dec-09 9:26 
GeneralRe: WONDER Pin
Luc Pattyn14-Dec-09 9:31
sitebuilderLuc Pattyn14-Dec-09 9:31 
QuestionDo I need to create a struct? Pin
bbranded14-Dec-09 5:05
bbranded14-Dec-09 5:05 

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.