日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

C#操作 Advantage Database Server 數據庫

系統 2209 0

相關下載

http://devzone.advantagedatabase.com/dz/content.aspx?key=31

1.安裝數據庫:????? ?

Advantage Database Server

2.安裝數據庫工具:

Advantage Data Architect

3.安裝.NET數據訪問組件(Advantage.Data.Provider.dll?for .net 2.0或Advantage.Data.Entity.dll for 3.5以上):

Advantage .NET Data Provider

?

簡單Demo:

引用?D:\Program Files (x86)\Advantage 11.10\ado.net\2.0\Advantage.Data.Provider.dll

      using System;

using Advantage.Data.Provider;  



namespace ADSDemo

{

    class Program

    {

        static void Main(string[] args)

        {

            // create a connection object  

           // AdsConnection conn = new AdsConnection("data source=c:\\data;" + 

            //"ServerType=remote|local; TableType=ADT");



            //AdsConnection conn = new AdsConnection();

            //conn.ConnectionString = "data source=c:\\data\\Demo2.add; " +

            //"user id = adssys; password = '' " +

            //"ServerType=local; TrimTrailingSpaces = true";



            //AdsConnection conn = new AdsConnection();

            //conn.ConnectionString = "data source=c:\\data\\Demo2.add; " +

            //"user id = adssys;  " +

            //"ServerType=local; TrimTrailingSpaces = true";
      
//AdsConnection conn = new AdsConnection("Data Source=\\\\127.0.0.1:6262\\data\\Demo2.add;ServerType=REMOTE;
User ID=AdsSys;Password=XXXXX;"); AdsConnection conn = new AdsConnection(); conn.ConnectionString = "data source=c:\\data\\Demo2.add; " + "ServerType=local; TrimTrailingSpaces = true"; AdsCommand cmd; AdsDataReader reader; int iField; try { conn.Open(); // create a command object cmd = conn.CreateCommand(); // specify a simple SELECT statement cmd.CommandText = "select * from users"; // execute the statement and create a reader reader = cmd.ExecuteReader(); // dump the results of the query to the console while (reader.Read()) { for (iField = 0; iField < reader.FieldCount; iField++) Console.Write(reader.GetValue(iField) + " "); Console.WriteLine(); } conn.Close(); } catch (AdsException e) { Console.WriteLine(e.Message); } catch (System.Exception ex) { Console.WriteLine(ex.Message); } Console.ReadKey(); } } }

C#操作 Advantage Database Server 數據庫


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 肥城市| 聂拉木县| 雅江县| 怀集县| 马关县| 新化县| 宣汉县| 泰顺县| 广饶县| 黄龙县| 宜君县| 榆中县| 太湖县| 湖北省| 柳河县| 木里| 乡城县| 定州市| 隆昌县| 绍兴市| 蓬溪县| 搜索| 九江县| 宁强县| 阿城市| 咸丰县| 宽城| 长乐市| 慈利县| 边坝县| 温泉县| 方山县| 嫩江县| 新泰市| 包头市| 蒲江县| 南川市| 那坡县| 彰化县| 玉溪市| 罗江县|