Hi,
I like to develope an application which uses a MsSQL database. I
believe that C# works really well with MsSQL. To start with, I'd like
to host the sql server locally on my machine as I develop, but later
I'd like to be able to host it on a server and have multiple instances
of the application access the server.
I have installed SQL Server 2005 Express Edition on my machine but was
never prompted for a user name or anything like that. I attempt to
connect to the server using -
SqlConnection myConn = new SqlConnection("Server=localhost;Integrated
security=SSPI;database=master");
But I get an exception:
ServerVersion 'myConn.ServerVersion' threw an exception of type
'System.InvalidOperationException' string
{System.InvalidOperationException}
base {"Invalid operation. The connection is closed."}
System.SystemException {System.InvalidOperationException}
Can anyone explain to my what is wrong. Perhaps I have to configure
the installation of SQL Server but I'm not sure.
Thanks,
Barry.