In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
IBATIS.NET performs stored procedure analysis. In view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
How does iBATIS.NET execute stored procedures? So let's start with our explanation:
First, let's take a look at the configuration of XML. The mapping XML file is written as follows
xml version= "1.0" encoding= "utf-8"? > < sqlMap namespace= "Member" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=" SqlMap.xsd "> < resultMaps > < resultMap id=" SelectResult "class=" PlatAdmin.Model.Member "> < result property=" Id "column=" id "/ > < result property=" Identityno "column=" identityno "/ > < result property= "Telephone" column= "telephone" / > < result property= "Email" column= "email" / > < result property= "Linktel" column= "linktel" / > < result property= "Address" column= "address" / > < result property= "Content" column= "content" / > < result property= "Username" column= "username" / > < result property= "Password" column= "password" / > < result property= "Truename" column= "truename" / > < result property= "Enable" column= "enable" / > < result property= "Regdate" column= "regdate" / > < / resultMap > < parameterMaps > < parameterMap id= "swapParas" class= < PlatAdmin.Model.Member "> < parameter property=" querystr "column="/ > < parameter property=" keyfield "column="/ > < parameter property=" pagesize "column=" / > < parameter property= "pagenumber" column= "/ > < / parameterMap > < / parameterMaps > < statements > < procedure id=" GetMemberList " ParameterMap= "swapParas" resultMap= "SelectResult" > usp_GetRecordset < / procedure > < / statements > < / sqlMap >
The sample program code of the stored procedure executed by iBATIS.NET is as follows:
Public IList GetMemberList (string querystr,int pageNo) {Hashtable ht = new Hashtable (); ht.Add ("querystr", querystr); ht.Add ("keyfield", "id"); ht.Add ("pagesize", 2); ht.Add ("pagenumber", pageNo); SqlMapper sqlMap = IBatisNet.DataMapper.Mapper.Instance () Try {return sqlMap.QueryForList ("GetMemberList", ht);} catch (Exception e) {throw new IBatisNetException (e.Messagepene);}}
This is the end of the example of the stored procedure executed by iBATIS.NET. I hope it will be helpful to you.
This is the answer to the question about the process analysis of iBATIS.NET execution storage. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.