Full range of original address: http://www.cnblogs.com/firstyi/archive/2007/10/11/921116.html
: Http://ibatis.apache.org/dotnetdownloads.cgi
The latest version of ibastis. NET is available.Source codeAnd npetshop examples (the example is old)
After downloading the npetshop example, since it was originally based on vs2003, there are some problems during compilation and running after opening it with vs2005 locally. The main problems and solutions are as follows:
1. Convert to vs2005
A. Open the npetshop. sln file and click "Next" as prompted for conversion.
B. After the conversion, you cannot find the WEB Project, delete the original web project, and add the existing website to npetshop. Web.
2. modify the configuration file
The simplest way is to directly modify Dao. config in the npetshop. web directory, as shown in the following statement:
< Datasource name = " Access " Connectionstring = " Provider = Microsoft. Jet. oledb.4.0; Data Source = F: \ study \ _ net \ framework \ ibatis. Net \ npetshop. web \ npetshop. MDB " />
Change the path to your own path.
PS: npetshop. mdb is an access file under the npetshop. web directory.
3. An error is reported during compilation: circular file reference is not allowed.
Due to the difference between vs2005 and vs2003, find the file: npetshop. web \ usercontrols \ catalog \ searchproduct. ascx.
SetCode:
<% @ Register tagprefix = " Uc1 " Tagname = " Topbar " SRC = " ../Topbar. ascx " %>
<% @ Register tagprefix = " Uc1 " Tagname = " Banner " SRC = " ../Banner. ascx " %>
<% @ Register tagprefix = " PC3 " Namespace = " Npetshop. Presentation. Controls " Assembly = " Npetshop. Presentation " %>
< Uc1: banner ID = " Banner " Runat = " Server " > </ Uc1: banner >
< Uc1: topbar ID = " Topbar " Runat = " Server " > </ Uc1: topbar >
Modify:
<% @ Register tagprefix = " Uc1 " Tagname = " Topbar " SRC = " ../Topbar. ascx " %>
<% @ Register tagprefix = " UC2 " Tagname = " Banner " SRC = " ../Banner. ascx " %>
<% @ Register tagprefix = " PC3 " Namespace = " Npetshop. Presentation. Controls " Assembly = " Npetshop. Presentation " %>
< UC2: banner ID = " Banner " Runat = " Server " > </ UC2: banner >
< Uc1: topbar ID = " Topbar " Runat = " Server " > </ Uc1: topbar >
This means that the same uc1 cannot appear.
4. An error is reported during running.
After performing the preceding operations, you should be able to access the Home Page. However, a system error may be reported during running. After one-step debugging, you must manually
Npetshop. Web project add reference, reference location: npetshop \ external-bin \ bytefx. mysqlclient. dll
In this way, the npetshop example should be able to run normally.