SqlCeRemoteDataAccess クラス
メモ : この名前空間、クラス、およびメンバは、.NET Framework Version 1.1 だけでサポートされています。
SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化します。リモート データ アクセスの詳細については、SQL Server CE Books Online を参照してください。
この型のすべてのメンバの一覧については、SqlCeRemoteDataAccess メンバ を参照してください。
System.Object
System.MarshalByRefObject
System.Data.SqlServerCe.SqlCeRemoteDataAccess
NotInheritable Public Class SqlCeRemoteDataAccess
Inherits MarshalByRefObject
Implements IDisposable
[C#]
public sealed class SqlCeRemoteDataAccess : MarshalByRefObject,
IDisposable
[C++]
public __gc __sealed class SqlCeRemoteDataAccess : public
MarshalByRefObject, IDisposable
[JScript]
public class SqlCeRemoteDataAccess extends MarshalByRefObject
implements IDisposable
スレッドセーフ
この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。
使用例
' Connection String to the SQL Server.
Dim rdaOleDbConnectString As String = _
"Provider=sqloledb; Data Source=MySqlServer;Initial Catalog=Northwind; " + _
"User Id=username;Password = <password>"
' Initialize RDA Object.
Dim rda As SqlCeRemoteDataAccess = Nothing
Try
'Try the Pull Operation.
rda = New SqlCeRemoteDataAccess()
rda.InternetLogin = "MyLogin"
rda.InternetPassword = "<password>"
rda.InternetUrl = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>"
rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\ssce.sdf"
rda.Pull("Employees", "Select * from Employees", _
rdaOleDbConnectString, _
RdaTrackOption.TrackingOnWithIndexes, _
"ErrorTable")
Catch e As SqlCeException
'Use you own Error Handling Routine.
'ShowErrors(e);
Finally
'Dispose of the RDA Object.
rda.Dispose()
End Try
[C#]
// Connection String to the SQL Server.
string rdaOleDbConnectString = "Provider=sqloledb; Data Source=MySqlServer;Initial Catalog=Northwind; " +
"User Id=username;Password = <password>";
// Initialize RDA Object.
SqlCeRemoteDataAccess rda = null;
try {
//Try the Pull Operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "MyLogin";
rda.InternetPassword = "<password>";
rda.InternetUrl = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>";
rda.LocalConnectionString = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\ssce.sdf";
rda.Pull(
"Employees",
"Select * from Employees",
rdaOleDbConnectString,
RdaTrackOption.TrackingOnWithIndexes ,
"ErrorTable");
}
catch(SqlCeException) {
//Use you own Error Handling Routine.
}
finally {
//Dispose of the RDA Object.
rda.Dispose();
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
名前空間: System.Data.SqlServerCe
プラットフォーム: .NET Compact Framework - Windows CE .NET
アセンブリ: System.Data.Sqlserverce (System.Data.Sqlserverce.dll 内)