Connect SQL server via USB give "Server does not exist or access denied" after few succeful connect.

  • Thread starter Thread starter Vincent
  • Start date Start date
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);
}
}
 
We use Compact Framework 1.1 SP3
And ActiveSync 3.8
Pocket PC: Dell AXIM or a Intermec CN2 PPC
 
Vincent,

What happens if you remove or change the value of the Connect Timeout in the
connection string?
 
What version of Pocket PC are you using? WM5 devices build real network
connections over USB. Older versions don't really.

One other thing that you might try is changing the IP address to which you
are attempting to connect when doing it over ActiveSync/USB. You could use
DNS.Resolve() to get the IP associated with "PPP_PEER" and see if that gives
the IP of the PC on its ActiveSync face.

Paul T.
 
Upgrading Microsoft Active Sync from 3.8 to 4.2 solved the issues!
Thanks for you helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top