RDA replication between PDA and Oracle ?

N

nono

Hello,

I test RDA replication between PDA and SQL Server.
The problem is that my production server is Oracle and
when i change the connection string, it fails on
the "pull" method :
("An internal error occured. [ID,,,,]")

Any idea ? (see the code below)

Thanks,
nono

private void button2_Click(object sender, System.EventArgs
e)
{
// Connection string to the instance of SQL Server
/*string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=YOURDATASOURCE;Initial Catalog=YOURCATALOG; " +
"User Id=sa;Password=sa";*/

// Oracle connection's string
string rdaOleDbConnectString
=@"Password=YOURPASSWORD;User ID=YOURUSER;Data
Source=YOURDATASOURCE";

// Initialize the RDA object.
SqlCeRemoteDataAccess rda = null;

try
{
//Try the Pull operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "YOUR LOGIN";
rda.InternetPassword = "";
rda.InternetUrl
= "http://YOURSERVER/sqlce/sscesa20.dll";
rda.LocalConnectionString
= "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source="
+ @"\my documents\YOURFILE.sdf";

Int32 inter = Environment.TickCount ;
rda.Pull("DESTINATIONTABLE","Select FIELDS from
SOURCETABLE",
rdaOleDbConnectString,
RdaTrackOption.TrackingOff ); /* ,
"ErrorTable");*/
Int32 timeTaken2 = Environment.TickCount-inter ;
MessageBox .Show ("Load time: "+timeTaken2.ToString ());
}
catch(SqlCeException EX)
{
//Use your own error handling routine.
MessageBox .Show (EX.Message );
}
finally
{
//Dispose of the RDA object.
rda.Dispose();
}

}
 
R

Rick Winscot

nono,

The big issue here is the protocol that SQL Server uses to get data in/out
of a DB (TDS). The SQLCE components that you are using for SQL Server
access are specifically designed for use _only_ with SQL Server CE / SQL
Server 7/2000. If you want data out of Oracle, I suggest moving to a .NET
webservice for data exchange. Be aware that data access will slow down when
not using RDA.

OR!

You can use SQL Server as a host for handheld data delivery. Use SQL Server
for data in/out to the handheld which synchronizes data with the oracle DB.
You can use DTS to synchronize data on a regular schedule - or you can write
a set of triggers that will keep the data more-or-less up to date.

Rick Winscot
rickly@zyche dot com
 
N

nono

Rick,
Very interesting answer...
Yes, RDA is very fast but we can not use a SQL Server2000
:-(
So, the solution is WS but it is too slow on a GPRS
connection.
Perhaps it would be faster with soap extension
(compression).

I think there is really a problem to consuming WS with
compact framework.

http://www.devbuzz.com/content/zinc_compact_framework_web_s
ervice_xml_pg2.asp
"The first time you call a web service from the Compact
Framework there seems to be a real performance issue;
second and subsequent calls are much faster"

http://smartdevices.microsoftdev.com/Learn/Articles/502.asp
x

"When consuming XML Web services from a Smart Device
project you will experience an initial delay of a few
seconds. If you make asynchronous calls, this delay does
not have to freeze your application's user interface. This
delay occurs when the .NET Compact Framework runtime is
setting up the connection details for the XML Web service,
and caching the details"

bye
nono
-----Original Message-----
nono,

The big issue here is the protocol that SQL Server uses to get data in/out
of a DB (TDS). The SQLCE components that you are using for SQL Server
access are specifically designed for use _only_ with SQL Server CE / SQL
Server 7/2000. If you want data out of Oracle, I suggest moving to a .NET
webservice for data exchange. Be aware that data access will slow down when
not using RDA.

OR!

You can use SQL Server as a host for handheld data delivery. Use SQL Server
for data in/out to the handheld which synchronizes data with the oracle DB.
You can use DTS to synchronize data on a regular schedule - or you can write
a set of triggers that will keep the data more-or-less up to date.

Rick Winscot
rickly@zyche dot com


nono said:
Hello,

I test RDA replication between PDA and SQL Server.
The problem is that my production server is Oracle and
when i change the connection string, it fails on
the "pull" method :
("An internal error occured. [ID,,,,]")

Any idea ? (see the code below)

Thanks,
nono

private void button2_Click(object sender, System.EventArgs
e)
{
// Connection string to the instance of SQL Server
/*string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=YOURDATASOURCE;Initial Catalog=YOURCATALOG; " +
"User Id=sa;Password=sa";*/

// Oracle connection's string
string rdaOleDbConnectString
=@"Password=YOURPASSWORD;User ID=YOURUSER;Data
Source=YOURDATASOURCE";

// Initialize the RDA object.
SqlCeRemoteDataAccess rda = null;

try
{
//Try the Pull operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "YOUR LOGIN";
rda.InternetPassword = "";
rda.InternetUrl
= "http://YOURSERVER/sqlce/sscesa20.dll";
rda.LocalConnectionString
= "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source="
+ @"\my documents\YOURFILE.sdf";

Int32 inter = Environment.TickCount ;
rda.Pull("DESTINATIONTABLE","Select FIELDS from
SOURCETABLE",
rdaOleDbConnectString,
RdaTrackOption.TrackingOff ); /* ,
"ErrorTable");*/
Int32 timeTaken2 = Environment.TickCount-inter ;
MessageBox .Show ("Load time: "+timeTaken2.ToString ());
}
catch(SqlCeException EX)
{
//Use your own error handling routine.
MessageBox .Show (EX.Message );
}
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