Here is my code:

        private static string strConnect = "Server=10.10.1.152;" +
                                              "Database=TESTDB;" +
                                              "User ID=userid;" +
                                              "Password=pwd;";
        private static SqlConnection dbCon;
        private static IDbCommand dbCmd;
        private static IDataReader dbReader;

        ...

        dbCon = new SqlConnection(strConnect);
        dbCon.Open();

Here is the error I get:

Unhandled Exception: System.Data.SqlClient.SqlException: Server does not
exist or connection refused. --->
Mono.Data.Tds.Protocol.TdsInternalException: Server does not exist or
connection refused. ---> System.Net.Sockets.SocketException: Connection
refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end)
[0x00000]
  at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32
port, Int32 packetSize, Int32 timeout, TdsVersion tdsVersion) [0x00000] ---
End of inner exception stack trace ---


I have tried specifying the port (1433) and using Net=dbmssocn; and I still
get the same error.




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Austin Winstanley
Sent: Saturday, December 15, 2007 3:15 PM
To: Konstantin Bokarius
Cc: Nagappan A; [email protected]
Subject: Re: [Mono-list] SQL Server 2005 Support

 

What does your connection string look like? I had to use the port number to
connect. My connection string looks like this:

Net=dbmssocn;Server=xxx.xxx.xx.xxx, 1226;Database=[mydatabase];User
ID=[myusername];Password=[mypassword]; 

where the x's are my ip address and 1226 is the port




On Dec 15, 2007 5:04 PM, Konstantin Bokarius <[EMAIL PROTECTED]> wrote: 

I can't seem to get Mono connected to MS-SQL2005.  What Mono SQL Client
should I be using?

 

From: Nagappan A [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 14, 2007 9:09 AM
To: Veerapuram Varadhan
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: [Mono-list] SQL Server 2005 Support

 

Hi,

MS-SQL 2005 works fine under Mono. But the additional features like
SqlNotification won't work.

Thanks
Nagappan

On Dec 14, 2007 3:29 AM, Veerapuram Varadhan < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Hi Bokarius,


On Fri, 2007-12-14 at 02:52 -0800, Konstantin Bokarius wrote: 
> Does Mono have SQL Server 2005 support yet?  Which SQL Client
> available today would be the best bet?
>

SQLServer 2005 is yet to be supported in Mono and all prior versions are
very much supported. 

V. Varadhan


--
Veerapuram Varadhan <[EMAIL PROTECTED]>

_______________________________________________
Mono-list maillist  -   [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list




-- 
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com 


_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

 

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to