SqlCeRemoteDataAccess.InternetLogin 属性

指定在连接到 SQL Server Compact Edition Server Agent 时使用的 Microsoft Internet 信息服务 (IIS) 登录名。

命名空间: System.Data.SqlServerCe
程序集: System.Data.SqlServerCe(在 system.data.sqlserverce.dll 中)

语法

声明
Public Property InternetLogin As String
用法
Dim instance As SqlCeRemoteDataAccess
Dim value As String

value = instance.InternetLogin

instance.InternetLogin = value
public string InternetLogin { get; set; }
public:
property String^ InternetLogin {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_InternetLogin ()

/** @property */
public void set_InternetLogin (String value)
public function get InternetLogin () : String

public function set InternetLogin (value : String)
不适用。

属性值

连接到 SQL Server Compact Edition Server Agent 时使用的 IIS 登录名。默认为无登录名。

备注

如果包含 SQL Server Compact Edition Server Agent 的虚拟目录配置为使用基本身份验证或集成 Windows 身份验证,则需要 InternetLogin 属性。在使用集成 Windows 身份验证时,不通过网络传递 InternetLogin

示例

下面的示例演示如何设置 SqlCeRemoteDataAccess 对象的 InternetLogin 属性。

' Connection String to the SQL Server
'
Dim rdaOleDbConnectString As String = "Data Source=MySqlServer;Initial Catalog=AdventureWorks; " & _
    "User Id=username;Password = <password>"

' Initialize RDA Object
'
Dim rda As SqlCeRemoteDataAccess = Nothing

Try
    ' Try the Pull Operation
    '
    rda = New SqlCeRemoteDataAccess( _
        "https://www.adventure-works.com/sqlmobile/sqlcesa30.dll", _
        "MyLogin", _
        "<password>", _
        "Data Source=MyDatabase.sdf")

    rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString, _
        RdaTrackOption.TrackingOnWithIndexes, "ErrorTable")

    ' or, try one of these overloads:
    ' rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString, _
    '     RdaTrackOption.TrackingOnWithIndexes)
    '
    ' rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString)

Catch
    ' Handle errors here
    '
Finally
    ' Dispose of the RDA object
    '
    rda.Dispose()
End Try
// Connection String to the SQL Server
//
string rdaOleDbConnectString = "Data Source=MySqlServer;Initial Catalog=AdventureWorks; " +
    "User Id=username;Password = <password>";

// Initialize RDA Object
//
SqlCeRemoteDataAccess rda = null;

try
{
    // Try the Pull Operation
    //
    rda = new SqlCeRemoteDataAccess(
        "https://www.adventure-works.com/sqlmobile/sqlcesa30.dll",
        "MyLogin",
        "<password>",
        "Data Source=MyDatabase.sdf");

    rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString,
        RdaTrackOption.TrackingOnWithIndexes, "ErrorTable");

    // or, try one of these overloads:
    //
    // rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString,
    //     RdaTrackOption.TrackingOnWithIndexes);
    //
    // rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString);
}
catch (SqlCeException)
{
    // Handle errors here
    //
}
finally
{
    // Dispose of the RDA object
    //
    rda.Dispose();
}

平台

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Windows Vista、Microsoft Windows XP SP2 和 Windows Server 2003 SP1 支持 Microsoft .NET Framework 3.0。

版本信息

.NET Framework

受以下版本支持:3.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

SqlCeRemoteDataAccess 类
SqlCeRemoteDataAccess 成员
System.Data.SqlServerCe 命名空间