CE Emulator and RDA

B

Bob Clegg

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();

}
 
A

Alex Feinman [MVP]

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?
 
B

Bob Clegg

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 said:
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 said:
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();

}
 
A

Alex Feinman [MVP]

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 said:
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 said:
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 said:
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();

}
 
B

Bob

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 said:
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 said:
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 said:
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
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();

}
 
A

Alex Feinman [MVP]

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 said:
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 said:
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 said:
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



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
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();

}
 
U

user

Bob said:
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
 
B

Bob

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 said:
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 said:
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 said:
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
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



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
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();

}
 

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

Top