Newbie URL question

B

Bob Clegg

Hi,
Attempting to implement RDA woth SQLServer CE.
Having trouble with URL syntax for the InternetUrl property of my
SQLCeRemoteDataAccess object.
The development machine is running IIS.
I am attempting to use anonymous access authentication.
If I do
rda.InternetUrl = "<http://localhost/mytestdirectory/sscesa20.dll>";
I get an error message stating "url syntax error [,,,URL,,,]"
if I try
"<http:Reuben\\IUSER_Reuben://localhost/cablecar/sscesa20.dll>";

The Emulator throws a native exception.

I haven't been able to find any sample code for what seems to me would be a
common configuration. ie Development machine running IIS and debugging CE
app using the emulator.

If some one could point me in the right direction I would be grateful.

Thanks

Bob
 
A

Alex Feinman [MVP]

You cannot use localhost when accessing a PC from the device/emulator
attached to it. Localhost is the device/emualtor itself. Use the PC IP
address.
Also you want to get rid of < and > in the url. Those are unfortunately in
the online documentation simply to illustrate that this filed will have to
be replaced with the actual url
rda.InternetUrl = "http://192.168.0.15/mytestdirectory/sscesa20.dll";
(or whatever the PC IP address is)
 
B

Bob Clegg

Hi Alex,
Thank you, that did the trick.
regards
Bob

Alex Feinman said:
You cannot use localhost when accessing a PC from the device/emulator
attached to it. Localhost is the device/emualtor itself. Use the PC IP
address.
Also you want to get rid of < and > in the url. Those are unfortunately in
the online documentation simply to illustrate that this filed will have to
be replaced with the actual url
rda.InternetUrl = "http://192.168.0.15/mytestdirectory/sscesa20.dll";
(or whatever the PC IP address is)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Bob Clegg said:
Hi,
Attempting to implement RDA woth SQLServer CE.
Having trouble with URL syntax for the InternetUrl property of my
SQLCeRemoteDataAccess object.
The development machine is running IIS.
I am attempting to use anonymous access authentication.
If I do
rda.InternetUrl = "<http://localhost/mytestdirectory/sscesa20.dll>";
I get an error message stating "url syntax error [,,,URL,,,]"
if I try
"<http:Reuben\\IUSER_Reuben://localhost/cablecar/sscesa20.dll>";

The Emulator throws a native exception.

I haven't been able to find any sample code for what seems to me would be
a
common configuration. ie Development machine running IIS and debugging CE
app using the emulator.

If some one could point me in the right direction I would be grateful.

Thanks

Bob
 
B

Bob Clegg

Hi Alex,
Although the InternetUrl is sorted out. I still can't get a rda.pull to
work.
My code is essentially just a copy of the example code. But I keep getting
'an internal error occurred.[ID,,,,,,]
code snippet follows.
regards
Bob
string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=HellFire;Initial Catalog=CableCar ";


// Initialize 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/cablecar/sscesa20.dll";

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


rda.Pull(

"Employees",

"Select * from Employeetest",

rdaOleDbConnectString,

RdaTrackOption.TrackingOnWithIndexes ,

"ErrorTable");

Bob Clegg said:
Hi Alex,
Thank you, that did the trick.
regards
Bob

Alex Feinman said:
You cannot use localhost when accessing a PC from the device/emulator
attached to it. Localhost is the device/emualtor itself. Use the PC IP
address.
Also you want to get rid of < and > in the url. Those are unfortunately in
the online documentation simply to illustrate that this filed will have to
be replaced with the actual url
rda.InternetUrl = "http://192.168.0.15/mytestdirectory/sscesa20.dll";
(or whatever the PC IP address is)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Bob Clegg said:
Hi,
Attempting to implement RDA woth SQLServer CE.
Having trouble with URL syntax for the InternetUrl property of my
SQLCeRemoteDataAccess object.
The development machine is running IIS.
I am attempting to use anonymous access authentication.
If I do
rda.InternetUrl = "<http://localhost/mytestdirectory/sscesa20.dll>";
I get an error message stating "url syntax error [,,,URL,,,]"
if I try
"<http:Reuben\\IUSER_Reuben://localhost/cablecar/sscesa20.dll>";

The Emulator throws a native exception.

I haven't been able to find any sample code for what seems to me would be
a
common configuration. ie Development machine running IIS and debugging CE
app using the emulator.

If some one could point me in the right direction I would be grateful.

Thanks

Bob
 

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