V
Vincent
Hi!
I am experimenting strange trouble when connecting to SQL server from
my Pocket PC using the USB Cradle and work fine via Wireless. (see test
app)
When I am connected USB and use my test app and hit the Button1
I start receive the error "server doesn't exist or access denied" after
about 70 try.
I restart the app doesn't do anything but if I uncradle and cradle back
it work again for another 70 try...
Accessing trought wireless reach over 1500 try without any errors.
- Firewall are disabled
- I have try ping utility (vxUtil) but i am not able to make it work
when using the usb connection.
Thanls for your help
Here is my test app (c#):
int iTry;
private bool TryConnect()
{
txtOut.Text = string.Format("Connecting... {0}", ++iTry);
string sError = "";
try
{
SqlConnection con = new SqlConnection( "user
id=sa;password=mypwd;initial catalog= northwind;data
source=10.0.0.30;Connect Timeout=15;" );
con.Open();
con.Close();
txtOut.Text = string.Format("Connected: {0}", iTry);
return true;
}
catch(SqlException ex)
{
sError = ex.Message;
}
catch(Exception ex)
{
sError = ex.Message;
}
txtOut.Text = string.Format("Error at: {0}, {1}", iTry, sError);
return false;
}
private void button1_Click(object sender, System.EventArgs e)
{
iTry = 0;
while( TryConnect() )
{
Application.DoEvents();
System.Threading.Thread.Sleep(100);
}
}
I am experimenting strange trouble when connecting to SQL server from
my Pocket PC using the USB Cradle and work fine via Wireless. (see test
app)
When I am connected USB and use my test app and hit the Button1
I start receive the error "server doesn't exist or access denied" after
about 70 try.
I restart the app doesn't do anything but if I uncradle and cradle back
it work again for another 70 try...
Accessing trought wireless reach over 1500 try without any errors.
- Firewall are disabled
- I have try ping utility (vxUtil) but i am not able to make it work
when using the usb connection.
Thanls for your help
Here is my test app (c#):
int iTry;
private bool TryConnect()
{
txtOut.Text = string.Format("Connecting... {0}", ++iTry);
string sError = "";
try
{
SqlConnection con = new SqlConnection( "user
id=sa;password=mypwd;initial catalog= northwind;data
source=10.0.0.30;Connect Timeout=15;" );
con.Open();
con.Close();
txtOut.Text = string.Format("Connected: {0}", iTry);
return true;
}
catch(SqlException ex)
{
sError = ex.Message;
}
catch(Exception ex)
{
sError = ex.Message;
}
txtOut.Text = string.Format("Error at: {0}, {1}", iTry, sError);
return false;
}
private void button1_Click(object sender, System.EventArgs e)
{
iTry = 0;
while( TryConnect() )
{
Application.DoEvents();
System.Threading.Thread.Sleep(100);
}
}