From: mr ezzarfani on


how can i write or read data from pervasive sql on the server?

this is what i now have:

// The local connection string.
private string strConnLocal = "Data Source ="
+
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingA
ssembly().GetName().CodeBase) + "\\test.sdf;";

// The remote connection string.
private string strConnRemote = "Provider=sqloledb; "
+ "Data Source=test; "
+ "Initial Catalog=OURPDA; "
+ "Integrated Security=SSPI;";

// The URL
private string strURL =
"http://169.254.229.103/OURPDA/sqlceca35.dll";

public void doen()
{
// Create a remote data access object
SqlCeRemoteDataAccess rdaNW =
new SqlCeRemoteDataAccess(strURL, strConnLocal);
try
{
// Have RDA:
// Create local tables named Categories and
// ErrorCategories.
// Connect to the remote server and submit the
// SELECT statement.
// Place the results in the local Categories table.
rdaNW.LocalConnectionString = strConnLocal;
rdaNW.InternetUrl = strURL;
rdaNW.InternetLogin = "";
rdaNW.InternetPassword = "";
rdaNW.Pull("Department",
"SELECT Name " +
"FROM Department " +
"WHERE Room_Number = 100",
strConnRemote,
RdaTrackOption.TrackingOnWithIndexes,
"ErrorCategories");
}
catch (SqlCeException exSQL)
{
HandleSQLException(exSQL);
}
finally
{
rdaNW.Dispose();
}
}

*** Sent via Developersdex http://www.developersdex.com ***