c# - Error establishing connection to SQL Server -
For the first time, I have started making a local database in Visual Studio and I have a hard time trying to do this work.
I tested in a modified connection and it works and it also gets the string of connections:
string ConnectionString = @ "data Source = D: \ bratulescu mihai \ WindowsFormsApplication1 \ WindowsFormsApplication1 \ NodeBDatabase.sdf "; SqlConn = New SqlConnection (connection string); sqlConn.Open (); But when it tries to open () it can not connect. I do not know a lot about this whole server thing, I've just made DB and this is a dataset.
If you are using sql , then I think that If you are reverting the sdf file, you should add a reference to System.Data.SqlServerCe and try: System Using Data.SqlServerCe; .... sqlConn = new SqlCeConnection (connection string); sqlConn.Open ();
Comments
Post a Comment