In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
It is believed that many inexperienced people have no idea about how to download, compile and run NPetShop in iBATIS.Net application. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Download, compile, and run NPetShop for iBATIS.Net applications. First, let's start our preparatory work:
After downloading the example of NPetShop, since it was originally based on VS2003, there are some problems in compiling and running after opening it with VS2005 locally. The main problems and solutions are as follows:
1. Convert to the version of VS2005
A. Open the NPetshop.sln file directly and click "next" as prompted to convert it.
B. Cannot find the web project after conversion, delete the original web project, and then add the NPetshop.Web by adding the existing website
2. Modify the configuration file
The easiest way is to directly modify the dao.config in the NPetshop.Web directory, with the following statement:
< dataSource name= "Access" connectionString= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\ Study\ _ Net\ framework\ iBATIS.NET\ NPetshop\ NPetshop.Web\ npetshop.mdb" / >
Change the path to your own path.
PS:npetshop.mdb is an access file in the NPetshop.Web directory
3. Compilation Times error: circular file reference is not allowed
Due to the difference between VS2005 and VS2003, find the file: NPetshop.Web\ UserControls\ Catalog\ SearchProduct.ascx
The code will be as follows:
<% @ Register TagPrefix= "uc1" TagName= "TopBar" Src= ".. / TopBar.ascx"% > <% @ Register TagPrefix= "uc1" TagName= "Banner" Src= ".. / Banner.ascx"% > <% @ Register TagPrefix= "cc1" Namespace= "NPetshop.Presentation.Controls" Assembly= "NPetshop.Presentation"% > < uc1:Banner id= "Banner" runat= "server" > < / uc1:Banner > < uc1:TopBar id= "TopBar" runat= "server" > < / uc1:TopBar >
Modified to:
<% @ Register TagPrefix= "uc1" TagName= "TopBar" Src= ".. / TopBar.ascx"% > <% @ Register TagPrefix= "uc2" TagName= "Banner" Src= ".. / Banner.ascx"% > <% @ Register TagPrefix= "cc1" Namespace= "NPetshop.Presentation.Controls" Assembly= "NPetshop.Presentation"% > < uc2:Banner id= "Banner" runat= "server" > < / uc2:Banner > < uc1:TopBar id= "TopBar" runat= "server" > < / uc1:TopBar >
The main reason is that the same uc1 cannot appear.
4. Error in running the Times
After pressing the above operation, you should be able to go to the home page, but the runtime may report a system error. Through single-step debugging, it is found that you need to give it manually.
Add reference to NPetShop.Web project, reference location: NPetshop\ External-bin\ ByteFX.MySqlClient.dll
In this way, the NPetShop example should work properly.
After reading the above, have you mastered how to download, compile and run NPetShop in iBATIS.Net applications? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.