Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » 使用 SQL Anywhere 编程简介 » SQL Anywhere Explorer » 使用 SQL Anywhere Explorer

 

在 Visual Studio 中使用数据库连接

使用 SQL Anywhere Explorer,在 [Data Connections] 节点显示 SQL Anywhere 数据库连接。必须创建数据连接才能查看表和视图中的数据。

您可以在 SQL Anywhere Explorer 中列出数据库表、视图、存储过程和函数并扩展各个表以列出它们的列。Visual Studio [Properties] 窗格中会显示在 [SQL Anywhere Explorer] 窗口中选择的对象的属性。

♦  在 Visual Studio 中添加 SQL Anywhere 数据库连接
  1. 选择 [View] » [SQL Anywhere Explorer],打开 SQL Anywhere Explorer。

  2. 在 [SQL Anywhere Explorer] 窗口中右击 [Data Connections],然后选择 [Add Connection]。

  3. 选择 [SQL Anywhere],然后单击 [OK]。

  4. 输入连接到数据库所需的适当值。

  5. 单击 [OK]。

    这样就建立了一个到数据库的连接,且该连接被添加到 [Data Connections] 列表。

♦  从 Visual Studio 中删除 SQL Anywhere 数据库连接
  1. 选择 [View] » [SQL Anywhere Explorer],打开 SQL Anywhere Explorer。

  2. 在 [SQL Anywhere Explorer] 窗口中右击要删除的数据连接,然后选择 [Delete]。

    这样该连接即从 [SQL Anywhere Explorer] 窗口删除。