Dear All
I am working a project which using pocket pc 2003 connect to sql 2005
express database.
When I try to deploy a testing program on C# 2005, i cannot create the
connection with a Sql Exception error.
Do anyone have such experience and provide me a solution.
my devlice is O2 XdaIIi and the .net CF is 2.0
my coding as below:
---------------------------------------------------
string connstr = @"data source=192.168.11.3\SQLEXPRESS;Initial
Catalog=FYP;User ID=sa;Password = 61818030";
try
{
conn = new SqlConnection(connstr);
conn.Open();
if (conn.State == ConnectionState.Open)
{
MessageBox.Show("A");
}
{
MessageBox.Show("B");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
conn.Close();
}
}
------------------------------------------------
Best Regards
Gary
carnivore - 20 Dec 2007 08:15 GMT
Gary pisze:
> I am working a project which using pocket pc 2003 connect to sql 2005
> express database.
> string connstr = @"data source=192.168.11.3\SQLEXPRESS;Initial
> Catalog=FYP;User ID=sa;Password = 61818030";
Instead of instance of database try use a port.
Instead of
192.168.11.3\sqlexpress
try
192.168.11.3,port
Simon Hart [MVP] - 22 Dec 2007 16:56 GMT
What is the exception message? ensure the SQL Server has tcp/ip connectivity
enabled.

Signature
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
> Dear All
>
[quoted text clipped - 40 lines]
> Best Regards
> Gary