Get the App
SLTechnology News&Howtos  ›  Development  › 

Procedure Analysis of execution Storage in iBATIS.NET

Shulou Source: shulou.com Published: 2022-06-02 22:27:54 09月27日 Update

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

< 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.

Tags: Procedures storage analysis problems help examples more answers easy easy code content guys partners situations files methods knowledge programs articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB Shulou Technology OPPO Reno Huawei