about ado call procedure

superxxx 2003-08-20 11:58:19
在用ado的command调用存储过程时,如何将一个null参数加入parameter?
因为存储过程中有些参数可以为null.

_ParameterPtr pParamIn
pParamIn.CreateInstance("ADODB.Parameter");
pParamIn->Name="test";
pParamIn->Type=adVarChar;
pParamIn->Value=NULL;//这里不可以
pParamIn->Size=0;
pParamIn->Direction=adParamInput;
cmd->Parameters->Append(pParamIn);

我的存储过程是将一传进来的参数插入一张表,这张表有些字段地可以为空的,所以我在调用存储过程时可能会传进一些空值,但是在
cmd->Parameters->Append(pParamIn);
会报错:
Source : (null)
Description : (null)
adErrInvalidParamInfo


...全文
59 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
Contents xvii Web Forms 133 Intellisense 134 Customizing the IDE 135 Customizing the Code Editor 135 Customizing Shortcut Keys 135 Customizing the Toolbars 136 Exercise 3.4 Adding a New Toolbar to the Existing Set 136 Exercise 3.5 Adding Commands to Toolbars 137 Customizing Built-In Commands 137 Exercise 3.6 Creating an Alias 138 Customizing the Start Page 139 Accessibility Options 141 Summary 142 Solutions Fast Track 142 Frequently Asked Questions 143 Chapter 4 Common Language Runtime 145 Introduction 146 Component Architecture 148 Managed Code versus Unmanaged Code 150 Interoperability with Managed Code 152 System Namespace 153 File I/O 155 Drawing 156 Printing 157 Common Type System 158 Type Casting 160 Garbage Collection 163 Object Allocation/Deallocation 164 Close/Dispose 165 Summary 166 Solutions Fast Track 167 Frequently Asked Questions 168 Developing & Deploying… Embrace Your Parameters VB.NET is insistent upon enclosing parameters of function calls within parentheses regardless of whether we are returning a value or whether we are using the Call statement. It makes the code much more readable and is a new standard for VB programmers that is consistent with the standard that nearly all other languages adopted long ago. 153_VBnet_TOC 8/16/01 1:12 PM Page xvii xviii Contents Chapter 5 .NET Programming Fundamentals 171 Introduction 172 Variables 173 Constants 175 Structures 176 Program Flow Control 178 If…Then…Else 178 Select Case 182 While Loops 184 For Loops 186 Arrays 187 Declaring an Array 188 Multidimensional Arrays 189 Dynamic Arrays 191 Functions 192 Object Oriented Programming 196 Inheritance 196 Polymorphism 197 Encapsulation 197 Classes 198 Adding Properties 198 Adding Methods 200 System.Object 201 Constructors 201 Overloading 202 Overriding 203 Shared Members 205 String Handling 206 Error Handling 210 Summary 213 Solutions Fast Track 214 Frequently Asked Questions 217 NOTE When porting Visual Basic applications to Visual Basic .NET, be careful of the lower bounds of arrays. If you are using a for loop to iterate through the array, and it is hard-coded to initialize the counter at 1, the first element will be skipped. Remember that all arrays start with the index of 0. 153_VBnet_TOC 8/16/01 1:12 PM Page xviii Contents xix Chapter 6 Advanced Programming Concepts 219 Introduction 220 Using Modules 221 Utilizing Namespaces 222 Creating Namespaces 222 Understanding the Imports Keyword 226 Implementing Interfaces 229 Delegates and Events 232 Simple Delegates 235 Multicast Delegates 236 Event Programming 236 Handles Keyword 236 Language Interoperability 237 File Operations 239 Directory Listing 239 Data Files 241 Text Files 243 Appending to Files 246 Collections 246 The Drawing Namespace 248 Images 253 Printing 256 Understanding Free Threading 262 SyncLock 263 Summary 265 Solutions Fast Track 265 Frequently Asked Questions 267 Chapter 7 Creating Windows Forms 269 Introduction 270 Application Model 270 Properties 271 Manipulating Windows Forms 275 Properties of Windows Forms 275 Methods of Windows Forms 276 Creating Windows Forms 287 What Are Collections? Collectionsare groups of like objects. Collections are similar to arrays, but they don’t have to be redimensioned. You can use the Addmethod to add objects to a collection. Collections take a little more code to create than arrays do, and sometimes accessing a collection can be a bit slower than an array, but they offer significant advantages because a collection is a group of objects whereby an array is a data type. 153_VBnet_TOC 8/16/01 1:12 PM Page xix xx Contents Displaying Modal Forms 288 Displaying Modeless Forms 289 Displaying Top-Most Forms 289 Changing the Borders of a Form 289 Resizing Forms 291 Setting Location of Forms 292 Form Events 294 Creating Multiple Document Interface Applications 297 Creating an MDI Parent Form 297 Creating MDI Child Forms 298 Exercise 7.1 Creating an MDI Child Form 298 Determining the Active MDI Child Form 299 Arranging MDI Child Forms 299 Adding Controls to Forms 300 Anchoring Controls on Forms 301 Docking Controls on Forms 303 Layering Objects on Forms 304 Positioning Controls on Forms 304 Dialog Boxes 305 Displaying Message Boxes 306 Common Dialog Boxes 306 The OpenFileDialog Control 306 The SaveFileDialog Control 309 The FontDialog Control 311 The ColorDialog Control 313 The PrintDialog Control 315 The PrintPreviewDialog Control 316 The PageSetupDialog Control 321 Creating Dialog Boxes 322 Creating and Working with Menus 323 Adding Menus to a Form 323 Exercise 7.2 Adding a Menu to a Form at Design Time 323 Creating Dialog Boxes 1.Create a form. 2.Set the BorderStyle property of the form to FixedDialog. 3.Set the ControlBox, MinimizeBox, and MaximizeBox properties of the form to False. 4.Customize the appearance of the form appropriately. 5.Customize event handlers in the Code window appropriately. 153_VBnet_TOC 8/16/01 1:12 PM Page xx Contents xxi Dynamically Creating Menus 326 Exercise 7.3 Adding a Menu to a Form at Design Time 326 Adding Status Bars to Forms 328 Adding Toolbars to Forms 330 Data Binding 332 Simple Data Binding 332 Complex Data Binding 333 Data Sources for Data Binding 333 Using the Data Form Wizard 334 Using the Windows Forms Class Viewer 338 Using the Windows Forms ActiveX Control Importer 338 Summary 340 Solutions Fast Track 340 Frequently Asked Questions 344 Chapter 8 Windows Forms Components and Controls 347 Introduction 348 Built-In Controls 348 Label Control 351 LinkLabel Control 354 TextBox Control 357 Button Control 361 CheckBox Control 364 RadioButton Control 365 RichTextBox Control 367 TreeView Control 369 ListBox Control 371 CheckedListBox Control 374 ListView Control 376 ComboBox Control 381 DomainUpDown Control 384 NumericUpDown Control 386 PictureBox Control 388 TrackBar Control 389 Adding Items to a Combo Box at Design-Time 1.Select the ComboBox control on the form. 2.If necessary, use the Viewmenu to open the Properties window. 3.In the Properties window, click the Itemsproperty, then click the ellipsis. 4.In String Collection Editor, type the first item, then press Enter. 5.Type the next items, pressing Enterafter each item. 6.Click OK. 153_VBnet_TOC 8/16/01 1:13 PM Page xxi xxii Contents DateTimePicker Control 391 Panel Control 394 GroupBox Control 396 TabControl Control 397 Creating Custom Windows Components 399 Exercise 8.1:Creating a Custom Windows Component 399 Creating Custom Windows Controls 403 Exercise 8.2:Creating a Custom Windows Control 404 Summary 407 Solutions Fast Track 407 Frequently Asked Questions 408 Chapter 9 Using ADO.NET 409 Introduction 410 Overview of XML 411 XML Documents 411 XSL 411 XDR 412 XPath 412 Understanding ADO.NET Architecture 412 Differences between ADO and ADO.NET 414 XML Support 414 ADO.NET Configuration 415 Remoting in ADO.NET 415 Maintaining State 415 Using the XML Schema Definition Tool 416 Connected Layer 417 DataProviders 418 Connection Strings 418 Exercise 9.1 Creating a Connection String 419 Command Objects 421 DataReader 425 DataSet 426 XML Documents XML documents are the heart of the XML standard. An XML document has at least one element that is delimited with one start tag and one end tag. XML documents are similar to HTML, except that the tags are made up by the author. 153_VBnet_TOC 8/16/01 1:13 PM Page xxii Contents xxiii Disconnected Layer 427 Using DataSet 428 Relational Schema 428 Collection of Tables 430 Data States 431 Populating with the DataSet Command 432 Populating with XML 433 Populating Programmatically 434 Using the SQL Server Data Provider 435 TDS 436 Exercise 9.2 Using TypedDataSet 437 Remoting 439 Data Controls 440 DataGrid 440 Exercise 9.3 Using TypedDataSet and DataRelation 441 DataList 446 Repeater 450 Summary 454 Solutions Fast Track 454 Frequently Asked Questions 457 Chapter 10 Developing Web Applications 459 Introduction 460 Web Forms 461 A Simple Web Form 462 Exercise 10.1 Creating a Simple Web Form 462 How Web Forms Differ from Windows Forms 464 Why Web Forms Are Better Than Classic ASP 465 Adding Controls to Web Forms 467 Exercise 10.2 Adding Web Controls to a Web Form 468 Code Behind 473 NOTE Web form controls not only detect browsers such as Internet Explorer and Netscape, but they also detect devices such as Palm Pilots and cell phones and generate appropriate HTML accordingly. 153_VBnet_TOC 8/16/01 1:13 PM Page xxiii xxiv Contents How Web Form Controls Differ from Windows Form Controls 476 ASP.NET Server Controls 476 Intrinsic Controls 476 Bound Controls 478 Exercise 10.3 Using the DataGrid Control 478 Exercise 10.4 Customizing DataGrid Control 482 Custom Controls 487 Validation Controls 488 Exercise 10.5 Using the Validation Controls 489 Creating Custom Web Form Controls 492 Exercise 10.6 A Simple Custom Control 493 Exercise 10.7 Creating a Composite Custom Control 497 Web Services 504 How Web Services Work 505 Developing Web Services 505 Exercise 10.8 Developing Web Services 507 Web Service Utilities 509 Service Description Language 509 Discovery 510 Proxy Class 510 Consuming Web Services from Web Forms 511 Exercise 10.9 Consuming Web Services from Web Forms 511 Using Windows Forms in Distributed Applications 513 Exercise 10.10 Consuming Web Services from Windows Forms 514 Exercise 10.11 Developing a Sample Application 516 Summary 519 Solutions Fast Track 519 Frequently Asked Questions 521 153_VBnet_TOC 8/16/01 1:13 PM Page xxiv Contents xxv Chapter 11 Optimizing, Debugging, and Testing 523 Introduction 524 Debugging Concepts 524 Debug Menu 528 Watches 529 Breakpoints 531 Exceptions Window 532 Command Window 534 Conditional Compilation 536 Trace 538 Assertions 540 Code Optimization 541 Finalization 542 Transitions 542 Parameter Passing Methods 542 Strings 543 Garbage Collection 544 Compiler Options 544 Optimization Options 544 Output File Options 544 .NET Assembly Options 545 Preprocessor Options 546 Miscellaneous Options 546 Testing Phases and Strategies 546 Unit Testing 547 Integration Testing 547 Beta Testing 547 Regression Testing 548 Stress Testing 548 Monitoring Performance 548 Summary 550 Solutions Fast Track 551 Frequently Asked Questions 552 What Are Watches? Watchesprovide us with a mechanism where we can interact with the actual data that is stored in our programs at runtime. They allow us to see the values of variables and the values of properties on objects. In addition to being able to view these values, you can also assign new values. 153_VBnet_TOC 8/16/01 1:13 PM Page xxv xxvi Contents Chapter 12 Security 553 Introduction 554 Security Concepts 555 Permissions 555 Principal 556 Authentication 557 Authorization 557 Security Policy 558 Type Safety 558 Code Access Security 558 .NET Code Access Security Model 559 Stack Walking 559 Code Identity 561 Code Groups 562 Declarative and Imperative Security 564 Requesting Permissions 565 Demanding Permissions 570 Overriding Security Checks 572 Custom Permissions 576 Role-Based Security 578 Principals 578 WindowsPrincipal 579 GenericPrincipal 580 Manipulating Identity 581 Role-Based Security Checks 583 Security Policies 585 Creating a New Permission Set 588 Modifying the Code Group Structure 593 Remoting Security 600 Cryptography 600 Security Tools 603 Summary 606 Solutions Fast Track 607 Frequently Asked Questions 611 Within the .NET Framework, Three Namespaces Involve Cryptography 1.System.Security .CryptographyThe most important one; resembles the CryptoAPI functionalities. 2.System.Security .Cryptography.X509 certificatesRelates only to the X509 v3 certificate used with Authenticode. 3.System.Security .Cryptography.XmlFor exclusive use within the .NET Framework security system. 153_VBnet_TOC 8/16/01 1:13 PM Page xxvi Contents xxvii Chapter 13 Application Deployment 615 Introduction 616 Packaging Code 617 Configuring the .NET Framework 622 Creating Configuration Files 622 Machine/Administrator Configuration Files 623 Application Configuration Files 625 Security Configuration Files 626 Deploying the Application 629 Common Language Runtime 629 Windows Installer 630 CAB Files 631 Internet Explorer 5.5 632 Resource Files 633 Deploying Controls 637 Summary 639 Solutions Fast Track 640 Frequently Asked Questions 642 Chapter 14 Upgrading Visual Basic Applications to .NET 647 Introduction 648 Considerations Before Upgrading 648 Early Binding of Variables 649 Avoiding Null Propagation 650 Using ADO 651 Using Date Data Type 652 Using Constants 652 Considering Architecture Before Migration 653 Intranet/Internet Applications 653 Internet Information Server (IIS) Applications 654 DHTML Applications 655 ActiveX Documents 655 Client/Server and Multi-Tier Applications 655 Single-Tier Applications 656 Data Access Applications 656 WARNING You should under no circumstance edit the Security.config and Enterprise.config files directly. It is very easy to compromise the integrity of these files. Always use the Code Access Security Policy utility (caspol.exe) or the .NET Configuration tool; these will guard the integrity of the files and will also make a backup copy of the last saved version. 153_VBnet_TOC 8/16/01 1:13 PM Page xxvii xxviii Contents Data Types 657 Variants 657 Integers 658 Dates 658 Boolean 659 Arrays 659 Fixed-Length Strings 660 Windows API Data Types 661 Converting VB Forms to Windows Forms 662 Control Anchoring 664 Keyword Changes 665 Goto 666 GoSub 666 Option Base 666 AND/OR 666 Lset 666 VarPtr 667 StrPtr 667 Def 667 Programming Differences 668 Method Implementation 668 Optional Parameters 668 Static Modifier 669 Return Statement 669 Procedure Calls 670 External Procedure Declaration 671 Passing Parameters 672 ParamArray 672 Overloading 674 References to Unmanaged Libraries 677 Metadata 679 Runtime Callable Wrapper 681 COM Callable Wrapper 682 Properties 684 Working with Property Procedures 684 Control Property Name Changes 685 Default Property 687 Avoiding Null Propagation Nullpropagation means that if Null is used in an expression, the resulting expression is always Null. In previous versions of Visual Basic, the Null value disseminated throughout the expression. 153_VBnet_TOC 8/16/01 1:13 PM Page xxviii Contents xxix Null Usage 690 Understanding Error Handling 690 Exercise 14.1:Using Error Handling 692 Data Access Changes in Visual Basic .NET 693 Dataset and Recordset 694 Application Interoperability 694 Cursor Location 695 Disconnected Access 695 Data Navigation 695 Lock Implementation 696 Upgrading Interfaces 696 Upgrading Interfaces from Visual Basic 6.0 699 Using the Upgrade Tool 703 Exercise 14.2 Using the Upgrade Wizard 703 Summary 708 Solutions Fast Track 709 Frequently Asked Questions 712 Index 713 Contents xiii From the Series Editor xxxi Chapter 1 New Features in Visual Basic .NET 1 Introduction 2 Examining the New IDE 3 Cosmetic Improvements 3 Development Accelerators 5 .NET Framework 6 A Very Brief and Simplified History 6 .NET Architecture 7 ASP.NET 7 Framework Classes 8 .NET Servers 8 Common Language Runtime 8 History 8 Convergence 9 Object-Oriented Language 10 Object-Oriented Concepts 10 Advantages of Object-Oriented Design 11 History of Object Orientation and VB 13 Namespaces 13 Web Applications 13 Web Applications Overview 13 Web Forms 14 Web Services 15 HyperText Transport Protocol 16 Simple Object Access Protocol 17 .NET Architecture .NET Framework ASP.NET Updated ASP Engine Web Forms Engine Framework Classes System.Math, System.Io, System.Data, Etc. Common Language Runtime Memory Management Common Type System Garbage Collection .NET .NET Servers 153_VBnet_TOC 8/16/01 1:12 PM Page xiii xiv Contents Security 17 Type Safety 18 Casting 18 Data Conversion 19 Bitwise Operations 20 New Compiler 20 Compiling an Executable 20 Architecture 21 File Management in Previous Versions of VB 21 File Management 22 Changes from Visual Basic 6.0 23 Variants 23 Variable Lower Bounds 23 Fixed Length Strings 23 NULL Propagation 23 Other Items Removed 24 Function Values 24 Short Circuits 25 Properties and Variables 25 Variable Lengths 25 Get and Set 26 Date Type 26 Default Properties 27 Summary 28 Solutions Fast Track 28 Frequently Asked Questions 31 Chapter 2 The Microsoft .NET Framework 33 Introduction 34 What Is the .NET Framework? 34 Introduction to the Common Language Runtime 35 Using .NET-Compliant Programming Languages 37 Creating Assemblies 39 Using the Manifest 42 Compiling Assemblies 45 Assembly Cache 45 Locating an Assembly 45 153_VBnet_TOC 8/16/01 1:12 PM Page xiv Contents xv Private Assembly Files 51 Shared Assembly Files 51 Understanding Metadata 51 The Benefits of Metadata 52 Identifying an Assembly with Metadata 53 Types 53 Defining Members 54 Using Contracts 54 Assembly Dependencies 55 Unmanaged Assembly Code 55 Reflection 56 Attributes 57 Ending DLL Hell 58 Side-by-Side Deployment 58 Versioning Support 59 Using System Services 60 Exception Handling 60 StackTrace 61 InnerException 61 Message 61 HelpLink 62 Garbage Collection 62 Console I/O 62 Microsoft Intermediate Language 63 The Just-In-Time Compiler 63 Using the Namespace System to Organize Classes 64 The Common Type System 65 Type Safety 68 Relying on Automatic Resource Management 68 The Managed Heap 69 Garbage Collection and the Managed Heap 71 Assigning Generations 77 Utilizing Weak References 77 Security Services 79 Framework Security 80 Granting Permissions 81 NOTE Visualization is still key! Die-hard VB programmers may find themselves having a hard time visualizing all the new concepts in VB.NET (and we all know that proper logic visualization plays a big role in what we do). Something that may help is to think about VB.NET as a completely flexible language that can accommodate Web, console, and desktop use. 153_VBnet_TOC 8/16/01 1:12 PM Page xv xvi Contents Gaining Representation through a Principal 82 Security Policy 83 Summary 85 Solutions Fast Track 85 Frequently Asked Questions 88 Chapter 3 Installing and Configuring VB.NET 91 Introduction 92 Editions 92 Installing Visual Studio .NET 93 Exercise 3.1:Installing Visual Studio .NET 94 Installing on Windows 2000 99 The New IDE 100 Integrated Development Environment Automation Model 100 Add-Ins 104 Exercise 3.2 Creating an Add-In Using the Add-In Wizard 105 Wizards 109 Macros 109 Home Page 110 Project Options 112 Toolbox 116 Child Windows 120 Window Types 122 Arranging Windows 123 Task List 123 Exercise 3.3 Setting Up a Custom Token 124 TaskList Views 124 Locating Code 126 Annotating Code 126 Solution Explorer 127 Properties Window 129 Form Layout Toolbar 130 Hide/Show Code Elements 132 Installing Visual Studio .NET IPhase 1: Installing Windows components IPhase 2: Installing Visual Studio .NET IPhase 3: Checking for service releases 153_VBnet_TOC 8/16/01 1:12 PM Page xvi
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main productdocumentation, and supersedes information contained in otherdocuments, including previously installed release notes.Borland recommends that you read this file in its entirety.NOTE: If you are updating a localized version of Delphi 7, visit the Borland Registered User web site to obtain a localized readme file that may contain important late- breaking information not included in this readme file.IMPORTANT: Delphi must be closed before installing this update. =====================================================CONTENTS * INSTALLING THIS UPDATE * UPDATING LOCALIZED VERSIONS OF DELPHI 7 * KNOWN ISSUES * ISSUES ADDRESSED BY THIS UPDATE - IDE - CORE DATABASE - DATASNAP - DBGO (ADO COMPONENTS) - dbExpress - dbExpress COMPONENTS AND DB VCL - dbExpress CORE DRIVER AND METADATA - dbExpress VENDOR ISSUES - dbExpress CERTIFICATION - WEB SNAP - ACTIVEX - COMPILER - RTL - VCL - THIRD PARTY - BOLD FOR DELPHI * VERIFYING THAT THE UPDATE WAS SUCCESSFUL * FILES INSTALLED BY THIS UPDATE =======================================================INSTALLING THIS UPDATE* This update can not be applied to Delphi 7 Architect Trial version. * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and launch the d7_ent_upd1.exe file appropriate for your locale.* To install this update from the Web, double-click the self-executing installation file and follow the prompts. * The Delphi 7 documentation PDF files are available on the update CD.========================================================UPDATING LOCALIZED VERSIONS OF DELPHI 7* This update can be applied only to the English version of Delphi 7. There are separate updates for the German, French and Japanese ver
Contents Overview 1 Lesson 1: Concepts – Locks and Lock Manager 3 Lesson 2: Concepts – Batch and Transaction 31 Lesson 3: Concepts – Locks and Applications 51 Lesson 4: Information Collection and Analysis 63 Lesson 5: Concepts – Formulating and Implementing Resolution 81 Module 4: Troubleshooting Locking and Blocking Overview At the end of this module, you will be able to:  Discuss how lock manager uses lock mode, lock resources, and lock compatibility to achieve transaction isolation.  Describe the various transaction types and how transactions differ from batches.  Describe how to troubleshoot blocking and locking issues.  Analyze the output of blocking scripts and Microsoft® SQL Server™ Profiler to troubleshoot locking and blocking issues.  Formulate hypothesis to resolve locking and blocking issues. Lesson 1: Concepts – Locks and Lock Manager This lesson outlines some of the common causes that contribute to the perception of a slow server. What You Will Learn After completing this lesson, you will be able to:  Describe locking architecture used by SQL Server.  Identify the various lock modes used by SQL Server.  Discuss lock compatibility and concurrent access.  Identify different types of lock resources.  Discuss dynamic locking and lock escalation.  Differentiate locks, latches, and other SQL Server internal “locking” mechanism such as spinlocks and other synchronization objects. Recommended Reading  Chapter 14 “Locking”, Inside SQL Server 2000 by Kalen Delaney  SOX000821700049 – SQL 7.0 How to interpret lock resource Ids  SOX000925700237 – TITLE: Lock escalation in SQL 7.0  SOX001109700040 – INF: Queries with PREFETCH in the plan hold lock until the end of transaction Locking Concepts Delivery Tip Prior to delivering this material, test the class to see if they fully understand the different isolation levels. If the class is not confident in their understanding, review appendix A04_Locking and its accompanying PowerPoint® file. Transactions in SQL Server provide the ACID properties: Atomicity A transaction either commits or aborts. If a transaction commits, all of its effects remain. If it aborts, all of its effects are undone. It is an “all or nothing” operation. Consistency An application should maintain the consistency of a database. For example, if you defer constraint checking, it is your responsibility to ensure that the database is consistent. Isolation Concurrent transactions are isolated from the updates of other incomplete transactions. These updates do not constitute a consistent state. This property is often called serializability. For example, a second transaction traversing the doubly linked list mentioned above would see the list before or after the insert, but it will see only complete changes. Durability After a transaction commits, its effects will persist even if there are system failures. Consistency and isolation are the most important in describing SQL Server’s locking model. It is up to the application to define what consistency means, and isolation in some form is needed to achieve consistent results. SQL Server uses locking to achieve isolation. Definition of Dependency: A set of transactions can run concurrently if their outputs are disjoint from the union of one another’s input and output sets. For example, if T1 writes some object that is in T2’s input or output set, there is a dependency between T1 and T2. Bad Dependencies These include lost updates, dirty reads, non-repeatable reads, and phantoms. ANSI SQL Isolation Levels An isolation level determines the degree to which data is isolated for use by one process and guarded against interference from other processes. Prior to SQL Server 7.0, REPEATABLE READ and SERIALIZABLE isolation levels were synonymous. There was no way to prevent non-repeatable reads while not preventing phantoms. By default, SQL Server 2000 operates at an isolation level of READ COMMITTED. To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ISOLATION LEVEL statement. To determine the transaction isolation level currently set, use the DBCC USEROPTIONS statement, for example: USE pubs GO SET TRANSACTION ISOLATION LEVEL REPEATABLE READ GO DBCC USEROPTIONS GO Multigranular Locking Multigranular Locking In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have exclusive access to the resource. In this scenario, since T1 believes it locks the entire table, it might inadvertently make changes to the same row that T2 thought it has locked exclusively. In a multigranular locking environment, there must be a way to effectively overcome this scenario. Intent lock is the answer to this problem. Intent Lock Intent Lock is the term used to mean placing a marker in a higher-level lock queue. The type of intent lock can also be called the multigranular lock mode. An intent lock indicates that SQL Server wants to acquire a shared (S) lock or exclusive (X) lock on some of the resources lower down in the hierarchy. For example, a shared intent lock placed at the table level means that a transaction intends on placing shared (S) locks on pages or rows within that table. Setting an intent lock at the table level prevents another transaction from subsequently acquiring an exclusive (X) lock on the table containing that page. Intent locks improve performance because SQL Server examines intent locks only at the table level to determine whether a transaction can safely acquire a lock on that table. This removes the requirement to examine every row or page lock on the table to determine whether a transaction can lock the entire table. Lock Mode The code shown in the slide represents how the lock mode is stored internally. You can see these codes by querying the master.dbo.spt_values table: SELECT * FROM master.dbo.spt_values WHERE type = N'L' However, the req_mode column of master.dbo.syslockinfo has lock mode code that is one less than the code values shown here. For example, value of req_mode = 3 represents the Shared lock mode rather than the Schema Modification lock mode. Lock Compatibility These locks can apply at any coarser level of granularity. If a row is locked, SQL Server will apply intent locks at both the page and the table level. If a page is locked, SQL Server will apply an intent lock at the table level. SIX locks imply that we have shared access to a resource and we have also placed X locks at a lower level in the hierarchy. SQL Server never asks for SIX locks directly, they are always the result of a conversion. For example, suppose a transaction scanned a page using an S lock and then subsequently decided to perform a row level update. The row would obtain an X lock, but now the page would require an IX lock. The resultant mode on the page would be SIX. Another type of table lock is a schema stability lock (Sch-S) and is compatible with all table locks except the schema modification lock (Sch-M). The schema modification lock (Sch-M) is incompatible with all table locks. Locking Resources Delivery Tip Note the differences between Key and Key Range locks. Key Range locks will be covered in a couple of slides. SQL Server can lock these resources: Item Description DB A database. File A database file Index An entire index of a table. Table An entire table, including all data and indexes. Extent A contiguous group of data pages or index pages. Page An 8-KB data page or index page. Key Row lock within an index. Key-range A key-range. Used to lock ranges between records in a table to prevent phantom insertions or deletions into a set of records. Ensures serializable transactions. RID A Row Identifier. Used to individually lock a single row within a table. Application A lock resource defined by an application. The lock manager knows nothing about the resource format. It simply compares the 'strings' representing the lock resources to determine whether it has found a match. If a match is found, it knows that resource is already locked. Some of the resources have “sub-resources.” The followings are sub-resources displayed by the sp_lock output: Database Lock Sub-Resources: Full Database Lock (default) [BULK-OP-DB] – Bulk Operation Lock for Database [BULK-OP-LOG] – Bulk Operation Lock for Log Table Lock Sub-Resources: Full Table Lock (default) [UPD-STATS] – Update statistics Lock [COMPILE] – Compile Lock Index Lock sub-Resources: Full Index Lock (default) [INDEX_ID] – Index ID Lock [INDEX_NAME] – Index Name Lock [BULK_ALLOC] – Bulk Allocation Lock [DEFRAG] – Defragmentation Lock For more information, see also… SOX000821700049 SQL 7.0 How to interpret lock resource Ids Lock Resource Block The resource type has the following resource block format: Resource Type (Code) Content DB (2) Data 1: sub-resource; Data 2: 0; Data 3: 0 File (3) Data 1: File ID; Data 2: 0; Data 3: 0 Index (4) Data 1: Object ID; Data 2: sub-resource; Data 3: Index ID Table (5) Data 1: Object ID; Data 2: sub-resource; Data 3: 0. Page (6) Data 1: Page Number; Data 3: 0. Key (7) Data 1: Object ID; Data 2: Index ID; Data 3: Hashed Key Extent (8) Data 1: Extent ID; Data 3: 0. RID (9) Data 1: RID; Data 3: 0. Application (10) Data 1: Application resource name The rsc_bin column of master..syslockinfo contains the resource block in hexadecimal format. For an example of how to decode value from this column using the information above, let us assume we have the following value: 0x000705001F83D775010002014F0BEC4E With byte swapping within each field, this can be decoded as: Byte 0: Flag – 0x00 Byte 1: Resource Type – 0x07 (Key) Byte 2-3: DBID – 0x0005 Byte 4-7: ObjectID – 0x 75D7831F (1977058079) Byte 8-9: IndexID – 0x0001 Byte 10-16: Hash Key value – 0x 02014F0BEC4E For more information about how to decode this value, see also… Inside SQL Server 2000, pages 803 and 806. Key Range Locking Key Range Locking To support SERIALIZABLE transaction semantics, SQL Server needs to lock sets of rows specified by a predicate, such as WHERE salary BETWEEN 30000 AND 50000 SQL Server needs to lock data that does not exist! If no rows satisfy the WHERE condition the first time the range is scanned, no rows should be returned on any subsequent scans. Key range locks are similar to row locks on index keys (whether clustered or not). The locks are placed on individual keys rather than at the node level. The hash value consists of all the key components and the locator. So, for a nonclustered index over a heap, where columns c1 and c2 where indexed, the hash would contain contributions from c1, c2 and the RID. A key range lock applied to a particular key means that all keys between the value locked and the next value would be locked for all data modification. Key range locks can lock a slightly larger range than that implied by the WHERE clause. Suppose the following select was executed in a transaction with isolation level SERIALIZABLE: SELECT * FROM members WHERE first_name between ‘Al’ and ‘Carl’ If 'Al', 'Bob', and 'Dave' are index keys in the table, the first two of these would acquire key range locks. Although this would prevent anyone from inserting either 'Alex' or 'Ben', it would also prevent someone from inserting 'Dan', which is not within the range of the WHERE clause. Prior to SQL Server 7.0, page locking was used to prevent phantoms by locking the entire set of pages on which the phantom would exist. This can be too conservative. Key Range locking lets SQL Server lock only a much more restrictive area of the table. Impact Key-range locking ensures that these scenarios are SERIALIZABLE:  Range scan query  Singleton fetch of nonexistent row  Delete operation  Insert operation However, the following conditions must be satisfied before key-range locking can occur:  The transaction-isolation level must be set to SERIALIZABLE.  The operation performed on the data must use an index range access. Range locking is activated only when query processing (such as the optimizer) chooses an index path to access the data. Key Range Lock Mode Again, the req_mode column of master.dbo.syslockinfo has lock mode code that is one less than the code values shown here. Dynamic Locking When modifying individual rows, SQL Server typically would take row locks to maximize concurrency (for example, OLTP, order-entry application). When scanning larger volumes of data, it would be more appropriate to take page or table locks to minimize the cost of acquiring locks (for example, DSS, data warehouse, reporting). Locking Decision The decision about which unit to lock is made dynamically, taking many factors into account, including other activity on the system. For example, if there are multiple transactions currently accessing a table, SQL Server will tend to favor row locking more so than it otherwise would. It may mean the difference between scanning the table now and paying a bit more in locking cost, or having to wait to acquire a more coarse lock. A preliminary locking decision is made during query optimization, but that decision can be adjusted when the query is actually executed. Lock Escalation When the lock count for the transaction exceeds and is a multiple of ESCALATION_THRESHOLD (1250), the Lock Manager attempts to escalate. For example, when a transaction acquired 1250 locks, lock manager will try to escalate. The number of locks held may continue to increase after the escalation attempt (for example, because new tables are accessed, or the previous lock escalation attempts failed due to incompatible locks held by another spid). If the lock count for this transaction reaches 2500 (1250 * 2), Lock Manager will attempt escalation again. The Lock Manager looks at the lock memory it is using and if it is more than 40 percent of SQL Server’s allocated buffer pool memory, it tries to find a scan (SDES) where no escalation has already been performed. It then repeats the search operation until all scans have been escalated or until the memory used drops under the MEMORY_LOAD_ESCALATION_THRESHOLD (40%) value. If lock escalation is not possible or fails to significantly reduce lock memory footprint, SQL Server can continue to acquire locks until the total lock memory reaches 60 percent of the buffer pool (MAX_LOCK_RESOURCE_MEMORY_PERCENTAGE=60). Lock escalation may be also done when a single scan (SDES) holds more than LOCK_ESCALATION_THRESHOLD (765) locks. There is no lock escalation on temporary tables or system tables. Trace Flag 1211 disables lock escalation. Important Do not relay this to the customer without careful consideration. Lock escalation is a necessary feature, not something to be avoided completely. Trace flags are global and disabling lock escalation could lead to out of memory situations, extremely poor performing queries, or other problems. Lock escalation tracing can be seen using the Profiler or with the general locking trace flag, -T1200. However, Trace Flag 1200 shows all lock activity so it should not be usable on a production system. For more information, see also… SOX000925700237 “TITLE: SQL 7.0 Lock escalation in SQL 7.0” Lock Timeout Application Lock Timeout An application can set lock timeout for a session with the SET option: SET LOCK_TIMEOUT N where N is a number of milliseconds. A value of -1 means that there will be no timeout, which is equivalent to the version 6.5 behavior. A value of 0 means that there will be no waiting; if a process finds a resource locked, it will generate error message 1222 and continue with the next statement. The current value of LOCK_TIMEOUT is stored in the global variable @@lock_timeout. Note After a lock timeout any transaction containing the statement, is rolled back or canceled by SQL Server 2000 (bug#352640 was filed). This behavior is different from that of SQL Server 7.0. With SQL Server 7.0, the application must have an error handler that can trap error 1222 and if an application does not trap the error, it can proceed unaware that an individual statement within a transaction has been canceled, and errors can occur because statements later in the transaction may depend on the statement that was never executed. Bug#352640 is fixed in hotfix build 8.00.266 whereby a lock timeout will only Internal Lock Timeout At time, internal operations within SQL Server will attempt to acquire locks via lock manager. Typically, these lock requests are issued with “no waiting.” For example, the ghost record processing might try to clean up rows on a particular page, and before it can do that, it needs to lock the page. Thus, the ghost record manager will request a page lock with no wait so that if it cannot lock the page, it will just move on to other pages; it can always come back to this page later. If you look at SQL Profiler Lock: Timeout events, internal lock timeout typically have a duration value of zero. Lock Duration Lock Mode and Transaction Isolation Level For REPEATABLE READ transaction isolation level, update locks are held until data is read and processed, unless promoted to exclusive locks. "Data is processed" means that we have decided whether the row in question matched the search criteria; if not then the update lock is released, otherwise, we get an exclusive lock and make the modification. Consider the following query: use northwind go dbcc traceon(3604, 1200, 1211) -- turn on lock tracing -- and disable escalation go set transaction isolation level repeatable read begin tran update dbo.[order details] set discount = convert (real, discount) where discount = 0.0 exec sp_lock Update locks are promoted to exclusive locks when there is a match; otherwise, the update lock is released. The sp_lock output verifies that the SPID does not hold any update locks or shared locks at the end of the query. Lock escalation is turned off so that exclusive table lock is not held at the end. Warning Do not use trace flag 1200 in a production environment because it produces a lot of output and slows down the server. Trace flag 1211 should not be used unless you have done extensive study to make sure it helps with performance. These trace flags are used here for illustration and learning purposes only. Lock Ownership Most of the locking discussion in this lesson relates to locks owned by “transactions.” In addition to transaction, cursor and session can be owners of locks and they both affect how long locks are held. For every row that is fetched, when SCROLL_LOCKS option is used, regardless of the state of a transaction, a cursor lock is held until the next row is fetched or when the cursor is closed. Locks owned by session are outside the scope of a transaction. The duration of these locks are bounded by the connection and the process will continue to hold these locks until the process disconnects. A typical lock owned by session is the database (DB) lock. Locking – Read Committed Scan Under read committed isolation level, when database pages are scanned, shared locks are held when the page is read and processed. The shared locks are released “behind” the scan and allow other transactions to update rows. It is important to note that the shared lock currently acquired will not be released until shared lock for the next page is successfully acquired (this is commonly know as “crabbing”). If the same pages are scanned again, rows may be modified or deleted by other transactions. Locking – Repeatable Read Scan Under repeatable read isolation level, when database pages are scanned, shared locks are held when the page is read and processed. SQL Server continues to hold these shared locks, thus preventing other transactions to update rows. If the same pages are scanned again, previously scanned rows will not change but new rows may be added by other transactions. Locking – Serializable Read Scan Under serializable read isolation level, when database pages are scanned, shared locks are held not only on rows but also on scanned key range. SQL Server continues to hold these shared locks until the end of transaction. Because key range locks are held, not only will this prevent other transactions from modifying the rows, no new rows can be inserted. Prefetch and Isolation Level Prefetch and Locking Behavior The prefetch feature is available for use with SQL Server 7.0 and SQL Server 2000. When searching for data using a nonclustered index, the index is searched for a particular value. When that value is found, the index points to the disk address. The traditional approach would be to immediately issue an I/O for that row, given the disk address. The result is one synchronous I/O per row and, at most, one disk at a time working to evaluate the query. This does not take advantage of striped disk sets. The prefetch feature takes a different approach. It continues looking for more record pointers in the nonclustered index. When it has collected a number of them, it provides the storage engine with prefetch hints. These hints tell the storage engine that the query processor will need these particular records soon. The storage engine can now issue several I/Os simultaneously, taking advantage of striped disk sets to execute multiple operations simultaneously. For example, if the engine is scanning a nonclustered index to determine which rows qualify but will eventually need to visit the data page as well to access columns that are not in the index, it may decide to submit asynchronous page read requests for a group of qualifying rows. The prefetch data pages are then revisited later to avoid waiting for each individual page read to complete in a serial fashion. This data access path requires that a lock be held between the prefetch request and the row lookup to stabilize the row on the page so it is not to be moved by a page split or clustered key update. For our example, the isolation level of the query is escalated to REPEATABLE READ, overriding the transaction isolation level. With SQL Server 7.0 and SQL Server 2000, portions of a transaction can execute at a different transaction isolation level than the entire transaction itself. This is implemented as lock classes. Lock classes are used to control lock lifetime when portions of a transaction need to execute at a stricter isolation level than the underlying transaction. Unfortunately, in SQL Server 7.0 and SQL Server 2000, the lock class is created at the topmost operator of the query and hence released only at the end of the query. Currently there is no support to release the lock (lock class) after the row has been discarded or fetched by the filter or join operator. This is because isolation level can be set at the query level via a lock class, but no lower. Because of this, locks acquired during the query will not be released until the query completes. If prefetch is occurring you may see a single SPID that holds hundreds of Shared KEY or PAG locks even though the connection’s isolation level is READ COMMITTED. Isolation level can be determined from DBCC PSS output. For details about this behavior see “SOX001109700040 INF: Queries with PREFETCH in the plan hold lock until the end of transaction”. Other Locking Mechanism Lock manager does not manage latches and spinlocks. Latches Latches are internal mechanisms used to protect pages while doing operations such as placing a row physically on a page, compressing space on a page, or retrieving rows from a page. Latches can roughly be divided into I/O latches and non-I/O latches. If you see a high number of non-I/O related latches, SQL Server is usually doing a large number of hash or sort operations in tempdb. You can monitor latch activities via DBCC SQLPERF(‘WAITSTATS’) command. Spinlock A spinlock is an internal data structure that is used to protect vital information that is shared within SQL Server. On a multi-processor machine, when SQL Server tries to access a particular resource protected by a spinlock, it must first acquire the spinlock. If it fails, it executes a loop that will check to see if the lock is available and if not, decrements a counter. If the counter reaches zero, it yields the processor to another thread and goes into a “sleep” (wait) state for a pre-determined amount of time. When it wakes, hopefully, the lock is free and available. If not, the loop starts again and it is terminated only when the lock is acquired. The reason for implementing a spinlock is that it is probably less costly to “spin” for a short time rather than yielding the processor. Yielding the processor will force an expensive context switch where:  The old thread’s state must be saved  The new thread’s state must be reloaded  The data stored in the L1 and L2 cache are useless to the processor On a single-processor computer, the loop is not useful because no other thread can be running and thus, no one can release the spinlock for the currently executing thread to acquire. In this situation, the thread yields the processor immediately. Lesson 2: Concepts – Batch and Transaction This lesson outlines some of the common causes that contribute to the perception of a slow server. What You Will Learn After completing this lesson, you will be able to:  Review batch processing and error checking.  Review explicit, implicit and autocommit transactions and transaction nesting level.  Discuss how commit and rollback transaction done in stored procedure and trigger affects transaction nesting level.  Discuss various transaction isolation level and their impact on locking.  Discuss the difference between aborting a statement, a transaction, and a batch.  Describe how @@error, @@transcount, and @@rowcount can be used for error checking and handling. Recommended Reading  Charter 12 “Transactions and Triggers”, Inside SQL Server 2000 by Kalen Delaney Batch Definition SQL Profiler Statements and Batches To help further your understanding of what is a batch and what is a statement, you can use SQL Profiler to study the definition of batch and statement.  Try This: Using SQL Profiler to Analyze Batch 1. Log on to a server with Query Analyzer 2. Startup the SQL Profiler against the same server 3. Start a trace using the “StandardSQLProfiler” template 4. Execute the following using Query Analyzer: SELECT @@VERSION SELECT @@SPID The ‘SQL:BatchCompleted’ event is captured by the trace. It shows both the statements as a single batch. 5. Now execute the following using Query Analyzer {call sp_who()} What shows up? The ‘RPC:Completed’ with the sp_who information. RPC is simply another entry point to the SQL Server to call stored procedures with native data types. This allows one to avoid parsing. The ‘RPC:Completed’ event should be considered the same as a batch for the purposes of this discussion. Stop the current trace and start a new trace using the “SQLProfilerTSQL_SPs” template. Issue the same command as outlines in step 5 above. Looking at the output, not only can you see the batch markers but each statement as executed within the batch. Autocommit, Explicit, and Implicit Transaction Autocommit Transaction Mode (Default) Autocommit mode is the default transaction management mode of SQL Server. Every Transact-SQL statement, whether it is a standalone statement or part of a batch, is committed or rolled back when it completes. If a statement completes successfully, it is committed; if it encounters any error, it is rolled back. A SQL Server connection operates in autocommit mode whenever this default mode has not been overridden by either explicit or implicit transactions. Autocommit mode is also the default mode for ADO, OLE DB, ODBC, and DB-Library. A SQL Server connection operates in autocommit mode until a BEGIN TRANSACTION statement starts an explicit transaction, or implicit transaction mode is set on. When the explicit transaction is committed or rolled back, or when implicit transaction mode is turned off, SQL Server returns to autocommit mode. Explicit Transaction Mode An explicit transaction is a transaction that starts with a BEGIN TRANSACTION statement. An explicit transaction can contain one or more statements and must be terminated by either a COMMIT TRANSACTION or a ROLLBACK TRANSACTION statement. Implicit Transaction Mode SQL Server can automatically or, more precisely, implicitly start a transaction for you if a SET IMPLICIT_TRANSACTIONS ON statement is run or if the implicit transaction option is turned on globally by running sp_configure ‘user options’ 2. (Actually, the bit mask 0x2 must be turned on for the user option so you might have to perform an ‘OR’ operation with the existing user option value.) See SQL Server 2000 Books Online on how to turn on implicit transaction under ODBC and OLE DB (acdata.chm::/ac_8_md_06_2g6r.htm). Transaction Nesting Explicit transactions can be nested. Committing inner transactions is ignored by SQL Server other than to decrements @@TRANCOUNT. The transaction is either committed or rolled back based on the action taken at the end of the outermost transaction. If the outer transaction is committed, the inner nested transactions are also committed. If the outer transaction is rolled back, then all inner transactions are also rolled back, regardless of whether the inner transactions were individually committed. Each call to COMMIT TRANSACTION applies to the last executed BEGIN TRANSACTION. If the BEGIN TRANSACTION statements are nested, then a COMMIT statement applies only to the last nested transaction, which is the innermost transaction. Even if a COMMIT TRANSACTION transaction_name statement within a nested transaction refers to the transaction name of the outer transaction, the commit applies only to the innermost transaction. If a ROLLBACK TRANSACTION statement without a transaction_name parameter is executed at any level of a set of nested transaction, it rolls back all the nested transactions, including the outermost transaction. The @@TRANCOUNT function records the current transaction nesting level. Each BEGIN TRANSACTION statement increments @@TRANCOUNT by one. Each COMMIT TRANSACTION statement decrements @@TRANCOUNT by one. A ROLLBACK TRANSACTION statement that does not have a transaction name rolls back all nested transactions and decrements @@TRANCOUNT to 0. A ROLLBACK TRANSACTION that uses the transaction name of the outermost transaction in a set of nested transactions rolls back all the nested transactions and decrements @@TRANCOUNT to 0. When you are unsure if you are already in a transaction, SELECT @@TRANCOUNT to determine whether it is 1 or more. If @@TRANCOUNT is 0 you are not in a transaction. You can also find the transaction nesting level by checking the sysprocess.open_tran column. See SQL Server 2000 Books Online topic “Nesting Transactions” (acdata.chm::/ac_8_md_06_66nq.htm) for more information. Statement, Transaction, and Batch Abort One batch can have many statements and one transaction can have multiple statements, also. One transaction can span multiple batches and one batch can have multiple transactions. Statement Abort Currently executing statement is aborted. This can be a bit confusing when you start talking about statements in a trigger or stored procedure. Let us look closely at the following trigger: CREATE TRIGGER TRG8134 ON TBL8134 AFTER INSERT AS BEGIN SELECT 1/0 SELECT 'Next command in trigger' END To fire the INSERT trigger, the batch could be as simple as ‘INSERT INTO TBL8134 VALUES(1)’. However, the trigger contains two statements that must be executed as part of the batch to satisfy the clients insert request. When the ‘SELECT 1/0’ causes the divide by zero error, a statement abort is issued for the ‘SELECT 1/0’ statement. Batch and Transaction Abort On SQL Server 2000 (and SQL Server 7.0) whenever a non-informational error is encountered in a trigger, the statement abort is promoted to a batch and transactional abort. Thus, in the example the statement abort for ‘select 1/0’ promotion results in an entire batch abort. No further statements in the trigger or batch will be executed and a rollback is issued. On SQL Server 6.5, the statement aborts immediately and results in a transaction abort. However, the rest of the statements within the trigger are executed. This trigger could return ‘Next command in trigger’ as a result set. Once the trigger completes the batch abort promotion takes effect. Conversely, submitting a similar set of statements in a standalone batch can result in different behavior. SELECT 1/0 SELECT 'Next command in batch' Not considering the set option possibilities, a divide by zero error generally results in a statement abort. Since it is not in a trigger, the promotion to a batch abort is avoided and subsequent SELECT statement can execute. The programmer should add an “if @@ERROR” check immediately after the ‘select 1/0’ to T-SQL execution to control the flow correctly. Aborting and Set Options ARITHABORT If SET ARITHABORT is ON, these error conditions cause the query or batch to terminate. If the errors occur in a transaction, the transaction is rolled back. If SET ARITHABORT is OFF and one of these errors occurs, a warning message is displayed, and NULL is assigned to the result of the arithmetic operation. When an INSERT, DELETE, or UPDATE statement encounters an arithmetic error (overflow, divide-by-zero, or a domain error) during expression evaluation when SET ARITHABORT is OFF, SQL Server inserts or updates a NULL value. If the target column is not nullable, the insert or update action fails and the user receives an error. XACT_ABORT When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back. When OFF, only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing. Compile errors, such as syntax errors, are not affected by SET XACT_ABORT. For example: CREATE TABLE t1 (a int PRIMARY KEY) CREATE TABLE t2 (a int REFERENCES t1(a)) GO INSERT INTO t1 VALUES (1) INSERT INTO t1 VALUES (3) INSERT INTO t1 VALUES (4) INSERT INTO t1 VALUES (6) GO SET XACT_ABORT OFF GO BEGIN TRAN INSERT INTO t2 VALUES (1) INSERT INTO t2 VALUES (2) /* Foreign key error */ INSERT INTO t2 VALUES (3) COMMIT TRAN SELECT 'Continue running batch 1...' GO SET XACT_ABORT ON GO BEGIN TRAN INSERT INTO t2 VALUES (4) INSERT INTO t2 VALUES (5) /* Foreign key error */ INSERT INTO t2 VALUES (6) COMMIT TRAN SELECT 'Continue running batch 2...' GO /* Select shows only keys 1 and 3 added. Key 2 insert failed and was rolled back, but XACT_ABORT was OFF and rest of transaction succeeded. Key 5 insert error with XACT_ABORT ON caused all of the second transaction to roll back. Also note that 'Continue running batch 2...' is not Returned to indicate that the batch is aborted. */ SELECT * FROM t2 GO DROP TABLE t2 DROP TABLE t1 GO Compile and Run-time Errors Compile Errors Compile errors are encountered during syntax checks, security checks, and other general operations to prepare the batch for execution. These errors can prevent the optimization of the query and thus lead to immediate abort. The statement is not run and the batch is aborted. The transaction state is generally left untouched. For example, assume there are four statements in a particular batch. If the third statement has a syntax error, none of the statements in the batch is executed. Optimization Errors Optimization errors would include rare situations where the statement encounters a problem when attempting to build an optimal execution plan. Example: “too many tables referenced in the query” error is reported because a “work table” was added to the plan. Runtime Errors Runtime errors are those that are encountered during the execution of the query. Consider the following batch: SELECT * FROM pubs.dbo.titles UPDATE pubs.dbo.authors SET au_lname = au_lname SELECT * FROM foo UPDATE pubs.dbo.authors SET au_lname = au_lname If you run the above statements in a batch, the first two statements will be executed, the third statement will fail because table foo does not exist, and the batch will terminate. Deferred Name Resolution is the feature that allows this batch to start executing before resolving the object foo. This feature allows SQL Server to delay object resolution and place a “placeholder” in the query’s execution. The object referenced by the placeholder is resolved until the query is executed. In our example, the execution of the statement “SELECT * FROM foo” will trigger another compile process to resolve the name again. This time, error message 208 is returned. Error: 208, Level 16, State 1, Line 1 Invalid object name 'foo'. Message 208 can be encountered as a runtime or compile error depending on whether the Deferred Name Resolution feature is available. In SQL Server 6.5 this would be considered a compile error and on SQL Server 2000 (and SQL Server7.0) as a runtime error due to Deferred Name Resolution. In the following example, if a trigger referenced authors2, the error is detected as SQL Server attempts to execute the trigger. However, under SQL Server 6.5 the create trigger statement fails because authors2 does not exist at compile time. When errors are encountered in a trigger, generally, the statement, batch, and transaction are aborted. You should be able to observe this by running the following script in pubs database: Create table tblTest(iID int) go create trigger trgInsert on tblTest for INSERT as begin select * from authors select * from authors2 select * from titles end go begin tran select 'Before' insert into tblTest values(1) select 'After' go select @@TRANCOUNT go When run in a batch, the statement and the batch are aborted but the transaction remains active. The follow script illustrates this: begin tran select 'Before' select * from authors2 select 'After' go select @@TRANCOUNT go One other factor in a compile versus runtime error is implicit data type conversions. If you were to run the following statements on SQL Server 6.5 and SQL Server 2000 (and SQL Server 7.0): create table tblData(dtData datetime) go select 1 insert into tblData values(12/13/99) go On SQL Server 6.5, you get an error before execution of the batch begins so no statements are executed and the batch is aborted. Error: 206, Level 16, State 2, Line 2 Operand type clash: int is incompatible with datetime On SQL Server 2000, you get the default value (1900-01-01 00:00:00.000) inserted into the table. SQL Server 2000 implicit data type conversion treats this as integer division. The integer division of 12/13/99 is 0, so the default date and time value is inserted, no error returned. To correct the problem on either version is to wrap the date string with quotes. See Bug #56118 (sqlbug_70) for more details about this situation. Another example of a runtime error is a 605 message. Error: 605 Attempt to fetch logical page %S_PGID in database '%.*ls' belongs to object '%.*ls', not to object '%.*ls'. A 605 error is always a runtime error. However, depending on the transaction isolation level, (e.g. using the NOLOCK lock hint), established by the SPID the handling of the error can vary. Specifically, a 605 error is considered an ACCESS error. Errors associated with buffer and page access are found in the 600 series of errors. When the error is encountered, the isolation level of the SPID is examined to determine proper handling based on information or fatal error level. Transaction Error Checking Not all errors cause transactions to automatically rollback. Although it is difficult to determine exactly which errors will rollback transactions and which errors will not, the main idea here is that programmers must perform error checking and handle errors appropriately. Error Handling Raiserror Details Raiserror seems to be a source of confusion but is really rather simple. Raiserror with severity levels of 20 or higher will terminate the connection. Of course, when the connection is terminated a full rollback of any open transaction will immediately be instantiated by the SQL Server (except distributed transaction with DTC involved). Severity levels lower than 20 will simply result in the error message being returned to the client. They do not affect the transaction scope of the connection. Consider the following batch: use pubs begin tran update authors set au_lname = 'smith' raiserror ('This is bad', 19, 1) with log select @@trancount With severity set at 19, the 'select @@trancount' will be executed after the raiserror statement and will return a value of 1. If severity is changed to 20, then the select statement will not run and the connection is broken. Important Error handling must occur not only in T-SQL batches and stored procedures, but also in application program code. Transactions and Triggers (1 of 2) Basic behavior assumes the implicit transactions setting is set to OFF. This behavior makes it possible to identify business logic errors in a trigger, raise an error, rollback the action, and add an audit table entry. Logically, the insert to the audit table cannot take place before the ROLLBACK action and you would not want to build in the audit table insert into every applications error handler that violated the business rule of the trigger. For more information, see also… SQL Server 2000 Books Online topic “Rollbacks in stored procedure and triggers“ (acdata.chm::/ac_8_md_06_4qcz.htm) IMPLICIT_TRANSACTIONS ON Behavior The behavior of firing other triggers on the same table can be tricky. Say you added a trigger that checks the CODE field. Read only versions of the rows contain the code ‘RO’ and read/write versions use ‘RW.’ Whenever someone tries to delete a row with a code ‘RO’ the trigger issues the rollback and logs an audit table entry. However, you also have a second trigger that is responsible for cascading delete operations. One client could issue the delete without implicit transactions on and only the current trigger would execute and then terminate the batch. However, a second client with implicit transactions on could issue the same delete and the secondary trigger would fire. You end up with a situation in which the cascading delete operations can take place (are committed) but the initial row remains in the table because of the rollback operation. None of the delete operations should be allowed but because the transaction scope was restarted because of the implicit transactions setting, they did. Transactions and Triggers (2 of 2) It is extremely difficult to determine the execution state of a trigger when using explicit rollback statements in combination with implicit transactions. The RETURN statement is not allowed to return a value. The only way I have found to set the @@ERROR is using a ‘raiserror’ as the last execution statement in the last trigger to execute. If you modify the example, this following RAISERROR statement will set @@ERROR to 50000: CREATE TRIGGER trgTest on tblTest for INSERT AS BEGIN ROLLBACK INSERT INTO tblAudit VALUES (1) RAISERROR('This is bad', 14,1) END However, this value does not carry over to a secondary trigger for the same table. If you raise an error at the end of the first trigger and then look at @@ERROR in the secondary trigger the @@ERROR remains 0. Carrying Forward an Active/Open Transaction It is possible to exit from a trigger and carry forward an open transaction by issuing a BEGIN TRAN or by setting implicit transaction on and doing INSERT, UPDATE, or DELETE. Warning It is never recommended that a trigger call BEGIN TRANSACTION. By doing this you increment the transaction count. Invalid code logic, not calling commit transaction, can lead to a situation where the transaction count remains elevated upon exit of the trigger. Transaction Count The behavior is better explained by understanding how the server works. It does not matter whether you are in a transaction, when a modification takes place the transaction count is incremented. So, in the simplest form, during the processing of an insert the transaction count is 1. On completion of the insert, the server will commit (and thus decrement the transaction count). If the commit identifies the transaction count has returned to 0, the actual commit processing is completed. Issuing a commit when the transaction count is greater than 1 simply decrements the nested transaction counter. Thus, when we enter a trigger, the transaction count is 1. At the completion of the trigger, the transaction count will be 0 due to the commit issued at the end of the modification statement (insert). In our example, if the connection was already in a transaction and called the second INSERT, since implicit transaction is ON, the transaction count in the trigger will be 2 as long as the ROLLBACK is not executed. At the end of the insert, the commit is again issued to decrement the transaction reference count to 1. However, the value does not return to 0 so the transaction remains open/active. Subsequent triggers are only fired if the transaction count at the end of the trigger remains greater than or equal to 1. The key to continuation of secondary triggers and the batch is the transaction count at the end of a trigger execution. If the trigger that performs a rollback has done an explicit begin transaction or uses implicit transactions, subsequent triggers and the batch will continue. If the transaction count is not 1 or greater, subsequent triggers and the batch will not execute. Warning Forcing the transaction count after issuing a rollback is dangerous because you can easily loose track of your transaction nesting level. When performing an explicit rollback in a trigger, you should immediately issue a return statement to maintain consistent behavior between a connection with and without implicit transaction settings. This will force the trigger(s) and batch to terminate immediately. One of the methods of dealing with this issue is to run ‘SET IMPLICIT_TRANSACTIONS OFF’ as the first statement of any trigger. Other methods may entails checking @@TRANCOUNT at the end of the trigger and continue to COMMIT the transaction as long as @@TRANCOUNT is greater than 1. Examples The following examples are based on this table: create table tbl50000Insert (iID int NOT NULL) go Note If more than one trigger is used, to guarantee the trigger firing sequence, the sp_settriggerorder command should be used. This command is omitted in these examples to simplify the complexity of the statements. First Example In the first example, the second trigger was never fired and the batch, starting with the insert statement, was aborted. Thus, the print statement was never issued. print('Trigger issues rollback - cancels batch') go create trigger trg50000Insert on tbl50000Insert for INSERT as begin select 'Inserted', * from inserted rollback tran select 'End of trigger', @@TRANCOUNT as 'TRANCOUNT' end go create trigger trg50000Insert2 on tbl50000Insert for INSERT as begin select 'In Trigger2' select 'Trigger 2 Inserted', * from inserted end go insert into tbl50000Insert values(1) print('---------------------- In same batch') select * from tbl50000Insert go -- Cleanup drop trigger trg50000Insert drop trigger trg50000Insert2 go delete from tbl50000Insert Second Example The next example shows that since a new transaction is started, the second trigger will be fired and the print statement in the batch will be executed. Note that the insert is rolled back. print('Trigger issues rollback - increases tran count to continue batch') go create trigger trg50000Insert on tbl50000Insert for INSERT as begin select 'Inserted', * from inserted rollback tran begin tran end go create trigger trg50000Insert2 on tbl50000Insert for INSERT as begin select 'In Trigger2' select 'Trigger 2 Inserted', * from inserted end go insert into tbl50000Insert values(2) print('---------------------- In same batch') select * from tbl50000Insert go -- Cleanup drop trigger trg50000Insert drop trigger trg50000Insert2 go delete from tbl50000Insert Third Example In the third example, the raiserror statement is used to set the @@ERROR value and the BEGIN TRAN statement is used in the trigger to allow the batch to continue to run. print('Trigger issues rollback - uses raiserror to set @@ERROR') go create trigger trg50000Insert on tbl50000Insert for INSERT as begin select 'Inserted', * from inserted rollback tran begin tran -- Increase @@trancount to allow -- batch to continue select @@trancount as ‘Trancount’ raiserror('This is from the trigger', 14,1) end go insert into tbl50000Insert values(3) select @@ERROR as 'ERROR', @@TRANCOUNT as 'Trancount' go -- Cleanup drop trigger trg50000Insert go delete from tbl50000Insert Fourth Example For the fourth example, a second trigger is added to illustrate the fact that @@ERROR value set in the first trigger will not be seen in the second trigger nor will it show up in the batch after the second trigger is fired. print('Trigger issues rollback - uses raiserror to set @@ERROR, not seen in second trigger and cleared in batch') go create trigger trg50000Insert on tbl50000Insert for INSERT as begin select 'Inserted', * from inserted rollback begin tran -- Increase @@trancount to -- allow batch to continue select @@TRANCOUNT as 'Trancount' raiserror('This is from the trigger', 14,1) end go create trigger trg50000Insert2 on tbl50000Insert for INSERT as begin select @@ERROR as 'ERROR', @@TRANCOUNT as 'Trancount' end go insert into tbl50000Insert values(4) select @@ERROR as 'ERROR', @@TRANCOUNT as 'Trancount' go -- Cleanup drop trigger trg50000Insert drop trigger trg50000Insert2 go delete from tbl50000Insert Lesson 3: Concepts – Locks and Applications This lesson outlines some of the common causes that contribute to the perception of a slow server. What You Will Learn After completing this lesson, you will be able to:  Explain how lock hints are used and their impact.  Discuss the effect on locking when an application uses Microsoft Transaction Server.  Identify the different kinds of deadlocks including distributed deadlock. Recommended Reading  Charter 14 “Locking”, Inside SQL Server 2000 by Kalen Delaney  Charter 16 “Query Tuning”, Inside SQL Server 2000 by Kalen Delaney Q239753 – Deadlock Situation Not Detected by SQL Server Q288752 – Blocked SPID Not Participating in Deadlock May Incorrectly be Chosen as victim Locking Hints UPDLOCK If update locks are used instead of shared locks while reading a table, the locks are held until the end of the statement or transaction. UPDLOCK has the advantage of allowing you to read data (without blocking other readers) and update it later with the assurance that the data has not changed since you last read it. READPAST READPAST is an optimizer hint for use with SELECT statements. When this hint is used, SQL Server will read past locked rows. For example, assume table T1 contains a single integer column with the values of 1, 2, 3, 4, and 5. If transaction A changes the value of 3 to 8 but has not yet committed, a SELECT * FROM T1 (READPAST) yields values 1, 2, 4, 5. Tip READPAST only applies to transactions operating at READ COMMITTED isolation and only reads past row-level locks. This lock hint can be used to implement a work queue on a SQL Server table. For example, assume there are many external work requests being thrown into a table and they should be serviced in approximate insertion order but they do not have to be completely FIFO. If you have 4 worker threads consuming work items from the queue they could each pick up a record using read past locking and then delete the entry from the queue and commit when they're done. If they fail, they could rollback, leaving the entry on the queue for the next worker thread to pick up. Caution The READPAST hint is not compatible with HOLDLOCK.  Try This: Using Locking Hints 1. Open a Query Window and connect to the pubs database. 2. Execute the following statements (--Conn 1 is optional to help you keep track of each connection): BEGIN TRANSACTION -- Conn 1 UPDATE titles SET price = price * 0.9 WHERE title_id = 'BU1032' 3. Open a second connection and execute the following statements: SELECT @@lock_timeout -- Conn 2 GO SELECT * FROM titles SELECT * FROM authors 4. Open a third connection and execute the following statements: SET LOCK_TIMEOUT 0 -- Conn 3 SELECT * FROM titles SELECT * FROM authors 5. Open a fourth connection and execute the following statement: SELECT * FROM titles (READPAST) -- Conn 4 WHERE title_ID < 'C' SELECT * FROM authors How many records were returned? 3 6. Open a fifth connection and execute the following statement: SELECT * FROM titles (NOLOCK) -- Conn 5 WHERE title_ID 0 the lock manager also checks for deadlocks every time a SPID gets blocked. So a single deadlock will trigger 20 seconds of more immediate deadlock detection, but if no additional deadlocks occur in that 20 seconds, the lock manager no longer checks for deadlocks at each block and detection again only happens every 5 seconds. Although normally not needed, you may use trace flag -T1205 to trace the deadlock detection process. Note Please note the distinction between application lock and other locks’ deadlock detection. For application lock, we do not rollback the transaction of the deadlock victim but simply return a -3 to sp_getapplock, which the application needs to handle itself. Deadlock Resolution How is a deadlock resolved? SQL Server picks one of the connections as a deadlock victim. The victim is chosen based on either which is the least expensive transaction (calculated using the number and size of the log records) to roll back or in which process “SET DEADLOCK_PRIORITY LOW” is specified. The victim’s transaction is rolled back, held locks are released, and SQL Server sends error 1205 to the victim’s client application to notify it that it was chosen as a victim. The other process can then obtain access to the resource it was waiting on and continue. Error 1205: Your transaction (process ID #%d) was deadlocked with another process and has been chosen as the deadlock victim. Rerun your transaction. Symptoms of deadlocking Error 1205 usually is not written to the SQL Server errorlog. Unfortunately, you cannot use sp_altermessage to cause 1205 to be written to the errorlog. If the client application does not capture and display error 1205, some of the symptoms of deadlock occurring are:  Clients complain of mysteriously canceled queries when using certain features of an application.  May be accompanied by excessive blocking. Lock contention increases the chances that a deadlock will occur. Triggers and Deadlock Triggers promote the deadlock priority of the SPID for the life of the trigger execution when the DEADLOCK PRIORITY is not set to low. When a statement in a trigger causes a deadlock to occur, the SPID executing the trigger is given preferential treatment and will not become the victim. Warning Bug 235794 is filed against SQL Server 2000 where a blocked SPID that is not a participant of a deadlock may incorrectly be chosen as a deadlock victim if the SPID is blocked by one of the deadlock participants and the SPID has the least amount of transaction logging. See KB article Q288752: “Blocked Spid Not Participating in Deadlock May Incorrectly be Chosen as victim” for more information. Distributed Deadlock – Scenario 1 Distributed Deadlocks The term distributed deadlock is ambiguous. There are many types of distributed deadlocks. Scenario 1 Client application opens connection A, begins a transaction, acquires some locks, opens connection B, connection B gets blocked by A but the application is designed to not commit A’s transaction until B completes. Note SQL Server has no way of knowing that connection A is somehow dependent on B – they are two distinct connections with two distinct transactions. This situation is discussed in scenario #4 in “Q224453 INF: Understanding and Resolving SQL Server 7.0 Blocking Problems”. Distributed Deadlock – Scenario 2 Scenario 2 Distributed deadlock involving bound connections. Two connections can be bound into a single transaction context with sp_getbindtoken/sp_bindsession or via DTC. Spid 60 enlists in a transaction with spid 61. A third spid 62 is blocked by spid 60, but spid 61 is blocked by spid 62. Because they are doing work in the same transaction, spid 60 cannot commit until spid 61 finishes his work, but spid 61 is blocked by 62 who is blocked by 60. This scenario is described in article “Q239753 - Deadlock Situation Not Detected by SQL Server.” Note SQL Server 6.5 and 7.0 do not detect this deadlock. The SQL Server 2000 deadlock detection algorithm has been enhanced to detect this type of distributed deadlock. The diagram in the slide illustrates this situation. Resources locked by a spid are below that spid (in a box). Arrows indicate blocking and are drawn from the blocked spid to the resource that the spid requires. A circle represents a transaction; spids in the same transaction are shown in the same circle. Distributed Deadlock – Scenario 3 Scenario 3 Distributed deadlock involving linked servers or server-to-server RPC. Spid 60 on Server 1 executes a stored procedure on Server 2 via linked server. This stored procedure does a loopback linked server query against a table on Server 1, and this connection is blocked by a lock held by Spid 60. Note No version of SQL Server is currently designed to detect this distributed deadlock. Lesson 4: Information Collection and Analysis This lesson outlines some of the common causes that contribute to the perception of a slow server. What You Will Learn After completing this lesson, you will be able to:  Identify specific information needed for troubleshooting issues.  Locate and collect information needed for troubleshooting issues.  Analyze output of DBCC Inputbuffer, DBCC PSS, and DBCC Page commands.  Review information collected from master.dbo.sysprocesses table.  Review information collected from master.dbo.syslockinfo table.  Review output of sp_who, sp_who2, sp_lock.  Analyze Profiler log for query usage pattern.  Review output of trace flags to help troubleshoot deadlocks. Recommended Reading Q244455 - INF: Definition of Sysprocesses Waittype and Lastwaittype Fields Q244456 - INF: Description of DBCC PSS Command for SQL Server 7.0 Q271509 - INF: How to Monitor SQL Server 2000 Blocking Q251004 - How to Monitor SQL Server 7.0 Blocking Q224453 - Understanding and Resolving SQL Server 7.0 Blocking Problem Q282749 – BUG: Deadlock information reported with SQL Server 2000 Profiler Locking and Blocking  Try This: Examine Blocked Processes 1. Open a Query Window and connect to the pubs database. Execute the following statements: BEGIN TRAN -- connection 1 UPDATE titles SET price = price + 1 2. Open another connection and execute the following statement: SELECT * FROM titles-- connection 2 3. Open a third connection and execute sp_who; note the process id (spid) of the blocked process. (Connection 3) 4. In the same connection, execute the following: SELECT spid, cmd, waittype FROM master..sysprocesses WHERE waittype 0 -- connection 3 5. Do not close any of the connections! What was the wait type of the blocked process?  Try This: Look at locks held Assumes all your connections are still open from the previous exercise. • Execute sp_lock -- Connection 3 What locks is the process from the previous example holding? Make sure you run ROLLBACK TRAN in Connection 1 to clean up your transaction. Collecting Information See Module 2 for more about how to gather this information using various tools. Recognizing Blocking Problems How to Recognize Blocking Problems  Users complain about poor performance at a certain time of day, or after a certain number of users connect.  SELECT * FROM sysprocesses or sp_who2 shows non-zero values in the blocked or BlkBy column.  More severe blocking incidents will have long blocking chains or large sysprocesses.waittime values for blocked spids.  Possibl
6 , chunks.zip<br>This will open a file and read it in "Chunks" of a selected file.<END><br>7 , logging.zip<br>This is a bas that will log installation procedures so the file can be removed later.<END><br>8 , savetree.zip<br>This will save the info in a Tree View. "This technique allows a program to save hierarchical information like the data in a TreeView in a way that is easy to understand."<END><br>11 , OLE.zip<br>Demonstrates the use of OLE.<END><br>12 , gradtxt2.zip<br>"A program for drawing horizontal, rectangular or spherical gradient texts."<END><br>13 , sweepgl.zip<br>This example greatly demonstrates how to use OpenGL in Visual Basic.<END><br>15 , drawdemo.zip<br>This is an excellent example of how to make a paint program with a few extras.<END><br>16 , cube.zip<br>This example demonstrates how to rotate a cube in visual basic.<END><br>17 , sprite1.zip<br>This is an Excellent example on how to use sprites in your program.<END><br>18 , charcreate.zip<br>This is an example of how to assign "characters" to differant pictureboxes. This would be a good starting point for VB game developers.<END><br>19 , breakthrough.zip<br>This demonstrates a simple game in Visual Basic. An excellent example.<END><br>26 , openlib.zip<br>These are the type libs that go with OpenGL. This is used to make 3D text.<END><br>27 , basMath.zip<br>This module contains functions for various math equations. <END><br>28 , calc.zip<br>This is a basic calculator written in Visual Basic.<END><br>29 , stopwatch.zip<br>This shows how to count off time in a Stop Watch format.<END><br>31 , taskhide.zip<br>This will hide your application from the taskbar, Alt+Tab, and Alt+Ctrl+Del.<END><br>32 , newbie.zip<br>This is a nicely done help file for programmers that are new to Visual Basic.<END><br>33 , vbfaq.zip<br>This is AOL's PC Dev Visual Basic FAQ. This is an excellent starting point for begginners.<END><br>34 , Bas.zip<br>it is very good modual for activex<END><br>35, paraviasource.zip<br>This is
FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持Delphi 4-XE5 and C++Builder 6-XE5. D2010以上版本(D14_D19)安装必读 delphi2010以上版本(D14_D19)使用者安装时,请将res\frccD14_D19.exe更名名为frcc.exe frccD14_D19.exe是专门的delphi2010以上版本(D14_D19)编码器。其他低delphi版本,请使用frcc.exe FastReport® VCL is an add-on component that allows your application to generate reports quickly and efficiently. FastReport® provides all the tools necessary for developing reports, including a visual report designer, a reporting core, and a preview window. It can be used in Embarcadero (ex Borland and CodeGear) Delphi 4-XE5 and C++Builder 6-XE5. version 4.15 --------------- + Added Embarcadero RAD Studio XE5 support + Added Internal components for FireDac database engine + fixed bug with images in PDF export for OSX viewers + Added ability to set font charset to default in Style Editor - fixed duplex problem when printing several copies of the report - fixed problem with PNG images - fixed problem with TfrxPictureView transparent version 4.14 --------------- + Added Embarcadero RAD Studio XE4 support - [Lazarus] fixed bug with text output - [Lazarus] fixed bug with some visual controls in designer - [Lazarus] improved interface of the report preview and designer - [Lazarus] fixed bug with boolean propertyes in script code and expressions - fixed bug with endless loop in TfrxRichView - fixed bug with Unicode in TfrxMemoView appeared in previous release - improved MAPI interface in TfrxExportMail export - fixed some problems with allpication styles XE2/XE3 - improved compatibility with Fast Report FMX version 4.13 --------------- + Added Lazarus Beta support starts from Fast Report Professionnal edition. Current version allows preview, print and design report template under Windows and Linux platform (qt). + Added Embarcadero RAD Studio XE3 support - fixed compatibility with Fast Report FMX installed in the same IDE. This version can co exist with Fast Report FMX version at the same time. + published "Quality" property of TfrxPDFExport object + published "UseMAPI" property of TfrxExportMail object + published "PictureType" property to ODF export - fixed bug with expressions in RichEdit - fixed bug in multi-column reports - fixed exception in the report designer - fixed bug with URLs in Open Document Text and Open Document Spreadsheet exports - fixed format string in XLS OLE export - fixed format string in XLS BIFF8 export - fixed output of the check boxes on the highlighted lines in PDF export - fixed bug with PDF anchors - fixed bug when using two or more macroses in memo version 4.12 --------------- + added support of Embarcadero Rad Studio EX2 (x32/x64) + added export of Excel formulas in the BIFF export + added export of external URLs in the PDF export + added converter from Rave Reports ConverterRR2FR.pas + added Cross.KeepRowsTogether property + optimised merging cells in the BIFF export + added property DataOnly to exports + pictures format in all exports switched to PNG + improved number formats processing in the BIFF export + added property DataOnly to exports + added property TfrxODFExport.SingleSheet + added property TfrxSimpleTextExport.DeleteEmptyColumns + added property TfrxBIFFExport.DeleteEmptyRows + added progress bar to the BIFF export - fixed bug with frame for some barcode types - fixed wrong metafiles size in the EMF export - fixed processing of negative numbers in the OLE export - fixed bug in handling exceptions in the OLE export - fixed bug in creation of the progress bar (applicable to many exports) - fixed bug in the ODF export in strings processing - fixed bug in the OLE export in numbers formatting - fixed bug in the PDF export in rotating texts 90, 180 and 270 degrees - fixed bug in the ODF export in processing of headers and footers - fixed bug in the Text export in computing object bounds - fixed bug in the ODF export in UTF8 encoding - fixed hiding gridlines around nonempty cells in the BIFF export - fixed images bluring when exporting - fixed word wrapping in the Excel XML export version 4.11 --------------- + added BIFF8 XLS export filter + added to ODF export the Language property + [enterprise] added "scripts" folder for additional units ("uses" directive in report script) + [enterprise] added logs for scheduler (add info in scheduler.log) + [enterprise] added property "Reports" - "Scripts" in server configuration - set the path for "uses" directive in report script + [enterprise] added property "Http" - "MaxSessions" in server configuration - set the limit of maximum session threads, set 0 for unlimit + [enterprise] added property "Reports" - "MaxReports" in server configuration - set the limit of maximum report threads, set 0 for unlimit + [enterprise] added property "Logs" - "SchedulerLog" in server configuration - set the scheduler log file name + [enterprise] added property "Scheduler" - "Active" in server configuration - enable of scheduler + [enterprise] added property "Scheduler" - "Debug" in server configuration - enable writing of debug info in scheduler log + [enterprise] added property "Scheduler" - "StudioPath" in server configuration - set the path to FastReport Studio, leave blank for default - [enterprise] fixed bug with MIME types in http header (content-type) - [enterprise] fixed bug with default configuration (with missed config.xml) - [enterprise] fixed bug with error pages - fixed bug in XML export with the ShowProgress property - fixed bug in RTF export with font size in empty cells - fixed bug in ODF export with UTF8 encoding of the Creator field - fixed bug in XML export with processing special characters in strings - fixed bug in ODF export with properties table:number-columns-spanned, table:number-rows-spanned - fixed bug in ODF export with the background clNone color - fixed bug in ODF export with a style of table:covered-table-cell - fixed bug in ODF export with table:covered-table-cell duplicates - fixed bug in ODF export with excessive text:p inside table:covered-table-cell - fixed bug in ODF export with language styles - fixed bug in ODF export with spaces and tab symbols - fixed bug in ODF export with styles of number cells - fixed bug in ODF export with the background picture - fixed bug in ODF export with charspacing - fixed bug in ODF export with number formatting - fixed bug in ODF export with table-row tag - fixed bug in XLS(OLE) export with numbers formatting - fixed bug in RTF export with processing RTF fields - fixed bug with processing special symbols in HTML Export - fixed bug with UTF8 encoding in ODF export - fixed bug in PDF export with underlined, struck-out and rotated texts version 4.10 --------------- + added support of Embarcadero Rad Studio XE (Delphi EX/C++Builder EX) + added support of TeeChart 2010 packages (new series type aren't support in this release) + added a property TruncateLongTexts to the XLS OLE export that allows to disable truncating texts longer than a specified limit + added option EmbedProt which allows to disable embedding fonts into an encrypted PDF file + added TfrxDateEditControl.WeekNumbers property - fixed bug in XML and PDF exports with Korean charmap - fixed bug in the XLS XML export about striked-out texts - fixed bug about exporting an empty page via the XLS OLE export - fixed bug in the PDF export about coloring the background of pages - fixed bug in embedded designer when using break point in script - fixed bug with lost of focus in font size combo-box in designer - fixed bug with truncate of font size combo-box in Windows Vista/7 in designer (lost of vertical scroll bar) - fixed bug when lost file name in inherited report - fixed bug in multi-page report with EndlessHeight/EndlessWidth - fixed bug wit TfrxHeader.ReprintOnNewpage and KeepTogether - fixed bug in multi-column report with child bands - improved split mechanism (added TfrxStretcheable.HasNextDataPart for complicated data like RTF tables) - improved crosstab speed when using repeat band with crosstab object version 4.9 --------------- + added outline to PDF export + added anchors to PDF export - fixed bug with embedded TTC fonts in PDF export + added an ability to create multiimage TIFF files + added export headers/footers in ODF export + added ability to print/export transparent pictures (properties TfrxPictureView.Transparent and TfrxPictureView.TransparentColor) (PDF export isn't supported) + added new "split to sheet" modes for TfrxXMLExport + added support of /PAGE tag in TfrxRichView, engine automatically break report pages when find /PAGE tag + added ability to hide Null values in TfrxChartView (TfrxChartView.IgnoreNulls = True) + added ability to set any custom page order for printing (i.e. 3,2,1,5,4 ) + [enterprise] added variables "AUTHLOGIN" and "AUTHGROUP" inside the any report + [enterprise] now any report file can be matched with any (one and more) group, these reports are accessible only in matched groups + [enterprise] now you can set-up cache delays for each report file (reports.xml) + [enterprise] added new properties editor for reports in Configuration utility (see Reports tab) + [enterprise] added property "Xml" - "SplitType" in server configuration - allow to select split on pages type between none/pages/printonprev/rowscount + [enterprise] added property "Xml" - "SplitRowsCount" in server configuration - sets the count of rows for "rowscount" split type + [enterprise] added property "Xml" - "Extension" in server configuration - allow select between ".xml" and ".xls" extension for output file + [enterprise] added property "Html" - "URLTarget" in server configuration - allow select the target attribute for report URLs + [enterprise] added property "ReportsFile" - path to file with reports to groups associations and cache delays + [enterprise] added property "ReportsListRenewTimeout" in server configuration + [enterprise] added property "ConfigRenewTimeout" in server configuration + [enterprise] added property "MimeType" for each output format in server configuration + [enterprise] added property "BrowserPrint" in server configuration - allow printing by browser, added new template nav_print_browser.html + [enterprise] added dynamic file name generation of resulting formats (report_name_date_time) * [enterprise] SERVER_REPORTS_LIST and SERVER_REPORTS_HTML variables (list of available reports) depend from user group (for internal authentification) + added drawing shapes in PDF export (not bitmap) + added rotated text in PDF export (not bitmap) + added EngineOptions.IgnoreDevByZero property allow to ignore division by zero exception in expressions + added properties TfrxDBLookupComboBox.DropDownWidth, TfrxDBLookupComboBox.DropDownRows + added event TfrxCustomExportFilter.OnBeginExport + added ability to decrease font size in barcode object + added ability to inseret FNC1 to "code 128" barcode + added event TfrxPreview.OnMouseDown + added support of new unicode-PDF export in D4-D6 and BCB4-BCB6 * improved AddFrom method - anchor coping - fixed bug with WordWrap in PDF export - fixed bug with underlines in PDF export - fixed bug with rounded rectangles in PDF export - fixed CSV export to fit to the RFC 4180 specification - fixed bug with strikeout text in PDF export - fixed bug with incorrect export of TfrxRichView object in RTF format (wrong line spacing) - [enterprise] added critical section in TfrxServerLog.Write - fixed bug with setting up of the Protection Flags in the PDF export dialog window - fixed bug in PDF export (file structure) - fixed bug with pictures in Open Office Writer (odt) export - [enterprise] fixed bug with TfrxReportServer component in Delphi 2010 - fixed minor errors in Embarcedero RAD Studio 2010 - fixed bug with endless loop with using vertical bands together with page header and header with ReprintOnNewPage - fixed bug when using "Keeping" and Cross tables (incorrect cross transfer) - fixed bug with [CopyName#] macros when use "Join small pages" print mode - fixed bug when try to split page with endless height to several pages (NewPage, StartNewPage) - fixed bug with empty line TfrxRichView when adding text via expression - fixed bug when Footer prints even if main band is invisible (FooterAfterEach = True) - fixed resetting of Page variable in double-pass report with TfrxCrossView - fixed bug with loosing of aligning when split TfrxRichView - fixed buzz in reports with TfrxRichView when using RTF 4.1 version 4.8 --------------- + added support of Embarcadero Rad Studio 2010 (Delphi/C++Builder) + added TfrxDBDataset.BCDToCurrency property + added TfrxReportOptions.HiddenPassword property to set password silently from code + added TfrxADOConnection.OnAfterDisconnect event + added TfrxDesigner.MemoParentFont property + added new TfrxDesignerRestriction: drDontEditReportScript and drDontEditInternalDatasets + adedd checksum calculating for 2 5 interleaved barcode + added TfrxGroupHeader.ShowChildIfDrillDown property + added TfrxMailExport.OnSendMail event + added RTF 4.1 support for TfrxRichText object + [enterprise] added Windows Authentification mode + added confirmation reading for TfrxMailExport + added TimeOut field to TfrxMailExport form + added ability to use keeping(KeepTogether/KeepChild/KeepHeader) in multi-column report + added ability to split big bands(biggest than page height) by default * [enterprise] improved CGI for IIS/Apache server * changed PDF export (D7 and upper): added full unicode support, improved performance, decreased memory requirements old PDF export engine saved in file frxExportPDF_old.pas - changed inheritance mechanism, correct inherits of linked objects (fixups) - fixed bug with Mirror Mrgins in RTF, HTML, XLS, XML, OpenOffice exports - fixed bug when cross tab cut the text in corner, when corner height greater than column height - [fs] improved script compilation - improved WatchForm TListBox changet to TCheckListBox - improved AddFrom method - copy outline - Improved functional of vertical bands, shows memos placed on H-band which doesn't across VBand, also calculate expression inside it and call events (like in FR2) - Improved unsorted mode in crosstab(join same columns correctly) - Improved converter from Report Builder - Improved TfrxDesigner.OnInsertObject, should call when drag&drop field from data tree - improved DrillDownd mechanism, should work correct with master-detail-subtetail nesting - fixed bug with DownThenAcross in Cross Tab - fixed several bugs under CodeGear RAD Studio (Delphi/C++Builder) 2009 - fixed bug with emf in ODT export - fixed bug with outline when build several composite reports in double pass mode - fixed bug when group doesn't fit on the whole page - fixed "Page" and "Line" variables inside vertical bands - fixed bug with using KeepHeader in some cases - fixed bug with displacement of subreport when use PrintOnParent property in some cases - fixed small memory leak in subreports - fixed problem with PageFooter and ReportSymmary when use PrintOnPreviousPage property - fixed bug when designer shows commented functions in object inspector - fixed bug when designer place function in commented text block - fixed bug when Engine try to split non-stretcheable view and gone to endless loop - fixed bug with HTML tags in memo when use shot text and WordWrap - [enterprise] fixed bug with variables lost on refresh/export - fixed bug whih PDF,ODT export in Delphi4 and CBuilder4 - fixed bug with some codepage which use two bytes for special symbols (Japanese ans Chinese codepages) - fixed bug when engine delete first space from text in split Memo - fixed bug in multi-column page when band overlap stretched PageHeader - fixed bug with using ReprintOnNewPage version 4.7 --------------- + CodeGear RAD Studio (Delphi/C++Builder) 2009 support + [enterprise] enchanced error description in logs + added properties TfrxHTMLExport.HTMLDocumentBegin: TStrings, TfrxHTMLExport.HTMLDocumentBody: TStrings, TfrxHTMLExport.HTMLDocumentEnd: TStrings + improved RTF export (with line spacing, vertical gap etc) + added support of Enhanced Metafile (EMF) images in Rich Text (RTF), Open Office (ODS), Excel (XLS) exports + added OnAfterScriptCompile event + added onLoadRecentFile Event + added C++ Builder demos + added hot-key Ctrl + mouseWheel - Change scale in designer + added TfrxMemoView.AnsiText property - fixed bug in RTF export with EMF pictures in OpenOffice Writer - fixed some multi-thread isuues in engine, PDF, ODF exports - [enterprise] fixed integrated template of report navigator - [enterprise] fixed bug with export in Internet Explorer browser - fixed bug with font size of dot-matix reports in Excel and XML exports - fixed bug in e-mail export with many addresses - fixed bug in XLS export (with fast export unchecked and image object is null) - [enterprise] fixed bug in TfrxReportServer.OnGetVariables event - fixed bug in Calcl function - fixed memory leak in Cross editor - fixed progress bar and find dialog bug in DualView - fixed bug in PostNET and ean13 barcodes - fixed bug with TruncOutboundText in Dot Matrix report - fixed bugs with break points in syntaxis memo - improved BeforeConnect event in ADO - fixed bug in inhehited report with internal dataset - fixed bug in TfrxPanelControl with background color(Delphi 2005 and above) version 4.6 --------------- + added & , < , > to XML reader + added tag, the text concluded in tag is not broken by WordWrap, it move entirely + added ability to move band without objects (Alt + Move) + added ability to output pages in the preview from right to left ("many pages" mode), for RTL languages(PreviewOptions.RTLPreview) + added ability to storing picture cache in "temp" file (PreviewOptions.PictureCacheInFile) + added EngineOptions.UseGlobalDataSetList (added for multi-thread applications) - set it to False if you don't want use Global DataSet list(use Report.EnabledDataSet.Add() to add dataset in local list) + added new property Hint for all printed objects, hints at the dialog objects now shows in StatusBar + added new property TfrxDBLookupComboBox.AutoOpenDataSet (automatically opens the attached dataset after onActivate event) + added new property TfrxReportPage.PageCount like TfrxDataBand.RowCount + added new property WordWrap for dialog buttons (Delphi 7 and above). + added sort by name to data tree + added TfrxDesigner.TemplatesExt property + added TfrxStyles class in script rtti + changes in the Chart editor: ability to change the name of the series, ability to move created series, other small changes + [enterprise] added configurations values refresh in run-time + [enterprise] added new demo \Demos\ClientServer\ISAPI + [enterprise] added output to server printers from user browser (see config.xml "AllowPrint", set to "no" by default), note: experimental feature + [enterprise] added reports list refresh in run-time + [enterprise] added templates feature + [enterprise] improved speed and stability + [fs] added TfsScript.IncludePath property + [fs] added TfsScript.UseClassLateBinding property + [fs] fixed type casting from variant(string) to integer/float - changes in report inherit: FR get relative path from current loaded report(old reports based on application path works too) - corrected module for converting reports from Report Builder - fixed bug in CrossTab when set charset different from DEFAULT_CHARSET - fixed bug in RTF export with some TfrxRichView objects - fixed bug when print on landscape orientation with custom paper size - fixed bug when use network path for parent report - fixed bug with Band.Allowslit = True and ColumnFooter - fixed bug with drawing subreport on stretched band - fixed bug with embedded fonts in PDF export - fixed bug with long ReportTitle + Header + MaterData.KeepHeader = true - fixed bug with minimizing of Modal designer in BDS2005 and above - fixed bug with paths in HTML export - fixed bug with RTL in PDF export - fixed bug with SubReport in multi column page - fixed bug with Subreport.PrintOnParent = true in inherited report - fixed bug with SYMBOL_CHARSET in PDF export - fixed bug with the addition of datasets by inheritance report - fixed bug with width calculation when use HTML tags in memo - fixed compatibility with WideStrings module in BDS2006/2007 - fixed flicking in preview when use OnClickObject event - fixed free space calculation when use PrintOnPreviousPage - fixed preview bug with winXP themes and in last update - fixed subreports inherit - Thumbnail and Outline shows at right side for RTL languages - [fs] fixed bug with late binding version 4.5 --------------- + added ConverterRB2FR.pas unit for converting reports from Report Builder to Fast Report + added ConverterQR2FR.pas unit for converting reports from QuickReport to FastReport + added support of multiple attachments in e-mail export (html with images as example) + added support of unicode (UTF-8) in e-mail export + added ability to change templates path in designer + added OnReportPrint script event + added PNG support in all version (start from Basic) + added TfrxDMPMemoView.TruncOutboundText property - truncate outbound text in matrix report when WordWrap=false + added new frames styles fsAltDot and fsSquare + added new event OnPreviewDblClick in all TfrxView components + added ability to call dialogs event after report run when set DestroyForms = false + added ability to change AllowExpressions and HideZeros properties in cross Cells (default=false) + added IgnoreDupParams property to DB components + added auto open dataset in TfrxDBLookupComboBox + added new property TfrxADOQuery.LockType + added define DB_CAT (frx.inc) for grouping DB components + added TfrxPictureView.HightQuality property(draw picture in preview with hight quality, but slow down drawing procedure) + [FRViewer] added comandline options "/print filename" and "/silent_print filename" + added unicode input support in RichEditor + added new define HOOK_WNDPROC_FOR_UNICODE (frx.inc) - set hook on GetMessage function for unicode input support in D4-D7/BCB4-BCB6 + added ability chose path to FIB packages in "Recompile Wizard" + added new function TfrxPreview.GetTopPosition, return a position on current preview page + added new hot-keys to Code Editor - Ctrl+Del delete the word before cursor, Ctrl+BackSpace delete the word after cursor(as in Delhi IDE) + added "MDI Designer" example - all language resources moved to UTF8, XML - fixed bug with html tags [sup] and [sub] - fixed width calculation in TfrxMemoView when use HTML tags - fixed bug with suppressRepeated in Vertical bands - fixed bug when designer not restore scrollbars position after undo/redo - fixed visual bug in toolbars when use Windows Vista + XPManifest + Delphi 2006 - fixed bug in CalcHeight when use negative LineSpace - fixed bug in frx2xto30 when import query/table components, added import for TfrDBLookupControl component - fixed bug with Cross and TfrxHeader.ReprintOnNewPage = true - fixed converting from unicode in TfrxMemoView when use non default charset - [fs] fixed bug with "in" operator - fixed bug with aggregate function SUM - fixed bug when use unicode string with [TotalPages#] in TfrxMemoView - fixed bug with TSQLTimeStampField field type - fixed designer dock-panels("Object Inspector", "Report Tree", "Data Tree") when use designer as MDI or use several non-modal designer windows - fixed bug with hide/show dock-panels("Object Inspector", "Report Tree", "Data Tree"), now it restore size after hiding - fixed bug in XML/XLS export - wrong encode numbers in memo after CR/LF - fiexd bug in RTF export - fixed bug with undo/redo commands in previewPages designer - fixed bug with SuppressRepeated when use KeepTogether in group - fixed bug with SuppressRepeated on new page all events fired twice(use Engine.SecondScriptcall to determinate it) version 4.4 --------------- + added support for CodeGear RAD Studio 2007 + improved speed of PDF, HTML, RTF, XML, ODS, ODT exports + added TfrxReportPage.BackPictureVisible, BackPicturePrintable properties + added rtti for the TfrxCrossView.CellFunctions property + added properties TfrxPDFExport.Keywords, TfrxPDFExport.Producer, TfrxPDFExport.HideToolbar, TfrxPDFExport.HideMenubar, TfrxPDFExport.HideWindowUI, TfrxPDFExport.FitWindow, TfrxPDFExport.CenterWindow, TfrxPDFExport.PrintScaling + added ability recompile frxFIB packages in "recompile wizard" + added ability to set color property for all teechart series which support it + added, setting frame style for each frame line in style editor + added TfrxPreview.Locked property and TfrxPreview.DblClick event + added 'invalid password' exception when load report without crypt + added new parameter to InheritFromTemplate (by default = imDefault) imDefault - show Error dialog, imDelete - delete duplicates, imRename - rename duplicates + added property TfrxRTFExport.AutoSize (default is "False") for set vertical autosize in table cells * redesigned dialog window of PDF export * improved WYSIWYG in PDF export - fixed bug, the PageFooter band overlap the ReportSummary band when use EndlessHeight - fixed bug with lage paper height in preview - fixed bug with outline and encryption in PDF export - fixed bug with solid arrows in PDF export - fixed bug when print TfrxHeader on a new page if ReprintOnNewPage = true and KeepFooter = True - fixed bug when used AllowSplit and TfrxGroupHeader.KeepTogether - fixed page numbers when print dotMatrix report without dialog - fixed bug with EndlessHeight in multi-columns report - fixed font dialog in rich editor - [fs] fixed bug when create TWideStrings in script code - fixed bug with dialog form when set TfrxButtonControl.Default property to True - fixed twice duplicate name error in PreviewPages designer when copy - past object - fixed bug with Preview.Clear and ZmWholePage mode - fixed bug with using "outline" together "embedded fonts" options in PDF export - fixed multi-thread bug in PDF export - fixed bug with solid fill of transparent rectangle shape in PDF export - fixed bug with export OEM_CODEPAGE in RTF, Excel exports - fixed bug with vertical size of single page in RTF export - fixed bug with vertical arrows in PDF export - fixed memory leak with inherited reports version 4.3 --------------- + added support for C++Builder 2007 + added encryption in PDF export + added TeeChart Pro 8 support + added support of OEM code page in PDF export + added TfrxReport.CaseSensitiveExpressions property + added "OverwritePrompt" property in all export components + improved RTF export (WYSIWYG) + added support of thai and vietnamese charsets in PDF export + added support of arrows in PDF export * at inheritance of the report the script from the report of an ancestor is added to the current report (as comments) * some changes in PDF export core - fixed bug with number formats in Open Document Spreadsheet export - fixed bug when input text in number property(Object Inspector) and close Designer(without apply changes) - fixed bug in TfrxDBDataset with reCurrent - fixed bug with memory leak in export of empty outline in PDF format - line# fix (bug with subreports) - fixed bug with edit prepared report with rich object - fixed bug with shadows in PDF export - fixed bug with arrows in designer - fixed bug with margins in HTML, RTF, XLS, XML exports - fixed bug with arrows in exports - fixed bug with printers enumeration in designer (list index of bound) - fixed papersize bug in inherited reports version 4.2 --------------- + added support for CodeGear Delphi 2007 + added export of html tags in RTF format + improved split of the rich object + improved split of the memo object + added TfrxReportPage.ResetPageNumbers property + added support of underlines property in PDF export * export of the memos formatted as fkNumeric to float in ODS export - fixed bug keeptogether with aggregates - fixed bug with double-line draw in RTF export - fix multi-thread problem in PDF export - fixed bug with the shading of the paragraph in RTF export when external rich-text was inserted - fixed bug with unicode in xml/xls export - fixed bug in the crop of page in BMP, TIFF, Jpeg, Gif - "scale" printmode fixed - group & userdataset bugfix - fixed cross-tab pagination error - fixed bug with round brackets in PDF export - fixed bug with gray to black colors in RTF export - fixed outline with page.endlessheight - fixed SuppressRepeated & new page - fixed bug with long time export in text format - fixed bug with page range and outline in PDF export - fixed undo in code window - fixed error when call DesignReport twice - fixed unicode in the cross object - fixed designreportinpanel with dialog forms - fixed paste of DMPCommand object - fixed bug with the export of null images - fixed code completion bug - fixed column footer & report summary problem version 4.1 --------------- + added ability to show designer inside panel (TfrxReport.DesignReportInPanel method). See new demo Demos\EmbedDesigner + added TeeChart7 Std support + [server] added "User" parameter in TfrxReportServer.OnGetReport, TfrxReportServer.OnGetVariables and TfrxReportServer.OnAfterBuildReport events + added Cross.KeepTogether property + added TfrxReport.PreviewOptions.PagesInCache property - barcode fix (export w/o preview bug) - fixed bug in preview (AV with zoommode = zmWholePage) - fixed bug with outline + drilldown - fixed datasets in inherited report - [install] fixed bug with library path set up in BDS/Turbo C++ Builder installation - fixed pagefooter position if page.EndlessWidth is true - fixed shift bug - fixed design-time inheritance (folder issues) - fixed chm help file path - fixed embedded fonts in PDF - fixed preview buttons - fixed bug with syntax highlight - fixed bug with print scale mode - fixed bug with control.Hint - fixed edit preview page - fixed memory leak in cross-tab version 4.0 initial release --------------------- Report Designer: - new XP-style interface - the "Data" tab with all report datasets - ability to draw diagrams in the "Data" tab - code completion (Ctrl+Space) - breakpoints - watches - report templates - local guidelines (appears when you move or resize an object) - ability to work in non-modal mode, mdi child mode Report Preview: - thumbnails Print: - split a big page to several small pages - print several small pages on one big - print a page on a specified sheet (with scale) - duplex handling from print dialogue - print copy name on each printed copy (for example, "First copy", "Second copy") Report Core: - "endless page" mode - images handling, increased speed - the "Reset page numbers" mode for groups - reports crypting (Rijndael algorithm) - report inheritance (both file-based and dfm-based) - drill-down groups - frxGlobalVariables object - "cross-tab" object enhancements: - improved cells appearance - cross elements visible in the designer - fill corner (ShowCorner property) - side-by-side crosstabs (NextCross property) - join cells with the same value (JoinEqualCells property) - join the same string values in a cell (AllowDuplicates property) - ability to put an external object inside cross-tab - AddWidth, AddHeight properties to increase width&height of the cell - AutoSize property, ability to resize cells manually - line object can have arrows - added TfrxPictureView.FileLink property (can contain variable or a file name) - separate settings for each frame line (properties Frame.LeftLine, TopLine, RightLine, BottomLine can be set in the object inspector) - PNG images support (uncomment {$DEFINE PNG} in the frx.inc file) - Open Document Format for Office Applications (OASIS) exports, spreadsheet (ods) and text (odt) Enterprise components: - Users/Groups security support (see a demo application Demos\ClientServer\UserManager) - Templates support - Dynamically refresh of configuration, users/groups D2010以上版本(D14_D19)安装必读 delphi2010以上版本(D14_D19)使用者安装时,请将res\frccD14_D19.exe更名名为frcc.exe frccD14_D19.exe是专门的delphi2010以上版本(D14_D19)编码器。其他低delphi版本,请使用frcc.exe

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧