You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by "LITTLEWOOD, John, GBM" <Jo...@rbos.com> on 2007/02/01 14:36:43 UTC
problem with sqlmap and accessing a procedure
Hi
I am using .net2 and have the .net2 mappers installed. I am accessing
Oracle procedures.
I have this code in my page_load (for test)
protected void Page_Load(object sender, EventArgs e)
{
ISqlMapper mapper = null;
DomSqlMapBuilder builder = new DomSqlMapBuilder();
mapper = builder.Configure("sqlMap.config");
Hashtable param = new Hashtable();
param.Add("p_id", 1);
param.Add("p_out", null);
StaticHeader oSH = null;
oSH = mapper.QueryForObject<StaticHeader>("GetStaticHeader", param);
}
I have the following inmy xml file
<resultMaps>
<resultMap id="StaticHeader-Result" class="StaticHeader">
<result property="StaticHeadersId" column="STATIC_HEADERS_ID" />
<result property="FullDesc" column="FULL_DESC" />
<result property="AuditComment" column="AUDIT_COMMENT" />
<result property="AuditEmpId" column="AUDIT_EMP_ID" />
<result property="AuditWhen" column="AUDIT_WHEN" />
<result property="AuditWho" column="AUDIT_WHO" />
<result property="AuditVersionNo" column="AUDIT_VERSION_NO" />
</resultMap>
<resultMap id="StaticDetails-Result" class="StaticDetail">
<result property="StaticDetailsId" column="STATIC_DETAILS_ID" />
<result property="StaticHeadersId" column="STATIC_HEADER_ID" />
<result property="FullDesc" column="FULL_DESC" />
<result property="ShortDesc" column="SHORT_DESC" />
<result property="AuditComment" column="AUDIT_COMMENT" />
<result property="AuditEmpId" column="AUDIT_EMP_ID" />
<result property="AuditWhen" column="AUDIT_WHEN" />
<result property="AuditWho" column="AUDIT_WHO" />
<result property="AuditVersionNo" column="AUDIT_VERSION_NO" />
</resultMap>
</resultMaps>
<procedure id="GetStaticHeader" parameterMap="StaticHeader-Select"
resultMap="StaticHeader-Result">
pkg_test.jackie1
</procedure>
<parameterMap id="StaticHeader-Select" class="StaticHeader">
<parameter property="StaticHeadersId" column="p_id" direction="Input"
dbtype="Int32" />
<parameter property="p_out" column="p_out" direction="Output"
dbtype="Cursor" />
</parameterMap>
I am getting the following error on the line
oSH = mapper.QueryForObject<StaticHeader>("GetStaticHeader", param);
Can anyone point me in the right direction.
Thanks
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our websites at:
www.rbs.com
www.rbsgc.com
www.rbsmarkets.com
***********************************************************************************