PC Review


Reply
Thread Tools Rate Thread

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

 
 
Vincent
Guest
Posts: n/a
 
      15th Aug 2006
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);
}
}

 
Reply With Quote
 
 
 
 
Vincent
Guest
Posts: n/a
 
      15th Aug 2006
We use Compact Framework 1.1 SP3
And ActiveSync 3.8
Pocket PC: Dell AXIM or a Intermec CN2 PPC

 
Reply With Quote
 
Ginny Caughey [MVP]
Guest
Posts: n/a
 
      15th Aug 2006
Vincent,

What happens if you remove or change the value of the Connect Timeout in the
connection string?

--
Ginny Caughey
Device Application Development MVP


"Vincent" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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);
> }
> }
>



 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      15th Aug 2006
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.

"Vincent" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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);
> }
> }
>



 
Reply With Quote
 
Vincent
Guest
Posts: n/a
 
      5th Sep 2006
Upgrading Microsoft Active Sync from 3.8 to 4.2 solved the issues!
Thanks for you helps

Paul G. Tobey [eMVP] wrote:
> 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.
>
> "Vincent" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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);
> > }
> > }
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"server does not exist or access denied" pocket pc =?Utf-8?B?Qm9qYW4gS3VoYXI=?= Microsoft Dot NET Compact Framework 4 18th Feb 2006 05:51 AM
"Server does not exist or access is denied" =?Utf-8?B?Q0FOJ1QgU0VFIFRIRSBTRVJWRVIgRlJPTSBWUyBT Microsoft Dot NET 3 7th Apr 2005 04:49 AM
"SQL Server does not exist or access denied" =?Utf-8?B?U2hha2Vy?= Microsoft ASP .NET 3 11th Mar 2005 02:08 AM
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Micke Palm Microsoft ASP .NET 0 23rd Apr 2004 08:43 AM
"SQL Server does not exist or access denied" on a App Center node Christophe Niel Microsoft ASP .NET 0 13th Jan 2004 10:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:07 AM.