SQL Anywhere 11 .NET开发

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    SQL Anywhere 11 .NET开发 - Presentation Transcript

    1. SQL Anywhere 11 DotNet 开发 王军 Sybase iAnywhere
    2. 议程 • 开发接口概述 • SQL Anywhere 11 DotNet 开发
    3. 开发接口 • .NET • Java (JDBC) • ODBC • OLE DB / ADO • Perl • PHP • Python • Embedded SQL (C/C++) • Web Services
    4. 议程 • 开发接口概述 开发 • SQL Anywhere 11 DotNet开发
    5. 中所支持的开发接口 DotNet中所支持的开发接口 • .NET • OLE DB / ADO • ODBC
    6. 中所支持的开发接口 DotNet中所支持的开发接口 • Demo
    7. 数据库集成于Visual Studio 2008 数据库集成于 • 图形化向导连接数据库 • 查看数据库的对象 • 图形化向导生成数据库显示/操作界面
    8. 数据库集成于Visual Studio 2008 数据库集成于 1 2
    9. 数据库集成于Visual Studio 2008 数据库集成于 • Demo
    10. 程序开发 DotNet程序开发 • 连接数据库 – SAConnection • 根据连接、操作命令,从数据库取得数据,修改数据 – SACommand – SADataAdapter • 根据连接、SQL,从数据库取得数据(可更新) – SADataAdapter – DataSet
    11. 程序开发 DotNet程序开发 • Demo
    12. 程序开发(UltraLite) 程序开发 DotNet程序开发 • 连接数据库 – ULConnection • 根据连接、操作命令,从数据库取得数据,修改数据 – ULCommand – ULDataAdapter • 根据连接、SQL,从数据库取得数据(可更新) – ULDataAdapter – DataSet
    13. 程序开发(UltraLite) 程序开发 DotNet程序开发 • Demo
    14. DotNet 实体结构 • ADO.NET Entity Data Model
    15. SQL Anywhere DotNet 实体 • 显示表Customers的数据 – // 建立实体对象实例 – //SADemoModel.SADemoEntities – var saEntities = new SQLAnyEDM.SADemoEntities(); – // 从实体对象中检索数据 – var customers = saEntities.Customers; – // 将数据与 data grid 关联 – customersBindingSource.DataSource = customers;
    16. SQL Anywhere DotNet 实体 • 通过SQL查询数据 – var saEntities = new SQLAnyEDM.SADemoEntities(); – // Query EDM using the EntityClient provider and Entity SQL – var saConn = new System.Data.EntityClient.EntityConnection(\"Name=SADemoentities\"); – var saCmd = new System.Data.EntityClient.EntityCommand( – @\"select distinct p.Name from SADemoEntities.Products as p\", saConn); – saConn.Open(); – var saReader = – saCmd.ExecuteReader(System.Data.CommandBehavior.SequentialAccess); – // Loop through result set & add product name to the list box – listBox1.Items.Clear(); – while (saReader.Read()) – { – listBox1.Items.Add(saReader.GetString(0)); – } // while
    17. SQL Anywhere DotNet 实体 • 通过对象服务查询数据 – var saEntities = new SQLAnyEDM.SADemoEntities(); – // Query EDM using the Object Services – var contacts = saEntities.CreateQuery<System.Data.Common.DbDataRecord>( – @\"select c.GivenName, c.Surname from SADemoEntities.Contacts as c\"); – // Add the contact's first and last names to the list box – listBox2.Items.Clear(); – foreach (var record in contacts) – { – listBox2.Items.Add( – record.GetString(0) + \" \" + record.GetString(1)); – } // foreach
    18. SQL Anywhere DotNet 实体 • 通过对象LINK查询数据 – var saEntities = new SQLAnyEDM.SADemoEntities(); – // Query EDM using LINQ to entities – var orders = from o in saEntities.SalesOrders where o.Region == \"Central\" select o; – // Add the sales order's number and date to the list box – listBox3.Items.Clear(); – foreach (var so in orders) – { – listBox3.Items.Add( – \"Order #\" + so.ID + \" placed on \" + so.OrderDate); – } // foreach –
    19. 同步客户端API 同步客户端
    20. 同步客户端API 同步客户端 • .NET iAnywhere.MobiLink.Client.dll 1 2
    21. 同步客户端API 同步客户端 • Demo
    22. 直接行处理 • -sl 参数 • mlsrv11 -c \"dsn=SQL Anywhere 11 CustDB\" -dl -o cons1.txt -v+ -sl dnet(- MLAutoLoadPath=D:\\Txt\\2008-Nov- GCUC\\About_GCUC\\DotNet\\MLExample\\M LExample\\bin\\Debug)
    23. 直接行处理 • Demo
    24. 开发 WEB开发 • 通过各种接口访问数据库 – 查询 – 修改
    25. 开发 WEB开发 • Demo
    26. 谢谢!

    + iAnywhereiAnywhere, 2 years ago

    custom

    708 views, 0 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 708
      • 703 on SlideShare
      • 5 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 3
    Most viewed embeds
    • 5 views on http://iablog.sybase.com

    more

    All embeds
    • 5 views on http://iablog.sybase.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories