PC Review


Reply
Thread Tools Rate Thread

CE Emulator and RDA

 
 
Bob Clegg
Guest
Posts: n/a
 
      25th Sep 2004
Hi,
Can anyone tell me what I am doing wrong?
I am trying to make my first simple CE project that uses RDA.
When I try to execute the rda.pull method I get
"An internal error occured. [ID,,,,,,]"
So...
1) Installed sqlce20sql2ksp3a
2) Used the connectivity support wizard to create a virtual directory
'rdaTest' with anonymous access.
3) Added the internet user IUSR_ComputerName to SQL Server logins and to the
Northwind database
4) created a C# CE windows app that checks / deletes then creates
'rdatest.sdf' in the application startup
5) added a button to the form that executes the example pull code from CE
help. (With appropriate alterations).
6) Do an 'F5' to deploy and debug.
The sdf creation goes OK. It only spits the dummy when the .pull is
attempted.

Have I missed something fundamental here?
Button code follows.
Thanks
Bob

// Connection string to the instance of SQL Server

string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=HellFire;Initial Catalog=Northwind" ;


// Initialize the RDA object.

SqlCeRemoteDataAccess rda = null;

try

{

//Try the Pull operation.

rda = new SqlCeRemoteDataAccess();


//rda.InternetLogin = "MyLogin";

//rda.InternetPassword = "<password>";

rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";

rda.LocalConnectionString = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
Source=\test.sdf";


rda.Pull(

"Employees",

"Select * from Employees",

rdaOleDbConnectString,

RdaTrackOption.TrackingOnWithIndexes,

"ErrorTable");

}

catch(SqlCeException ex)

{

//Use your own error handling routine.

//ShowErrors(e)

string s=ex.Message;

string s1=s; //*************at this point s= 'An internal error Occured.
[ID,,,,,,]'

}

finally

{

//Dispose of the RDA object.

rda.Dispose();

}


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      27th Sep 2004
Do you get an error, or does the pull succeed but produces nothing?
If latter, can you perhaps run SQL Profiler on the server to see which query
is actually issued?

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Bob Clegg" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> Can anyone tell me what I am doing wrong?
> I am trying to make my first simple CE project that uses RDA.
> When I try to execute the rda.pull method I get
> "An internal error occured. [ID,,,,,,]"
> So...
> 1) Installed sqlce20sql2ksp3a
> 2) Used the connectivity support wizard to create a virtual directory
> 'rdaTest' with anonymous access.
> 3) Added the internet user IUSR_ComputerName to SQL Server logins and to
> the
> Northwind database
> 4) created a C# CE windows app that checks / deletes then creates
> 'rdatest.sdf' in the application startup
> 5) added a button to the form that executes the example pull code from CE
> help. (With appropriate alterations).
> 6) Do an 'F5' to deploy and debug.
> The sdf creation goes OK. It only spits the dummy when the .pull is
> attempted.
>
> Have I missed something fundamental here?
> Button code follows.
> Thanks
> Bob
>
> // Connection string to the instance of SQL Server
>
> string rdaOleDbConnectString = "Provider=sqloledb; Data
> Source=HellFire;Initial Catalog=Northwind" ;
>
>
> // Initialize the RDA object.
>
> SqlCeRemoteDataAccess rda = null;
>
> try
>
> {
>
> //Try the Pull operation.
>
> rda = new SqlCeRemoteDataAccess();
>
>
> //rda.InternetLogin = "MyLogin";
>
> //rda.InternetPassword = "<password>";
>
> rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
>
> rda.LocalConnectionString =
> @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> Source=\test.sdf";
>
>
> rda.Pull(
>
> "Employees",
>
> "Select * from Employees",
>
> rdaOleDbConnectString,
>
> RdaTrackOption.TrackingOnWithIndexes,
>
> "ErrorTable");
>
> }
>
> catch(SqlCeException ex)
>
> {
>
> //Use your own error handling routine.
>
> //ShowErrors(e)
>
> string s=ex.Message;
>
> string s1=s; //*************at this point s= 'An internal error Occured.
> [ID,,,,,,]'
>
> }
>
> finally
>
> {
>
> //Dispose of the RDA object.
>
> rda.Dispose();
>
> }
>
>



 
Reply With Quote
 
Bob Clegg
Guest
Posts: n/a
 
      27th Sep 2004
Hi Alex,
Exception message is below.
'An internal error occured. [ID,,,,,]'

With a bit more sophistication in the catch I got :
Error Code 80004005
Message : 'An internal error occured. [ID,,,,,]
Minor Err.:28574
Source : Microsoft SQL Server 2000 WIndows CE Edition

I take it from your response that essentially my checklist below is OK?
I am running on Win2kServer
The Emulator is version 4.1

regards
Bob



"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do you get an error, or does the pull succeed but produces nothing?
> If latter, can you perhaps run SQL Profiler on the server to see which

query
> is actually issued?
>
> --
> Alex Feinman
> ---
> Visit http://www.opennetcf.org
> "Bob Clegg" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > Can anyone tell me what I am doing wrong?
> > I am trying to make my first simple CE project that uses RDA.
> > When I try to execute the rda.pull method I get
> > "An internal error occured. [ID,,,,,,]"
> > So...
> > 1) Installed sqlce20sql2ksp3a
> > 2) Used the connectivity support wizard to create a virtual directory
> > 'rdaTest' with anonymous access.
> > 3) Added the internet user IUSR_ComputerName to SQL Server logins and to
> > the
> > Northwind database
> > 4) created a C# CE windows app that checks / deletes then creates
> > 'rdatest.sdf' in the application startup
> > 5) added a button to the form that executes the example pull code from

CE
> > help. (With appropriate alterations).
> > 6) Do an 'F5' to deploy and debug.
> > The sdf creation goes OK. It only spits the dummy when the .pull is
> > attempted.
> >
> > Have I missed something fundamental here?
> > Button code follows.
> > Thanks
> > Bob
> >
> > // Connection string to the instance of SQL Server
> >
> > string rdaOleDbConnectString = "Provider=sqloledb; Data
> > Source=HellFire;Initial Catalog=Northwind" ;
> >
> >
> > // Initialize the RDA object.
> >
> > SqlCeRemoteDataAccess rda = null;
> >
> > try
> >
> > {
> >
> > //Try the Pull operation.
> >
> > rda = new SqlCeRemoteDataAccess();
> >
> >
> > //rda.InternetLogin = "MyLogin";
> >
> > //rda.InternetPassword = "<password>";
> >
> > rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
> >
> > rda.LocalConnectionString =
> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> > Source=\test.sdf";
> >
> >
> > rda.Pull(
> >
> > "Employees",
> >
> > "Select * from Employees",
> >
> > rdaOleDbConnectString,
> >
> > RdaTrackOption.TrackingOnWithIndexes,
> >
> > "ErrorTable");
> >
> > }
> >
> > catch(SqlCeException ex)
> >
> > {
> >
> > //Use your own error handling routine.
> >
> > //ShowErrors(e)
> >
> > string s=ex.Message;
> >
> > string s1=s; //*************at this point s= 'An internal error Occured.
> > [ID,,,,,,]'
> >
> > }
> >
> > finally
> >
> > {
> >
> > //Dispose of the RDA object.
> >
> > rda.Dispose();
> >
> > }
> >
> >

>
>



 
Reply With Quote
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      27th Sep 2004
Check what you have in the InnerException of the SqlCeException. There is an
Errors collection, which you need to expand. Under it you'll find more
information.

The remote connection string looks a bit incomplete. You need either "user
id" and "password" specified or "Integrated Security=SSPI"
Another thing - do you have IIS on the same machine as the SQL server? I've
heard that you cannot use SSPI if the SQL server is not on the same machine.
In my experience RDA is somewhat easier to set up if you use SQL
authentication

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Bob Clegg" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi Alex,
> Exception message is below.
> 'An internal error occured. [ID,,,,,]'
>
> With a bit more sophistication in the catch I got :
> Error Code 80004005
> Message : 'An internal error occured. [ID,,,,,]
> Minor Err.:28574
> Source : Microsoft SQL Server 2000 WIndows CE Edition
>
> I take it from your response that essentially my checklist below is OK?
> I am running on Win2kServer
> The Emulator is version 4.1
>
> regards
> Bob
>
>
>
> "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Do you get an error, or does the pull succeed but produces nothing?
>> If latter, can you perhaps run SQL Profiler on the server to see which

> query
>> is actually issued?
>>
>> --
>> Alex Feinman
>> ---
>> Visit http://www.opennetcf.org
>> "Bob Clegg" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi,
>> > Can anyone tell me what I am doing wrong?
>> > I am trying to make my first simple CE project that uses RDA.
>> > When I try to execute the rda.pull method I get
>> > "An internal error occured. [ID,,,,,,]"
>> > So...
>> > 1) Installed sqlce20sql2ksp3a
>> > 2) Used the connectivity support wizard to create a virtual directory
>> > 'rdaTest' with anonymous access.
>> > 3) Added the internet user IUSR_ComputerName to SQL Server logins and
>> > to
>> > the
>> > Northwind database
>> > 4) created a C# CE windows app that checks / deletes then creates
>> > 'rdatest.sdf' in the application startup
>> > 5) added a button to the form that executes the example pull code from

> CE
>> > help. (With appropriate alterations).
>> > 6) Do an 'F5' to deploy and debug.
>> > The sdf creation goes OK. It only spits the dummy when the .pull is
>> > attempted.
>> >
>> > Have I missed something fundamental here?
>> > Button code follows.
>> > Thanks
>> > Bob
>> >
>> > // Connection string to the instance of SQL Server
>> >
>> > string rdaOleDbConnectString = "Provider=sqloledb; Data
>> > Source=HellFire;Initial Catalog=Northwind" ;
>> >
>> >
>> > // Initialize the RDA object.
>> >
>> > SqlCeRemoteDataAccess rda = null;
>> >
>> > try
>> >
>> > {
>> >
>> > //Try the Pull operation.
>> >
>> > rda = new SqlCeRemoteDataAccess();
>> >
>> >
>> > //rda.InternetLogin = "MyLogin";
>> >
>> > //rda.InternetPassword = "<password>";
>> >
>> > rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
>> >
>> > rda.LocalConnectionString =
>> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
>> > Source=\test.sdf";
>> >
>> >
>> > rda.Pull(
>> >
>> > "Employees",
>> >
>> > "Select * from Employees",
>> >
>> > rdaOleDbConnectString,
>> >
>> > RdaTrackOption.TrackingOnWithIndexes,
>> >
>> > "ErrorTable");
>> >
>> > }
>> >
>> > catch(SqlCeException ex)
>> >
>> > {
>> >
>> > //Use your own error handling routine.
>> >
>> > //ShowErrors(e)
>> >
>> > string s=ex.Message;
>> >
>> > string s1=s; //*************at this point s= 'An internal error
>> > Occured.
>> > [ID,,,,,,]'
>> >
>> > }
>> >
>> > finally
>> >
>> > {
>> >
>> > //Dispose of the RDA object.
>> >
>> > rda.Dispose();
>> >
>> > }
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      27th Sep 2004
Hi Alex,
Thanks for your reply.
I agree with the direction you are taking. ie it is a connection problem.
I have created another virtual directory using basic authentication.

I am still erroring but there are variations in the error messages that
indicate I am having an effect with my various connection permutations.
I am running every thing on the one box. A win2k server platform.
The database server is running mixed mode.
Given:
a domain of 'mydomain' ,
a user bloggs with a password of 'password' who has dbo rights to NorthWind
Computer IP address of 192.168.0.37
Can you confirm please the following connection string / code.
Thanks again
Bob
string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=192.168.0.37;Initial Catalog=Northwind;" +

"User Id=mydomain\bloggs;Password=password";

// Initialize the RDA object.

SqlCeRemoteDataAccess rda = null;

try

{

//Try the Pull operation.

rda = new SqlCeRemoteDataAccess();


rda.InternetLogin = "bloggs";

rda.InternetPassword = "password";

rda.InternetUrl = "http://192.168.0.37/rdaTest1/sscesa20.dll";

rda.LocalConnectionString = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
Source=\test.sdf";


rda.Pull(

"Employees",

"Select * from Employees",

rdaOleDbConnectString,

RdaTrackOption.TrackingOnWithIndexes,

"ErrorTable");

}



"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Check what you have in the InnerException of the SqlCeException. There is

an
> Errors collection, which you need to expand. Under it you'll find more
> information.
>
> The remote connection string looks a bit incomplete. You need either "user
> id" and "password" specified or "Integrated Security=SSPI"
> Another thing - do you have IIS on the same machine as the SQL server?

I've
> heard that you cannot use SSPI if the SQL server is not on the same

machine.
> In my experience RDA is somewhat easier to set up if you use SQL
> authentication
>
> --
> Alex Feinman
> ---
> Visit http://www.opennetcf.org
> "Bob Clegg" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi Alex,
> > Exception message is below.
> > 'An internal error occured. [ID,,,,,]'
> >
> > With a bit more sophistication in the catch I got :
> > Error Code 80004005
> > Message : 'An internal error occured. [ID,,,,,]
> > Minor Err.:28574
> > Source : Microsoft SQL Server 2000 WIndows CE Edition
> >
> > I take it from your response that essentially my checklist below is OK?
> > I am running on Win2kServer
> > The Emulator is version 4.1
> >
> > regards
> > Bob
> >
> >
> >
> > "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Do you get an error, or does the pull succeed but produces nothing?
> >> If latter, can you perhaps run SQL Profiler on the server to see which

> > query
> >> is actually issued?
> >>
> >> --
> >> Alex Feinman
> >> ---
> >> Visit http://www.opennetcf.org
> >> "Bob Clegg" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Hi,
> >> > Can anyone tell me what I am doing wrong?
> >> > I am trying to make my first simple CE project that uses RDA.
> >> > When I try to execute the rda.pull method I get
> >> > "An internal error occured. [ID,,,,,,]"
> >> > So...
> >> > 1) Installed sqlce20sql2ksp3a
> >> > 2) Used the connectivity support wizard to create a virtual directory
> >> > 'rdaTest' with anonymous access.
> >> > 3) Added the internet user IUSR_ComputerName to SQL Server logins and
> >> > to
> >> > the
> >> > Northwind database
> >> > 4) created a C# CE windows app that checks / deletes then creates
> >> > 'rdatest.sdf' in the application startup
> >> > 5) added a button to the form that executes the example pull code

from
> > CE
> >> > help. (With appropriate alterations).
> >> > 6) Do an 'F5' to deploy and debug.
> >> > The sdf creation goes OK. It only spits the dummy when the .pull is
> >> > attempted.
> >> >
> >> > Have I missed something fundamental here?
> >> > Button code follows.
> >> > Thanks
> >> > Bob
> >> >
> >> > // Connection string to the instance of SQL Server
> >> >
> >> > string rdaOleDbConnectString = "Provider=sqloledb; Data
> >> > Source=HellFire;Initial Catalog=Northwind" ;
> >> >
> >> >
> >> > // Initialize the RDA object.
> >> >
> >> > SqlCeRemoteDataAccess rda = null;
> >> >
> >> > try
> >> >
> >> > {
> >> >
> >> > //Try the Pull operation.
> >> >
> >> > rda = new SqlCeRemoteDataAccess();
> >> >
> >> >
> >> > //rda.InternetLogin = "MyLogin";
> >> >
> >> > //rda.InternetPassword = "<password>";
> >> >
> >> > rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
> >> >
> >> > rda.LocalConnectionString =
> >> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> >> > Source=\test.sdf";
> >> >
> >> >
> >> > rda.Pull(
> >> >
> >> > "Employees",
> >> >
> >> > "Select * from Employees",
> >> >
> >> > rdaOleDbConnectString,
> >> >
> >> > RdaTrackOption.TrackingOnWithIndexes,
> >> >
> >> > "ErrorTable");
> >> >
> >> > }
> >> >
> >> > catch(SqlCeException ex)
> >> >
> >> > {
> >> >
> >> > //Use your own error handling routine.
> >> >
> >> > //ShowErrors(e)
> >> >
> >> > string s=ex.Message;
> >> >
> >> > string s1=s; //*************at this point s= 'An internal error
> >> > Occured.
> >> > [ID,,,,,,]'
> >> >
> >> > }
> >> >
> >> > finally
> >> >
> >> > {
> >> >
> >> > //Dispose of the RDA object.
> >> >
> >> > rda.Dispose();
> >> >
> >> > }
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      27th Sep 2004
It looks generally correct. What is the exception information? As I
described before, make sure you have looked inside the InnerException Errors
collection

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Bob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Alex,
> Thanks for your reply.
> I agree with the direction you are taking. ie it is a connection problem.
> I have created another virtual directory using basic authentication.
>
> I am still erroring but there are variations in the error messages that
> indicate I am having an effect with my various connection permutations.
> I am running every thing on the one box. A win2k server platform.
> The database server is running mixed mode.
> Given:
> a domain of 'mydomain' ,
> a user bloggs with a password of 'password' who has dbo rights to
> NorthWind
> Computer IP address of 192.168.0.37
> Can you confirm please the following connection string / code.
> Thanks again
> Bob
> string rdaOleDbConnectString = "Provider=sqloledb; Data
> Source=192.168.0.37;Initial Catalog=Northwind;" +
>
> "User Id=mydomain\bloggs;Password=password";
>
> // Initialize the RDA object.
>
> SqlCeRemoteDataAccess rda = null;
>
> try
>
> {
>
> //Try the Pull operation.
>
> rda = new SqlCeRemoteDataAccess();
>
>
> rda.InternetLogin = "bloggs";
>
> rda.InternetPassword = "password";
>
> rda.InternetUrl = "http://192.168.0.37/rdaTest1/sscesa20.dll";
>
> rda.LocalConnectionString =
> @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> Source=\test.sdf";
>
>
> rda.Pull(
>
> "Employees",
>
> "Select * from Employees",
>
> rdaOleDbConnectString,
>
> RdaTrackOption.TrackingOnWithIndexes,
>
> "ErrorTable");
>
> }
>
>
>
> "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Check what you have in the InnerException of the SqlCeException. There is

> an
>> Errors collection, which you need to expand. Under it you'll find more
>> information.
>>
>> The remote connection string looks a bit incomplete. You need either
>> "user
>> id" and "password" specified or "Integrated Security=SSPI"
>> Another thing - do you have IIS on the same machine as the SQL server?

> I've
>> heard that you cannot use SSPI if the SQL server is not on the same

> machine.
>> In my experience RDA is somewhat easier to set up if you use SQL
>> authentication
>>
>> --
>> Alex Feinman
>> ---
>> Visit http://www.opennetcf.org
>> "Bob Clegg" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>> > Hi Alex,
>> > Exception message is below.
>> > 'An internal error occured. [ID,,,,,]'
>> >
>> > With a bit more sophistication in the catch I got :
>> > Error Code 80004005
>> > Message : 'An internal error occured. [ID,,,,,]
>> > Minor Err.:28574
>> > Source : Microsoft SQL Server 2000 WIndows CE Edition
>> >
>> > I take it from your response that essentially my checklist below is OK?
>> > I am running on Win2kServer
>> > The Emulator is version 4.1
>> >
>> > regards
>> > Bob
>> >
>> >
>> >
>> > "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Do you get an error, or does the pull succeed but produces nothing?
>> >> If latter, can you perhaps run SQL Profiler on the server to see which
>> > query
>> >> is actually issued?
>> >>
>> >> --
>> >> Alex Feinman
>> >> ---
>> >> Visit http://www.opennetcf.org
>> >> "Bob Clegg" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Hi,
>> >> > Can anyone tell me what I am doing wrong?
>> >> > I am trying to make my first simple CE project that uses RDA.
>> >> > When I try to execute the rda.pull method I get
>> >> > "An internal error occured. [ID,,,,,,]"
>> >> > So...
>> >> > 1) Installed sqlce20sql2ksp3a
>> >> > 2) Used the connectivity support wizard to create a virtual
>> >> > directory
>> >> > 'rdaTest' with anonymous access.
>> >> > 3) Added the internet user IUSR_ComputerName to SQL Server logins
>> >> > and
>> >> > to
>> >> > the
>> >> > Northwind database
>> >> > 4) created a C# CE windows app that checks / deletes then creates
>> >> > 'rdatest.sdf' in the application startup
>> >> > 5) added a button to the form that executes the example pull code

> from
>> > CE
>> >> > help. (With appropriate alterations).
>> >> > 6) Do an 'F5' to deploy and debug.
>> >> > The sdf creation goes OK. It only spits the dummy when the .pull is
>> >> > attempted.
>> >> >
>> >> > Have I missed something fundamental here?
>> >> > Button code follows.
>> >> > Thanks
>> >> > Bob
>> >> >
>> >> > // Connection string to the instance of SQL Server
>> >> >
>> >> > string rdaOleDbConnectString = "Provider=sqloledb; Data
>> >> > Source=HellFire;Initial Catalog=Northwind" ;
>> >> >
>> >> >
>> >> > // Initialize the RDA object.
>> >> >
>> >> > SqlCeRemoteDataAccess rda = null;
>> >> >
>> >> > try
>> >> >
>> >> > {
>> >> >
>> >> > //Try the Pull operation.
>> >> >
>> >> > rda = new SqlCeRemoteDataAccess();
>> >> >
>> >> >
>> >> > //rda.InternetLogin = "MyLogin";
>> >> >
>> >> > //rda.InternetPassword = "<password>";
>> >> >
>> >> > rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
>> >> >
>> >> > rda.LocalConnectionString =
>> >> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
>> >> > Source=\test.sdf";
>> >> >
>> >> >
>> >> > rda.Pull(
>> >> >
>> >> > "Employees",
>> >> >
>> >> > "Select * from Employees",
>> >> >
>> >> > rdaOleDbConnectString,
>> >> >
>> >> > RdaTrackOption.TrackingOnWithIndexes,
>> >> >
>> >> > "ErrorTable");
>> >> >
>> >> > }
>> >> >
>> >> > catch(SqlCeException ex)
>> >> >
>> >> > {
>> >> >
>> >> > //Use your own error handling routine.
>> >> >
>> >> > //ShowErrors(e)
>> >> >
>> >> > string s=ex.Message;
>> >> >
>> >> > string s1=s; //*************at this point s= 'An internal error
>> >> > Occured.
>> >> > [ID,,,,,,]'
>> >> >
>> >> > }
>> >> >
>> >> > finally
>> >> >
>> >> > {
>> >> >
>> >> > //Dispose of the RDA object.
>> >> >
>> >> > rda.Dispose();
>> >> >
>> >> > }
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
user@domain.invalid
Guest
Posts: n/a
 
      28th Sep 2004
Bob Clegg wrote:
> Hi,
> Can anyone tell me what I am doing wrong?
> I am trying to make my first simple CE project that uses RDA.
> When I try to execute the rda.pull method I get
> "An internal error occured. [ID,,,,,,]"
> So...
> 1) Installed sqlce20sql2ksp3a


Same thing on my machine, then a simple SP3 for SQL 2000 server install
has resolved my problem!!!

http://www.microsoft.com/sql/downloads/2000/sp3.asp

If you have SP3 on CE version then you need to install SP3 on SQL 2000
server. In my case thats helped me...
> 2) Used the connectivity support wizard to create a virtual directory
> 'rdaTest' with anonymous access.


Cheers

ADI
 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      28th Sep 2004
Hi Alex,
Going at last. Somewhere in the jungle I screwed up my virtual directory
settings.
A new virtual directory coupled with using SQL server authentication seems
to have done the trick.
I'll now experiment further.
Thanks for your help.
regards
bob

"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> It looks generally correct. What is the exception information? As I
> described before, make sure you have looked inside the InnerException

Errors
> collection
>
> --
> Alex Feinman
> ---
> Visit http://www.opennetcf.org
> "Bob" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi Alex,
> > Thanks for your reply.
> > I agree with the direction you are taking. ie it is a connection

problem.
> > I have created another virtual directory using basic authentication.
> >
> > I am still erroring but there are variations in the error messages that
> > indicate I am having an effect with my various connection permutations.
> > I am running every thing on the one box. A win2k server platform.
> > The database server is running mixed mode.
> > Given:
> > a domain of 'mydomain' ,
> > a user bloggs with a password of 'password' who has dbo rights to
> > NorthWind
> > Computer IP address of 192.168.0.37
> > Can you confirm please the following connection string / code.
> > Thanks again
> > Bob
> > string rdaOleDbConnectString = "Provider=sqloledb; Data
> > Source=192.168.0.37;Initial Catalog=Northwind;" +
> >
> > "User Id=mydomain\bloggs;Password=password";
> >
> > // Initialize the RDA object.
> >
> > SqlCeRemoteDataAccess rda = null;
> >
> > try
> >
> > {
> >
> > //Try the Pull operation.
> >
> > rda = new SqlCeRemoteDataAccess();
> >
> >
> > rda.InternetLogin = "bloggs";
> >
> > rda.InternetPassword = "password";
> >
> > rda.InternetUrl = "http://192.168.0.37/rdaTest1/sscesa20.dll";
> >
> > rda.LocalConnectionString =
> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> > Source=\test.sdf";
> >
> >
> > rda.Pull(
> >
> > "Employees",
> >
> > "Select * from Employees",
> >
> > rdaOleDbConnectString,
> >
> > RdaTrackOption.TrackingOnWithIndexes,
> >
> > "ErrorTable");
> >
> > }
> >
> >
> >
> > "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Check what you have in the InnerException of the SqlCeException. There

is
> > an
> >> Errors collection, which you need to expand. Under it you'll find more
> >> information.
> >>
> >> The remote connection string looks a bit incomplete. You need either
> >> "user
> >> id" and "password" specified or "Integrated Security=SSPI"
> >> Another thing - do you have IIS on the same machine as the SQL server?

> > I've
> >> heard that you cannot use SSPI if the SQL server is not on the same

> > machine.
> >> In my experience RDA is somewhat easier to set up if you use SQL
> >> authentication
> >>
> >> --
> >> Alex Feinman
> >> ---
> >> Visit http://www.opennetcf.org
> >> "Bob Clegg" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >> > Hi Alex,
> >> > Exception message is below.
> >> > 'An internal error occured. [ID,,,,,]'
> >> >
> >> > With a bit more sophistication in the catch I got :
> >> > Error Code 80004005
> >> > Message : 'An internal error occured. [ID,,,,,]
> >> > Minor Err.:28574
> >> > Source : Microsoft SQL Server 2000 WIndows CE Edition
> >> >
> >> > I take it from your response that essentially my checklist below is

OK?
> >> > I am running on Win2kServer
> >> > The Emulator is version 4.1
> >> >
> >> > regards
> >> > Bob
> >> >
> >> >
> >> >
> >> > "Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
> >> > news:(E-Mail Removed)...
> >> >> Do you get an error, or does the pull succeed but produces nothing?
> >> >> If latter, can you perhaps run SQL Profiler on the server to see

which
> >> > query
> >> >> is actually issued?
> >> >>
> >> >> --
> >> >> Alex Feinman
> >> >> ---
> >> >> Visit http://www.opennetcf.org
> >> >> "Bob Clegg" <(E-Mail Removed)> wrote in message
> >> >> news:(E-Mail Removed)...
> >> >> > Hi,
> >> >> > Can anyone tell me what I am doing wrong?
> >> >> > I am trying to make my first simple CE project that uses RDA.
> >> >> > When I try to execute the rda.pull method I get
> >> >> > "An internal error occured. [ID,,,,,,]"
> >> >> > So...
> >> >> > 1) Installed sqlce20sql2ksp3a
> >> >> > 2) Used the connectivity support wizard to create a virtual
> >> >> > directory
> >> >> > 'rdaTest' with anonymous access.
> >> >> > 3) Added the internet user IUSR_ComputerName to SQL Server logins
> >> >> > and
> >> >> > to
> >> >> > the
> >> >> > Northwind database
> >> >> > 4) created a C# CE windows app that checks / deletes then creates
> >> >> > 'rdatest.sdf' in the application startup
> >> >> > 5) added a button to the form that executes the example pull code

> > from
> >> > CE
> >> >> > help. (With appropriate alterations).
> >> >> > 6) Do an 'F5' to deploy and debug.
> >> >> > The sdf creation goes OK. It only spits the dummy when the .pull

is
> >> >> > attempted.
> >> >> >
> >> >> > Have I missed something fundamental here?
> >> >> > Button code follows.
> >> >> > Thanks
> >> >> > Bob
> >> >> >
> >> >> > // Connection string to the instance of SQL Server
> >> >> >
> >> >> > string rdaOleDbConnectString = "Provider=sqloledb; Data
> >> >> > Source=HellFire;Initial Catalog=Northwind" ;
> >> >> >
> >> >> >
> >> >> > // Initialize the RDA object.
> >> >> >
> >> >> > SqlCeRemoteDataAccess rda = null;
> >> >> >
> >> >> > try
> >> >> >
> >> >> > {
> >> >> >
> >> >> > //Try the Pull operation.
> >> >> >
> >> >> > rda = new SqlCeRemoteDataAccess();
> >> >> >
> >> >> >
> >> >> > //rda.InternetLogin = "MyLogin";
> >> >> >
> >> >> > //rda.InternetPassword = "<password>";
> >> >> >
> >> >> > rda.InternetUrl = "http://192.168.1.34/rdaTest/sscesa20.dll";
> >> >> >
> >> >> > rda.LocalConnectionString =
> >> >> > @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
> >> >> > Source=\test.sdf";
> >> >> >
> >> >> >
> >> >> > rda.Pull(
> >> >> >
> >> >> > "Employees",
> >> >> >
> >> >> > "Select * from Employees",
> >> >> >
> >> >> > rdaOleDbConnectString,
> >> >> >
> >> >> > RdaTrackOption.TrackingOnWithIndexes,
> >> >> >
> >> >> > "ErrorTable");
> >> >> >
> >> >> > }
> >> >> >
> >> >> > catch(SqlCeException ex)
> >> >> >
> >> >> > {
> >> >> >
> >> >> > //Use your own error handling routine.
> >> >> >
> >> >> > //ShowErrors(e)
> >> >> >
> >> >> > string s=ex.Message;
> >> >> >
> >> >> > string s1=s; //*************at this point s= 'An internal error
> >> >> > Occured.
> >> >> > [ID,,,,,,]'
> >> >> >
> >> >> > }
> >> >> >
> >> >> > finally
> >> >> >
> >> >> > {
> >> >> >
> >> >> > //Dispose of the RDA object.
> >> >> >
> >> >> > rda.Dispose();
> >> >> >
> >> >> > }
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
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
Registering a new emulator skin in Device Emulator Manager & VS 2005 AP Microsoft Dot NET Compact Framework 1 12th Jun 2006 01:12 PM
updating the vs.net 2003 emulator with compact framework sp3 (yes,the emulator) Tim Wilson Microsoft Dot NET Compact Framework 1 10th Sep 2005 05:41 PM
Emulator BUG: TimeSpan.Milliseconds not working on Pocket PC emulator pouchi Microsoft Dot NET Compact Framework 2 27th Jan 2004 02:36 AM
Differences between Gemini Emulator (MC 9000) & PPC 2003 Emulator shipped with Windows Mobile 2003 Vinay Microsoft Dot NET Compact Framework 0 26th Dec 2003 04:33 PM
Differences between Gemini Emulator (MC 9000) & PPC 2003 Emulator shipped with Windows Mobile 2003 Vinay Microsoft Dot NET Compact Framework 0 22nd Dec 2003 12:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:32 PM.