相關下載
http://devzone.advantagedatabase.com/dz/content.aspx?key=31
1.安裝數(shù)據(jù)庫:????? ?
Advantage Database Server
2.安裝數(shù)據(jù)庫工具:
Advantage Data Architect
3.安裝.NET數(shù)據(jù)訪問組件(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(); } } }
更多文章、技術交流、商務合作、聯(lián)系博主
微信掃碼或搜索:z360901061

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