Socut. Data. dll and aspnetpager. dll usage instructions and experiences

Source: Internet
Author: User

Socut. Data. dll and aspnetpager. dll
Usage instructions and experiences

In the past, I used to work on a Java project. Recently, I took over a project. The customer requested to use. Net for only one month. To reduce the study time, I chose socut. Data. dll as the database access control and aspnetpager. dll as the page control. In this way, my major technical obstacles are basically solved. Below are some of my experiences on using these two controls in this project.
1, controls: 1, socut. Data. dll: http://data.socut.com/
2, aspnetpager. dll: http://www.webdiyer.com/AspNetPager/default.aspx
Ii. Instructions for use
1. socut. Data. dll connection Configuration
Add the following configuration items to the Web. config Configuration:
<Deleetask>
<! -- ****************** Database settings *****************
! -Socutdatalink: Database Link parameter (automatic judgment type)
! -Access type:/directory/database name. MDB
! -SQL Server Type: uid = Account; Pwd = password; database = database; server = Server
**************************************** * ********* -->
<Add key = "socutdatalink" value = "Server = 192.168.1.100 \ oasis_zt25j; uid = dev; Pwd = mypassword; database = xxxoa"/>
I am using the sqlserver2005o database.
<! -- ***************** Component authorization code *****************
! -Socutdatakey: System Authorization code (automatically determining domain names)
**************************************** * ********* -->
<Add key = "socutdatakey" value = "nzoxnwhil2e/4pdu6/4jng ="/>
<! --*************************************** * ****** -->
</Appsettings>
I am using version 3.0 and need a component authorization code, go to 2. Control Loading
The methods for loading socut. Data. dll and aspnetpager. DLL to a project are the same. That is, right-click Microsoft Visual Studio 2005 and choose "select item…" from the shortcut menu ...", In the pop-up window, browse and find control.

Iii. process experience
The biggest advantage of using socut. Data. dll is that it is very convenient to access the database. Combined with aspnetpager. dll, I use the Repeater control as the data list display, and the interface design is simple.
Http://data.socut.com/default.aspx here? Go = video has these two video tutorials, which are simple and clear. I am very grateful to the author for his good intentions.
Next, let's take a look at my data display. Code :
Protected void showgrid ()
{// Query condition variable assignment
Sqlwhere = "where isnull (cname,'') like '% "+ cname. text + "% 'and isnull (cvalue1,'') like' % "+ cvalue1.text +" % 'and isnull (cvalue2 ,'') like '% "+ cvalue2.text +" % '";
Aspnetpager1.recordcount = (INT) socut. Data. executescalar ("select count (*) from dconst" + sqlwhere );
Dataset DS = socut. Data. executedataset ("select * From dconst" + sqlwhere + "order by cname, cserial ",
Aspnetpager1.pagesize * (aspnetpager1.currentpageindex-1), aspnetpager1.pagesize );
// Use Repeater
Repeater1.datasource = Ds;
Repeater1.databind ();
}
Of course, in the query conditions, I have made restrictions on text special character input on the client, otherwise there will be problems. It is best to use the parameter passing method, which needs to be improved. According to the input parameters of socut. Data. executedataset, she should only return records of the specified number of rows to the cache, rather than retrieving all records. This improves efficiency and reduces the burden on Web servers.
Iv. Suggestions for improvement
I found that in socut. Data. dll, cache technology is definitely used to speed up database access. However, I have updated the database for some applications and cannot retrieve the updated value immediately. We also hope to have a better solution. It is best to set a certain access operation without caching.

fireworks paradise
2007.10.26

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.