Is RAPI the only way for sync data in my situation?

R

rockdale

Hi,

We have an PDA Application which does data collection and store in SQL
CE. Also, We have another application which runs on laptop against sql
database. We need to sync data between these two database, basically,
download lookup information from laptop SQL and upload data collected
by PDA to laptop SQL.

The laptop has a verizon wireless connection but it is blocked to
access internet.
PDA connected to laptop through cradle.
PDA cannot connect to laptop through WI-FI connection. (Maybe because
WI-FI is different from Verizon Wireless? I am not so sure why)

web service is out because they block the laptop for accessing internet
I was using read/write tolaptop SQL database directly but some PDA
model can not connect to the SQL database. (I was using HP iPAQ h4150
(windows CE 4.20) which works fine, but HP iPAQ hx2790b(Windows CE 5.0)
cannot connect to the database, ) End user may use Palm Treo 700w or
something else also.

I kind like the idea of read /write SQL Database on laptop from PDA. It
is clean and it is less work. But given that it is not stable, I think
I need another approace to achieve this data sync function.

Does somebody knows why certain model cannot connect to SQL database on
a laptop, I know that as long as the laptop has an valid IP address,
the PDA should be able to connect to its database. I had this post
<a href=
http://groups.google.com/group/micr...32?lnk=gst&q=rockdale&rnum=1#f308aea8cc2a8232>Exchange
Data between SQLCE and SQL database on laptop?

</a>
a long time ago and Ginny clearified my question. If the unstability is
unavoidable, it RAPI my only choice?

Thanks in advance
 
G

Ginny Caughey [MVP]

As long as you have the valid IP address, you should be able to use
SqlClient from the device to connect to SQL Server on the desktop. Where
this becomes unreliable is in situations where the IP address might not
always be there - which is often the case in industrial settings. If your
device will be in the cradle I don't see why that shouldn't be a usable
solution, but of course it's always a good idea to do a little test to make
sure it will work as you want.
 
R

rockdale

Hi, Ginny

Thanks for your reply.
Further debug on the not working PDA shows that MissingMethodException
is catched when try to open SQLConnection to my laptop.

SqlConnection dbConn = new SqlConnection();

try{
dbConn.ConnectionString = ConnectionString;
dbConn.Open();
}
catch(ArgumentException ae)
{
MessageBox.Show (ae.Message ,"ArgumentException" );
}
catch(InvalidOperationException ioe)
{
MessageBox.Show (ioe.Message ,"InvalidOperationException");
}
catch(SqlException se)
{
MessageBox.Show (se.Message ,"SQLException");
}
catch(MissingMethodException mme)
{
MessageBox.Show (mme.Message ,"MissingMethodException");
}

Did I miss a DLL or something?
 
G

Ginny Caughey [MVP]

Yes it sounds like you didn't include a reference to System.Data.SqlClient.
 
R

rockdale

I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale
 
G

Ginny Caughey [MVP]

I'm not sure why your non-working PDA doesn't have the right DLLs, but I
think it would give you the same (or different) problems no matter which
approach you use. I'd suggest trying to manually get it to the right version
of the Compact Framework - apparently a service pack difference. Generally
you want to use the newest version of the Compact Framework that the
hardware will support.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale


Yes it sounds like you didn't include a reference to
System.Data.SqlClient.
 
R

rockdale

Oh, how stupid am I.

It turns out that I have to copy sql.wce4.armv4.CAB and
sqlce.wce4.armv4.CAB to the pda and click to install them. Now I have
no missingmethodexception problems. Should not it auto-installed if I
include System.data.sqlserverCe and system.data.sqlclient in my project
and deploy it? I did not remember I copied those files for my working
PDA, maybe it was long time ago and I can not remember.

Now it is works and as you are saying that as long as there is an valid
ip address I should always connection to the SQL database on the
laptop, right, then I will keep working on read/write SQL directly
through Cradle.

Thanks for your help
-Rockdale





I'm not sure why your non-working PDA doesn't have the right DLLs, but I
think it would give you the same (or different) problems no matter which
approach you use. I'd suggest trying to manually get it to the right version
of the Compact Framework - apparently a service pack difference. Generally
you want to use the newest version of the Compact Framework that the
hardware will support.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale


Yes it sounds like you didn't include a reference to
System.Data.SqlClient.

--
Ginny Caughey
Device Application Development MVP


Hi, Ginny

Thanks for your reply.
Further debug on the not working PDA shows that MissingMethodException
is catched when try to open SQLConnection to my laptop.

SqlConnection dbConn = new SqlConnection();

try{
dbConn.ConnectionString = ConnectionString;
dbConn.Open();
}
catch(ArgumentException ae)
{
MessageBox.Show (ae.Message ,"ArgumentException" );
}
catch(InvalidOperationException ioe)
{
MessageBox.Show (ioe.Message ,"InvalidOperationException");
}
catch(SqlException se)
{
MessageBox.Show (se.Message ,"SQLException");
}
catch(MissingMethodException mme)
{
MessageBox.Show (mme.Message ,"MissingMethodException");
}

Did I miss a DLL or something?


Ginny Caughey [MVP] wrote:
As long as you have the valid IP address, you should be able to use
SqlClient from the device to connect to SQL Server on the desktop.
Where
this becomes unreliable is in situations where the IP address might
not
always be there - which is often the case in industrial settings. If
your
device will be in the cradle I don't see why that shouldn't be a
usable
solution, but of course it's always a good idea to do a little test to
make
sure it will work as you want.

--
Ginny Caughey
Device Application Development MVP


Hi,

We have an PDA Application which does data collection and store in
SQL
CE. Also, We have another application which runs on laptop against
sql
database. We need to sync data between these two database,
basically,
download lookup information from laptop SQL and upload data
collected
by PDA to laptop SQL.

The laptop has a verizon wireless connection but it is blocked to
access internet.
PDA connected to laptop through cradle.
PDA cannot connect to laptop through WI-FI connection. (Maybe
because
WI-FI is different from Verizon Wireless? I am not so sure why)

web service is out because they block the laptop for accessing
internet
I was using read/write tolaptop SQL database directly but some PDA
model can not connect to the SQL database. (I was using HP iPAQ
h4150
(windows CE 4.20) which works fine, but HP iPAQ hx2790b(Windows CE
5.0)
cannot connect to the database, ) End user may use Palm Treo 700w
or
something else also.

I kind like the idea of read /write SQL Database on laptop from PDA.
It
is clean and it is less work. But given that it is not stable, I
think
I need another approace to achieve this data sync function.

Does somebody knows why certain model cannot connect to SQL database
on
a laptop, I know that as long as the laptop has an valid IP address,
the PDA should be able to connect to its database. I had this post
<a href=
http://groups.google.com/group/micr...32?lnk=gst&q=rockdale&rnum=1#f308aea8cc2a8232>Exchange
Data between SQLCE and SQL database on laptop?

</a>
a long time ago and Ginny clearified my question. If the unstability
is
unavoidable, it RAPI my only choice?

Thanks in advance
 
G

Ginny Caughey [MVP]

Visual Studio should deploy the dependent DLLs you need, so I'm not sure why
that didn't happen.

It should work the way you want now, but test, test, test to be sure.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
Oh, how stupid am I.

It turns out that I have to copy sql.wce4.armv4.CAB and
sqlce.wce4.armv4.CAB to the pda and click to install them. Now I have
no missingmethodexception problems. Should not it auto-installed if I
include System.data.sqlserverCe and system.data.sqlclient in my project
and deploy it? I did not remember I copied those files for my working
PDA, maybe it was long time ago and I can not remember.

Now it is works and as you are saying that as long as there is an valid
ip address I should always connection to the SQL database on the
laptop, right, then I will keep working on read/write SQL directly
through Cradle.

Thanks for your help
-Rockdale





I'm not sure why your non-working PDA doesn't have the right DLLs, but I
think it would give you the same (or different) problems no matter which
approach you use. I'd suggest trying to manually get it to the right
version
of the Compact Framework - apparently a service pack difference.
Generally
you want to use the newest version of the Compact Framework that the
hardware will support.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale



Ginny Caughey [MVP] wrote:
Yes it sounds like you didn't include a reference to
System.Data.SqlClient.

--
Ginny Caughey
Device Application Development MVP


Hi, Ginny

Thanks for your reply.
Further debug on the not working PDA shows that
MissingMethodException
is catched when try to open SQLConnection to my laptop.

SqlConnection dbConn = new SqlConnection();

try{
dbConn.ConnectionString = ConnectionString;
dbConn.Open();
}
catch(ArgumentException ae)
{
MessageBox.Show (ae.Message ,"ArgumentException" );
}
catch(InvalidOperationException ioe)
{
MessageBox.Show (ioe.Message ,"InvalidOperationException");
}
catch(SqlException se)
{
MessageBox.Show (se.Message ,"SQLException");
}
catch(MissingMethodException mme)
{
MessageBox.Show (mme.Message ,"MissingMethodException");
}

Did I miss a DLL or something?


Ginny Caughey [MVP] wrote:
As long as you have the valid IP address, you should be able to use
SqlClient from the device to connect to SQL Server on the desktop.
Where
this becomes unreliable is in situations where the IP address might
not
always be there - which is often the case in industrial settings.
If
your
device will be in the cradle I don't see why that shouldn't be a
usable
solution, but of course it's always a good idea to do a little test
to
make
sure it will work as you want.

--
Ginny Caughey
Device Application Development MVP


Hi,

We have an PDA Application which does data collection and store
in
SQL
CE. Also, We have another application which runs on laptop
against
sql
database. We need to sync data between these two database,
basically,
download lookup information from laptop SQL and upload data
collected
by PDA to laptop SQL.

The laptop has a verizon wireless connection but it is blocked to
access internet.
PDA connected to laptop through cradle.
PDA cannot connect to laptop through WI-FI connection. (Maybe
because
WI-FI is different from Verizon Wireless? I am not so sure why)

web service is out because they block the laptop for accessing
internet
I was using read/write tolaptop SQL database directly but some
PDA
model can not connect to the SQL database. (I was using HP iPAQ
h4150
(windows CE 4.20) which works fine, but HP iPAQ hx2790b(Windows
CE
5.0)
cannot connect to the database, ) End user may use Palm Treo
700w
or
something else also.

I kind like the idea of read /write SQL Database on laptop from
PDA.
It
is clean and it is less work. But given that it is not stable, I
think
I need another approace to achieve this data sync function.

Does somebody knows why certain model cannot connect to SQL
database
on
a laptop, I know that as long as the laptop has an valid IP
address,
the PDA should be able to connect to its database. I had this
post
<a href=
http://groups.google.com/group/micr...32?lnk=gst&q=rockdale&rnum=1#f308aea8cc2a8232>Exchange
Data between SQLCE and SQL database on laptop?

</a>
a long time ago and Ginny clearified my question. If the
unstability
is
unavoidable, it RAPI my only choice?

Thanks in advance
 
D

dotnetfellow

Hi Ginny,

I am suffering from similar problem. Only, I can't find a file on my
computer called sql.wce4.armv4.CAB.

I have Intermec 751g Barcode Scanner with Windows CE 4.2, and .NET 2.0
Compact Framework SP1 and patch

Computer is Visual Studio 2005, SQL Server 2005. The error is
SqlException and error occurred on ConnectionOpen operation.

Any ideas? Thanks.




Sincerely, Dotnet Fellow

Visual Studio should deploy the dependent DLLs you need, so I'm not sure why
that didn't happen.

It should work the way you want now, but test, test, test to be sure.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
Oh, how stupid am I.

It turns out that I have to copy sql.wce4.armv4.CAB and
sqlce.wce4.armv4.CAB to the pda and click to install them. Now I have
no missingmethodexception problems. Should not it auto-installed if I
include System.data.sqlserverCe and system.data.sqlclient in my project
and deploy it? I did not remember I copied those files for my working
PDA, maybe it was long time ago and I can not remember.

Now it is works and as you are saying that as long as there is an valid
ip address I should always connection to the SQL database on the
laptop, right, then I will keep working on read/write SQL directly
through Cradle.

Thanks for your help
-Rockdale





I'm not sure why your non-working PDA doesn't have the right DLLs, but I
think it would give you the same (or different) problems no matter which
approach you use. I'd suggest trying to manually get it to the right
version
of the Compact Framework - apparently a service pack difference.
Generally
you want to use the newest version of the Compact Framework that the
hardware will support.

--
Ginny Caughey
Device Application Development MVP


I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale



Ginny Caughey [MVP] wrote:
Yes it sounds like you didn't include a reference to
System.Data.SqlClient.

--
Ginny Caughey
Device Application Development MVP


Hi, Ginny

Thanks for your reply.
Further debug on the not working PDA shows that
MissingMethodException
is catched when try to open SQLConnection to my laptop.

SqlConnection dbConn = new SqlConnection();

try{
dbConn.ConnectionString = ConnectionString;
dbConn.Open();
}
catch(ArgumentException ae)
{
MessageBox.Show (ae.Message ,"ArgumentException" );
}
catch(InvalidOperationException ioe)
{
MessageBox.Show (ioe.Message ,"InvalidOperationException");
}
catch(SqlException se)
{
MessageBox.Show (se.Message ,"SQLException");
}
catch(MissingMethodException mme)
{
MessageBox.Show (mme.Message ,"MissingMethodException");
}

Did I miss a DLL or something?


Ginny Caughey [MVP] wrote:
As long as you have the valid IP address, you should be able to use
SqlClient from the device to connect to SQL Server on the desktop.
Where
this becomes unreliable is in situations where the IP address might
not
always be there - which is often the case in industrial settings.
If
your
device will be in the cradle I don't see why that shouldn't be a
usable
solution, but of course it's always a good idea to do a little test
to
make
sure it will work as you want.

--
Ginny Caughey
Device Application Development MVP


Hi,

We have an PDA Application which does data collection and store
in
SQL
CE. Also, We have another application which runs on laptop
against
sql
database. We need to sync data between these two database,
basically,
download lookup information from laptop SQL and upload data
collected
by PDA to laptop SQL.

The laptop has a verizon wireless connection but it is blocked to
access internet.
PDA connected to laptop through cradle.
PDA cannot connect to laptop through WI-FI connection. (Maybe
because
WI-FI is different from Verizon Wireless? I am not so sure why)

web service is out because they block the laptop for accessing
internet
I was using read/write tolaptop SQL database directly but some
PDA
model can not connect to the SQL database. (I was using HP iPAQ
h4150
(windows CE 4.20) which works fine, but HP iPAQ hx2790b(Windows
CE
5.0)
cannot connect to the database, ) End user may use Palm Treo
700w
or
something else also.

I kind like the idea of read /write SQL Database on laptop from
PDA.
It
is clean and it is less work. But given that it is not stable, I
think
I need another approace to achieve this data sync function.

Does somebody knows why certain model cannot connect to SQL
database
on
a laptop, I know that as long as the laptop has an valid IP
address,
the PDA should be able to connect to its database. I had this
post
<a href=
http://groups.google.com/group/micr...32?lnk=gst&q=rockdale&rnum=1#f308aea8cc2a8232>Exchange
Data between SQLCE and SQL database on laptop?

</a>
a long time ago and Ginny clearified my question. If the
unstability
is
unavoidable, it RAPI my only choice?

Thanks in advance
 
R

rockdale

I am using VS 2003 and the file is under
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce400\armv4

What is the SQLException's message? Can you post here?

Sometime I got the SQLException with "General network error. Check your
network documentation". But my other 2 PDA work fine. I soft reset the
PDA with problem, it works again.

goodluck
-rockdale
Hi Ginny,

I am suffering from similar problem. Only, I can't find a file on my
computer called sql.wce4.armv4.CAB.

I have Intermec 751g Barcode Scanner with Windows CE 4.2, and .NET 2.0
Compact Framework SP1 and patch

Computer is Visual Studio 2005, SQL Server 2005. The error is
SqlException and error occurred on ConnectionOpen operation.

Any ideas? Thanks.




Sincerely, Dotnet Fellow

Visual Studio should deploy the dependent DLLs you need, so I'm not sure why
that didn't happen.

It should work the way you want now, but test, test, test to be sure.

--
Ginny Caughey
Device Application Development MVP


rockdale said:
Oh, how stupid am I.

It turns out that I have to copy sql.wce4.armv4.CAB and
sqlce.wce4.armv4.CAB to the pda and click to install them. Now I have
no missingmethodexception problems. Should not it auto-installed if I
include System.data.sqlserverCe and system.data.sqlclient in my project
and deploy it? I did not remember I copied those files for my working
PDA, maybe it was long time ago and I can not remember.

Now it is works and as you are saying that as long as there is an valid
ip address I should always connection to the SQL database on the
laptop, right, then I will keep working on read/write SQL directly
through Cradle.

Thanks for your help
-Rockdale






Ginny Caughey [MVP] wrote:
I'm not sure why your non-working PDA doesn't have the right DLLs, but I
think it would give you the same (or different) problems no matter which
approach you use. I'd suggest trying to manually get it to the right
version
of the Compact Framework - apparently a service pack difference.
Generally
you want to use the newest version of the Compact Framework that the
hardware will support.

--
Ginny Caughey
Device Application Development MVP


I included in my code System.Data.SqlClient. When I deploy the
application I also see this dll get copied (But I cannot find out where
it is copied to).
Also this whole application is running perfect on my another PDA.

I just found out that I got missingmethodexception error on my SQLCE
Connection also. looks like this PDA misses all the dll. The .NET
compact Framework is [1.0.4292.00] on this mot-working PDA. The .NET
compact Framework on the working PDA is lower [1.0.2268.00]

Did I miss something before I deployee the application? Looks like it
does not find the correct dll or something.

Thanks a lot

I need to make the decision between connecting to SQL or using RAPI
from laptop to invoke pda to export data and load into SQL.
-rockdale



Ginny Caughey [MVP] wrote:
Yes it sounds like you didn't include a reference to
System.Data.SqlClient.

--
Ginny Caughey
Device Application Development MVP


Hi, Ginny

Thanks for your reply.
Further debug on the not working PDA shows that
MissingMethodException
is catched when try to open SQLConnection to my laptop.

SqlConnection dbConn = new SqlConnection();

try{
dbConn.ConnectionString = ConnectionString;
dbConn.Open();
}
catch(ArgumentException ae)
{
MessageBox.Show (ae.Message ,"ArgumentException" );
}
catch(InvalidOperationException ioe)
{
MessageBox.Show (ioe.Message ,"InvalidOperationException");
}
catch(SqlException se)
{
MessageBox.Show (se.Message ,"SQLException");
}
catch(MissingMethodException mme)
{
MessageBox.Show (mme.Message ,"MissingMethodException");
}

Did I miss a DLL or something?


Ginny Caughey [MVP] wrote:
As long as you have the valid IP address, you should be able to use
SqlClient from the device to connect to SQL Server on the desktop.
Where
this becomes unreliable is in situations where the IP address might
not
always be there - which is often the case in industrial settings.
If
your
device will be in the cradle I don't see why that shouldn't be a
usable
solution, but of course it's always a good idea to do a little test
to
make
sure it will work as you want.

--
Ginny Caughey
Device Application Development MVP


Hi,

We have an PDA Application which does data collection and store
in
SQL
CE. Also, We have another application which runs on laptop
against
sql
database. We need to sync data between these two database,
basically,
download lookup information from laptop SQL and upload data
collected
by PDA to laptop SQL.

The laptop has a verizon wireless connection but it is blocked to
access internet.
PDA connected to laptop through cradle.
PDA cannot connect to laptop through WI-FI connection. (Maybe
because
WI-FI is different from Verizon Wireless? I am not so sure why)

web service is out because they block the laptop for accessing
internet
I was using read/write tolaptop SQL database directly but some
PDA
model can not connect to the SQL database. (I was using HP iPAQ
h4150
(windows CE 4.20) which works fine, but HP iPAQ hx2790b(Windows
CE
5.0)
cannot connect to the database, ) End user may use Palm Treo
700w
or
something else also.

I kind like the idea of read /write SQL Database on laptop from
PDA.
It
is clean and it is less work. But given that it is not stable, I
think
I need another approace to achieve this data sync function.

Does somebody knows why certain model cannot connect to SQL
database
on
a laptop, I know that as long as the laptop has an valid IP
address,
the PDA should be able to connect to its database. I had this
post
<a href=
http://groups.google.com/group/micr...32?lnk=gst&q=rockdale&rnum=1#f308aea8cc2a8232>Exchange
Data between SQLCE and SQL database on laptop?

</a>
a long time ago and Ginny clearified my question. If the
unstability
is
unavoidable, it RAPI my only choice?

Thanks in advance
 
D

dotnetfellow

Hi Rockdale,

I have tried using the SqlClient class to connect to the database, but
I haven't had much success. Here is my
setup:

Desktop/Workstation has Windows XP, ActiveSync, .NET Framework 2.0, and

SQL Server 2005. The production Workstation
will have 2000; so I do want to ensure SQL Server 2000 compatibility
with my solution.


Handheld device is an Intermec 751g with docking station, hooked to PC
host using USB connector cable and ActiveSync, Windows CE 4.2, .NET
Compact Framework 2.0 with SP1 and
latest patch.


Development tools consist of Visual Studio 2005 and C# .NET language.


Note that when I attempt to ping my desktop from the handheld command
prompt I get "transmit failed, error code
11010".


Also, I am able to access the Internet from my handheld device.


My error is encountered when I execute this fill code:


int returnValue = this.Adapter.Fill(dataTable);


Please note that all of my code is generated by the VS 2005 IDE at this

juncture, as I am simply trying to get the
plumbing to work.


Here is the error that I encounter:


System.Data.SqlClient.SqlException was unhandled
Message="SqlException"
Class=20
LineNumber=0
Number=6
Procedure="ConnectionOpen (Connect())."
Server="09Q-GHAZEL2\\SQL2K5"
Source=".Net SqlClient Data Provider"
State=0
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError()
at System.Data.SqlClient.SqlInternalConnection.OnError()
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Connect()
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen()
at System.Data.Common.DbDataAdapter.FillInternal()
at System.Data.Common.DbDataAdapter.Fill()
at System.Data.Common.DbDataAdapter.Fill()
at
DeviceApplication1.AdventureWorksDataSetTableAdapters.ContactTableAdapter.F­ill()



at DeviceApplication1.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at DeviceApplication1.Program.Main()


Thanks again for your insight. Sincerely, -Dotnetfellow
(e-mail address removed)
 
R

rockdale

Looks like that your connection did not get build succeed. You can put
a try and catch around your connection open code and see what the
exception is.

you can put this database connecting code in a sample .NET (not compact
framework) application to narrow down the problem a little bit. (maybe
it is because your connection string is incorrect...etc) If it works
fine in a .net desktop application.

then, move this connecting code to your .Net Framework code, if it does
not work. Please check your USB connection and make sure laptop has a
valid ip address.
(You said you can access internet from your PDA, does access internet
through PDA's wireless or through USB to the host computer then to
internet?)

-rockdale
 
D

dotnetfellow

Hi Rockdale,

Thank you for your reply. I have now configured my handheld device to
ping on the network over an ethernet drop. However, I am still getting
the same error. I am using the code generated by VS 2005 for
connecting. I have also incorporated variations on my connection
string based on info I have collected at other web forums such as
forums.microsoft.com. However, I am still getting the same error.

The error that I get is the same error that I copied in the thread
above. It is failing on the attempt to open the connection. Thanks.



Sincerely, -Dotnet fellow
 
R

rockdale

Can you show your connection string please (or your source code - how
do you set those parameters for your db connection object) ?

Also, were you able to connect to database in a (sample) .net desktop
application with you connection string?

thanks
-rockdale
 
D

dotnetfellow

Got it working.

First I had to figure out how to connect to the server specifically. I
found this article here helped tremendously.


How to: Configure Express to accept remote connections

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx


Then I had to get the connection string right. Here is the connection
string that worked:

Data Source=197.162.5.100,1433;Initial Catalog=AdventureWorks;Persist
Security Info=True;User ID=ausername;Password=apassword;


Some things that I found a little confusing.

I can do a port scan using vxUtil from the handheld, against the target
port, but I can not do a ping using vxUtil from the handheld, against
the target ip address.

I found later that ActiveSync 4.0 and above do not provide TCP/IP
Network connectivity. If one needs USB ActiveSync connectivity to the
LAN, then you must use AS 3.8.


Also, when doing a port scan with vxUtil, a successful return status
will look like this:

Port: 1433 is open
Port Scan Complete


If the port scan was unsuccessful then it will merely return:

Port Scan Complete


In the end, I am able to get the SqlClient namespace in .NET 2.0 CF to
connect me to SQL Server 2005 on the host computer over a USB
ActiveSync connection.



Finally, if you want to connect and debug from VS over a Ethernet drop,
without the use of USB ActiveSync, you will find this article step you
through that process.


Debugging on CE5.0 device without Activesync

http://blogs.msdn.com/vsdteam/archive/2005/04/28/413304.aspx

Thanks Rockdale.
 

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

Similar Threads


Top