成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

iBATIS.NET執行存儲過程實例詳解

開發 后端
iBATIS.NET執行存儲過程是什么情況呢?iBATIS.NET執行存儲過程是怎么執行的呢?那么本文就通過實例向你詳細介紹。

iBATIS.NET執行存儲過程是怎么進行的呢?那么我們就開始我們的講解:

首先我們看看XML的配置,映射XML文件書寫如下

  1. ﹤?xml version="1.0" encoding="utf-8" ?﹥  
  2.  
  3. ﹤sqlMap namespace="Member" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SqlMap.xsd"﹥  
  4.     ﹤resultMaps﹥  
  5.         ﹤resultMap id="SelectResult" class="PlatAdmin.Model.Member"﹥  
  6.             ﹤result property="Id" column="id" /﹥  
  7.             ﹤result property="Identityno" column="identityno" /﹥  
  8.             ﹤result property="Telephone" column="telephone" /﹥  
  9.             ﹤result property="Email" column="email" /﹥  
  10.             ﹤result property="Linktel" column="linktel" /﹥  
  11.             ﹤result property="Address" column="address" /﹥  
  12.             ﹤result property="Content" column="content" /﹥  
  13.             ﹤result property="Username" column="username" /﹥  
  14.             ﹤result property="Password" column="password" /﹥  
  15.             ﹤result property="Truename" column="truename" /﹥  
  16.             ﹤result property="Enable" column="enable" /﹥  
  17.             ﹤result property="Regdate" column="regdate" /﹥  
  18.         ﹤/resultMap﹥  
  19.     ﹤/resultMaps﹥  
  20.           
  21.     ﹤parameterMaps﹥  
  22.         ﹤parameterMap id="swapParas" class="PlatAdmin.Model.Member"﹥  
  23.             ﹤parameter property="querystr" column="" /﹥  
  24.             ﹤parameter property="keyfield" column="" /﹥  
  25.             ﹤parameter property="pagesize" column="" /﹥  
  26.             ﹤parameter property="pagenumber" column="" /﹥  
  27.         ﹤/parameterMap﹥  
  28.     ﹤/parameterMaps﹥  
  29.       
  30.     ﹤statements﹥  
  31.         ﹤procedure id="GetMemberList" parameterMap="swapParas" resultMap="SelectResult"﹥  
  32.             usp_GetRecordset  
  33.         ﹤/procedure﹥  
  34.  
  35.           
  36.     ﹤/statements﹥  
  37. ﹤/sqlMap﹥ 

iBATIS.NET執行存儲過程實例程序代碼如下:

  1. public IList GetMemberList(string querystr,int pageNo)  
  2.         {  
  3.             Hashtable ht = new Hashtable();  
  4.             ht.Add("querystr",querystr);  
  5.             ht.Add("keyfield","id");  
  6.             ht.Add("pagesize",2);  
  7.             ht.Add("pagenumber",pageNo);  
  8.  
  9.             SqlMapper sqlMap = IBatisNet.DataMapper.Mapper.Instance();  
  10.  
  11.             try 
  12.             {  
  13.                 return sqlMap.QueryForList("GetMemberList",ht);  
  14.             }  
  15.             catch(Exception e)  
  16.             {  
  17.                 throw new IBatisNetException(e.Message,e);  
  18.             }  
  19.         } 

iBATIS.NET執行存儲過程實例的情況就介紹到這里,希望對你有所幫助。

【編輯推薦】

  1. iBATIS教程之like語句的寫法淺析
  2. iBATIS.NET多數據庫支持淺析
  3. iBATIS教程之如何獲得output參數值
  4. iBATIS.NET處理多參數的SQL語句的配置
  5. iBATIS.NET與VS 2005進行單元測試淺析
責任編輯:仲衡 來源: CSDN博客
相關推薦

2009-07-21 13:50:00

iBATIS.NET調

2009-07-22 09:07:01

iBATIS.NET

2009-07-20 13:22:47

iBATIS.Net日

2009-07-16 13:50:31

ibatisResultMap

2009-07-22 14:28:52

iBATIS.NET配

2009-07-20 10:06:07

iBATIS.net查詢方式

2009-07-20 14:56:18

iBATIS.NET動態選擇DAO

2009-07-22 14:11:09

配置ibatis.neiBatis.net配

2009-07-21 15:21:59

iBATIS.NET多

2009-07-20 09:51:19

iBATIS.net數據庫緩存

2009-07-20 15:27:22

Castle.DynaiBATIS.NET

2009-07-21 14:15:00

iBATIS.NET多

2009-07-20 13:47:08

iBATIS.NET字

2009-07-20 15:14:44

iBATIS.NET連

2011-03-15 13:30:27

IBatis.netMySQL

2009-07-17 17:57:20

NPetShop iBATIS.Net

2009-07-21 15:46:48

獲得output參數值iBATIS教程

2009-07-21 16:30:15

iBATIS.NET與單元測試

2009-07-20 09:27:42

IBATIS.netDAO

2009-07-21 16:17:28

iBATIS.NET
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 欧美日韩国产一区二区三区 | 欧美精| 亚洲网站在线观看 | 一区二区三区av | 久久精品97 | 亚洲影音先锋 | 国产黄色av网站 | 国产探花在线精品一区二区 | 中文欧美日韩 | 91在线精品一区二区 | 亚洲国产精品久久久久婷婷老年 | 九九综合 | 91高清在线| 视频一区二区在线观看 | 在线成人免费视频 | 美女网站视频免费黄 | 久久国产精品免费一区二区三区 | 色网站视频 | 一区二区在线免费观看视频 | 在线免费观看毛片 | 亚洲欧美日本在线 | 午夜成人免费视频 | 超碰在线影院 | 成人在线日韩 | 国产精品夜夜夜一区二区三区尤 | 麻豆精品国产免费 | 久久久久亚洲精品 | 精品国产一区二区三区久久久蜜月 | 精品欧美| 亚洲高清在线 | 日本高清视频在线播放 | 毛片99| 日韩精品久久久久 | 日韩一级免费 | 精品国产欧美一区二区 | 成人黄页在线观看 | 干狠狠| 欧美精品在线一区 | 看羞羞视频免费 | 欧美视频在线看 | 日韩有码一区 |