程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SyBase數據庫 >> SyBase綜合文章 >> Connecting to a SQL Anywhere Studio Database Using ADO.NET

Connecting to a SQL Anywhere Studio Database Using ADO.NET

編輯:SyBase綜合文章
This document explains how to dynamically create a connection to a SQL Anywhere Studio database through a C# project. Required Software
    • Sybase SQL Anywhere Studio 7.x or later
    • asademo.db file (included with Adaptive Server Anywhere)
    • ASA 8.0 Sample data source (created by default when Adaptive Server Anywhere is installed)
    • Microsoft Visual Studio .Net version 7.0
    • Microsoft ADO.Net
    • Windows NT, 98, 2000, Me, or XP
Steps
  1. Start Visual Studio .Net.
  1. Create a new project. Select Visual C# Projects from the left side.
      • Select Console Application from the right side.
      • Enter the project name CustomerDataReader.
      • Enter the project location: c:\temp.
      • Click OK to close the New Project dialog.
  1. In your code, you must set the System.Data name space. This is where all the ADO.Net classes are located. Enter the following using directive at the beginning of your project:
    Using system.Data;
  1. The next required using directive is the OLE DB .Net Data Provider. Add the following using directive to your project
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved