Data Shaping Technology

Source: Internet
Author: User
Tags ole
Data shaping (which can also be called Hierarchical recordsets)
If you are familiar with access, it is similar to a child table. When you use VB
Database development is the best choice for you.
This technology has a strong application environment, especially for the development of enterprise-class applications such as OLTP.
It allows you to use a tree-like structure to represent your data, so it is particularly suitable for
To display the associated data table Form to the user.
In simple terms, it has a master table (Recordset) and then
One of the fields in the master table can hold a second child table (Recordset)
Of course, in general, one of the fields in the child table (such as the primary index) and the field in the master table
is associated (relationship) so that when you execute a query, the result returns a
Multiple recordsets. This data shaping technology brings us the following benefits:
1. Performance improvement, as long as the rational use of this technology, can greatly improve
ASP connects the performance of the database program. And you don't have to show complicated
Interrelated data forms and worry about them.
2. Greatly simplifies programming: Because of the hierarchical Recordset structure it introduces,
Using the tree view to display records, you will find that you use the data shaping technology to display
The data is very beautiful.
Or the previous method, the nonsense less to say, let the code to speak put:
This example will use the example database in SQL Server, pubs
How to use data shaping programming:
The preparatory work is as follows:
1. You should install a MSDataShape OLE DB Provider (in MDAC2. More than 0 versions are available with this data source provider)
2. You should be able to write the shape language, note that this is not a general SQL statement, you can view the specific syntax
The Help file in Access.
A couple of places to pay attention to.
(i) Establishment of a MSDataShape OLE DB provider connectionstring as follows (hehe, it seems that my piece
The database connection manual can be added to the new stuff.
' This is a very common connection string, hehe, where the Kanga is actually SQL Server in Microsoft internal code
strconn = "Provider=sqloledb;data source=kanga;" &_
"Initial catalog=pubs; User Id=sa; Passwprd= "
' Well, now join the MSDataShape OLE DB provider section
strconn = "Provider=msdatashape; Data "& strconn
Well, now that you've set the data provider for MSDataShape,
Note that the data source provider is your real DSN section.
(II) Shape language
Shape syntax You can find detailed descriptions in the help of ADO, and I'm not wordy.
The most commonly used statements are as follows:
SHAPE {Parent Command} [as parent alias]
APPEND ({Child Command} [as child alias]

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.