Hi,

>I get a horrible exception when attempting to connect to an MS SQL Express
server from Mono (it works under the MS CLR).  

Here is the code I use to make the connection:

string ConnectionString = "Data Source=127.0.0.1\SQLEXPRESS;
Database=mydatabase;User ID=user;Password=password";

SqlConnection DatabaseConnection = new SqlConnection(ConnectionString);
DatabaseConnection.Open(); //Exception thrown here
<

2 things jump out at me.
1. Your connection string has 127.0.0.1 which when running on the mono machine 
would point to the mono machine so unless you are running mono on windows that 
could be part of the problem.
2. Your connection string is apparently using integrated windows security since 
it has no user name and password. This probably won't work if the mono machine 
is a linux machine.

Hope it helps,

Joe




_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to