|
|
| |
"Chapter 3: Building Microsoft Access 2000 Client/Server Applications" posted by ~Ray
Posted on 2008-11-13 12:36:46 |
Access 2000 Project GuideChapter 3: Building Microsoft Access 2000 Client/Server Applications Mark Roberts and Acey J. BunchMicrosoft CorporationFebruary 2000Applies To: Microsoft Access 2000Summary: Last in a series of three articles about developing client/server solutions by using Microsoft Access 2000 project files and tools. This article provides an overview of how to build forms and reports in a client/server environment how to write the programming code that glues it all together and how to administer and deploy your application. It will use the State University sample application to demonstrate many of the concepts discussed. (39 printed pages)Click here to download this sample from the Downloads Center. ContentsIntroductionCreating and Using FormsCreating and Using ReportsProgramming in Access ProjectsAdministration in Access ProjectsManaging SecurityDeploying Access ProjectsSummaryIntroductionThis is the last in a series of three articles that describe how to develop client/server applications by using Microsoft Access projects. This article discusses creating forms and reports that will be used to work with data from a Microsoft Data Engine (MSDE) or Microsoft SQL Server database how to write programming code to interact with the database and how to administer and deploy your application. The State University sample application will be used to demonstrate all topics covered. At this point we'll assume that you have at least created the State University Access project file built all of the tables and created the relationships between them and imported the sample data that we have provided or have downloaded and installed the completed sample application and are following along with it. Creating and Using FormsOne of the great things about Access projects is that they allow you to natively build applications against SQL Server or MSDE databases by using all the skills that you use to build applications against the Microsoft Jet database engine. Building a form is almost no different than building its Access database ( mdb) counterpart and using the form is practically the same as well. However there are a few things that are different and these differences will be discussed in detail in the following sections. To get started with using forms in Access projects let's go ahead and create the form that will interact with the State University Instructors table. Note We have created a basic form that you can use as a template for creating the State University forms. This form is named "Template" and can be found in the Template mdb file. It contains an empty detail area and is not connected to any particular record source but it does have the standard header graphics used for all of the State University forms. To use this template form import it from Template mdb into the StateU adp file that you have created by pointing to Get External Data on the File menu and then click Import. In the Import Objects dialog box click the Forms tab and click Template and then click OK. Create the Instructors FormIn this exercise we will create the Instructors form which is based solely on the Instructors table. In the Database window click Forms under Objects. Create a copy of the Template form by using the Copy and Paste commands on the Edit menu. When prompted name the form Instructors. Select the newly created Instructors form and then click Design on the Database window toolbar. On the View menu click Properties to open the Instructors form's property sheet. In the Record Source property box click the drop-down arrow and select Instructors as the record source. This will cause the Instructors field list to be automatically displayed. In the Instructors field list click the InstructorID field hold down the SHIFT key and then click the Email field to select all fields in the field list. Drag all the fields from the field list to the Detail section of the Instructors form. Arrange the fields in any way you like and when done close the Instructors form and save your changes. Display the newly created Instructors form by selecting the form in the Database window and then clicking Open on the Database window toolbar. Your form should look similar to the one shown in Figure 3.1. Figure 3.1. The Instructors formQuite easy isn't it? Just like an Access database!ALink("ver as mentioned in "Chapter 1: Understanding Microsoft Access 2000 Client/Server Development," there are some differences between forms in Access project ( adp) files and forms in Access database ( mdb) files. The next few sections will discuss these differences. The Navigation ButtonsThe most immediately noticeable difference is in the navigation buttons at the bottom of a form when it is opened for viewing. In addition to the standard buttons for navigating to the first previous next and last records there are two new buttons: Cancel Query and Maximum Record Limit which are shown in Figure 3.2. The Cancel Query buttonThe Cancel Query button is used to cancel the retrieval of records from the server which is useful if the retrieval is taking too much time. The effect of clicking this button is that you will have an incomplete set of records available in the form. For example let's say you open a form that is based on a table that contains 1,000 rows of data. If you click the Cancel Query button after retrieving the first 500 records only those first 500 records will be available in the form which means that clicking the Last Record button will take you to record 500 not record 1,000. To retrieve the remaining records you will need to refresh or requery the form's recordset which starts the retrieval process anew and retrieves all 1,000 records. To refresh a form's recordset click Refresh on the Records menu. To hide the Cancel Query button you must hide the entire navigation bar by setting the form's NavigationButtons property to No (false). The Maximum Record Limit buttonThe Maximum Record Limit button allows you to set the maximum number of records that Access will attempt to retrieve when it opens or refreshes a form's recordset. The default is 10,000 but you can of course change this setting to any value between 1 and 1,000,000. Setting the value to 0 or anything over 1,000,000 effectively sets the maximum to "no limit." Note You should use the "no limit" setting judiciously. On extremely large recordsets having no maximum record limit could slow down your application a great deal and your application would generate an excess amount of network traffic. To change the maximum record limit at run time click the Maximum Record Limit button and a dialog box will be displayed as shown in Figure 3.2. Figure 3.2. The Maximum Record Limit dialog boxYou can then either enter a value in the Max Records box or you can use the slider control to select a value. Clicking anywhere outside the Maximum Record Limit dialog box will close it and save the values you entered. Note Changing a form's maximum record limit value at run time causes the form to refresh its recordset and display the first record in the recordset. You can change the maximum record limit value at design time by setting the form's MaxRecords property in the property sheet. You can also set a global maximum record limit by typing a value in the Default max records box on the Advanced tab of the Access Options dialog box (Tools menu). However this global limit will apply only to forms created after you have specified the global limit and you can override this limit for any form by setting the form's maximum record limit as described previously. To hide the Maximum Record Limit button set the form's MaxRecButton property to No (false). Why are the new navigation buttons important?These new navigation buttons are important because SQL Server and MSDE are database server engines that run outside Access itself. Therefore when you try to retrieve data from the server your request is sent across the network to the database server the database server fulfills the request and then the data is sent back across the network to your Access application. All of this network traffic takes time and affects the performance of your application. To enhance performance when a form or table is opened. Access makes a single request to the server and then locally caches all of the data it retrieves in the form of a snapshot or cached recordset. These snapshots also allow forms to be displayed before all of the records have actually been brought down to the local computer. In addition by allowing you to specify the maximum number of records brought down from the server. Access gives you greater control over how your users will interact with your data and limits the demands that they will be placing on your database server and your network. All of these features improve the performance of your application. For more information about the new navigation buttons type control the number of records in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. Client/Server Form PropertiesSince an Access project uses SQL Server or MSDE as its database engine it makes sense that some additional properties would need to be added to its forms. There are seven new properties in an Access project form and one existing property that uses different values than are used in an Access ( mdb) database. The new properties are InputParameters. MaxRecButton. MaxRecords. ResyncCommand. ServerFilter. ServerFilterByForm and UniqueTable. The RecordsetType property is not new but its possible values differ when this property is used in an Access project form. The new properties are available in the property sheet for a form as shown in Figure 3.3. Figure 3.3. The Form property sheet showing additional properties for Access projectsThe following sections outline these additional properties and what they can be used for. RecordsetTypeThe RecordsetType property specifies the kind of recordset that is associated with a form. In Access databases the recordset type can be set to Dynaset. Dynaset (Inconsistent Updates) or Snapshot. But in Access projects the recordset type can be set to Snapshot or Updatable Snapshot (the default). If the RecordsetType property is set to Snapshot none of the bound fields on the form can be edited. However if the RecordsetType property is set to Updatable Snapshot the bound fields can be edited. For more details about updatable snapshots and updating data in general see "Updating Data" later in this chapter. For more information about the RecordsetType property type RecordsetType in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. MaxRecButtonAs mentioned previously in the "The Maximum Record Limit Button" section the MaxRecButton property specifies whether the Maximum Record Limit button is displayed on a form. Setting this property to No (false) hides the button. If you hide the Maximum Record Limit button the only way a user will be able to see more than 10,000 records at a time is to change the Default max records value on the Advanced tab of the Options dialog box (Tools menu). For more information about the MaxRecButton property type MaxRecButton in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. MaxRecordsThe MaxRecords property sets the maximum number of records that will be returned to the client. Setting this property overrides the Default max records value on the Advanced tab of the Options dialog box (Tools menu). If you set a value for the MaxRecords property in programming code you will need to call the form's Requery method to refresh the recordset. For more information about the MaxRecords property type MaxRecords in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. ServerFilterThe ServerFilter property filters the data that is retrieved from the database server and displayed in the Access project form. You use the same syntax for the ServerFilter property as you do to specify criteria in the WHERE clause of an SQL statement. For example you could restrict the number of rows retrieved in the Instructors form by setting its ServerFilter property value to something like the following: Copy CodeState='NV'In this case only instructors who live in Nevada would be displayed in the Instructors form. To set the ServerFilter property in code use the following syntax: Copy CodeMe. ServerFilter = "State='NV'"Me. RequeryNote the call to the form's Requery method which causes the form to refresh its underlying recordset. This call is necessary because the filter does is not automatically applied after you set the ServerFilter property. Note The ServerFilter property has no effect on forms that use a stored procedure as their record source. For more information about the ServerFilter property type ServerFilter in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. ServerFilterByFormThe ServerFilterByForm property specifies whether the form is opened in Server Filter By Form mode. If you set this property to Yes the form is opened in Server Filter By Form mode which means that no rows are retrieved from the form's record source when the form is first opened. This mode allows you to enter the filter criteria in the form's fields. You then apply the filter by clicking the Apply Server Filter button on the toolbar. To set the ServerFilterByForm property in programming code use the following syntax: Copy CodeMe. ServerFilterByForm = TrueNote The ServerFilterByForm property has no effect on forms that use a stored procedure as their record source. For more information about the ServerFilterByForm property type ServerFilterByForm in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. UniqueTableThe UniqueTable property specifies which table can be updated when the form is bound to a multiple-table view or stored procedure. If you need to bind the fields in the form to a record source that gets its data by joining tables you need to tell Access which of the tables contains the unique rows for the record source. The unique table will be the table that is on the "many" side of the relationship and once the UniqueTable property is set only the values in the unique table can be updated. This property is discussed in more detail in "Working with Updatable Snapshots" later in this chapter. Note Views and stored procedures are discussed in "Additional Record Sources" later in this chapter. For more information about the UniqueTable property type UniqueTable in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. ResyncCommandThe ResyncCommand property specifies an SQL statement that is used by Access to update the fields on the "one" side of the relationship when the record source for a form is based on a multiple-table view or stored procedure. This property works in conjunction with the UniqueTable property which establishes the updatable table on the "many" side of the relationship. To use the ResyncCommand property you must construct an SQL statement that is identical to the one used for your form's record source except that you must add a new WHERE clause that specifies the key columns of the table specified in the UniqueTable property with question marks ("?") in place of a specific value or parameter. The purpose of the ResyncCommand property is to determine how Access retrieves updated data after the data has been saved to the server database. For example let's suppose that you wanted to build a form in the State University database that displays all the courses along with information about the assigned instructors. To do this you could write a stored procedure with an SQL statement similar to the following: Copy CodeSELECT A. FirstName. A. LastName. B.* FROM Instructors AS A RIGHT OUTER JOIN Courses AS B ON A. InstructorID = B. InstructorIDIf you create a new form that uses this stored procedure as its record source because this statement involves a join you will need to set the form's UniqueTable property to the Courses table. Because Access allows you to update fields only in the table specified by the UniqueTable property when you open the form you'll notice that you can modify only fields that come from the Courses table not those that come from the Instructors table. Additionally if you try to change the value of the InstructorID field you'll notice that the change was accepted but when you refresh or save the record the instructor's first and last names are not updated to reflect the change. This behavior occurs because you also need to tell Access how to make the updates to the form by setting the ResyncCommand property to the SQL statement that specifies your record source with an additional WHERE clause that specifies the key field from the Courses table (CourseID) equal to a "?" as shown in the following statement: Copy CodeSELECT A. FirstName. A. LastName. B.* FROM Instructors AS A RIGHT OUTER JOIN Courses AS B ON A. InstructorID = B. InstructorID WHERE B. CourseID = ?Note The CourseWithInstructorInfo form in the State University sample database demonstrates the concepts discussed in this section. For more information about the ResyncCommand property type ResyncCommand in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. InputParametersWhen you use an SQL statement or stored procedure that requires one or more input parameters as the underlying record source for a form you must set the InputParameters property to the field that contains the value that is used to filter the records returned to the form. Alternatively you can specify text in the field to prompt the user to enter a value. Note Additional Access project form record sources are discussed in "Additional Record Sources" later in this chapter. When you are using an SQL statement as the form's record source the syntax for the InputParameters property is as follows: Copy CodeFieldName DataType=[PromptingText]|FormFieldNameFieldName is the name of the field in your SQL statement that you are using as the parameter and DataType is the data type of the parameter. You have the choice of either specifying prompting text that asks the user to enter the parameter value or you can specify a field on the form (FormFieldName) as the parameter value. For example let's say that you want to create an Instructors form that prompts the user for the InstructorID value and then displays only that one record in the form. To do this you would set the form's RecordSource property to the following SQL statement: Copy CodeSELECT * FROM Instructors WHERE InstructorID = ?Then you would set the form's InputParameters property to the following: Copy CodeInstructorID int=[Enter the InstructorID:]When the user first opens the form the message box shown in Figure 3.4 will be displayed. Figure 3.4. The Enter Parameter Value dialog boxNote The Instructors (SQL) form in the State University sample database demonstrates how to use an SQL statement with parameters as a record source. When you are using a stored procedure as the form's record source the syntax that is used in the InputParameters property is as follows: Copy CodeParameterName DataType=[PromptingText]|FormFieldNameParameterName is the name of the actual parameter used in the stored procedure including the @ prefix symbol and DataType is the data type of the parameter. As when you are using an SQL statement as the form's record source you have the choice of either specifying the prompting text that asks the user to enter the parameter value or you can specify a field on the form (FormFieldName) as the parameter value. For example let's say that you want to create an Instructors form that prompts the user for the InstructorID value and then displays only that one record in the form. To do this you would set the form's RecordSource property to the name of the stored procedure that retrieves the instructor name which in this case is GetInstructor. The GetInstructor stored procedure is as follows: Copy CodeCREATE PROCEDURE GetInstructor ( @InstructorID int )AS SELECT * FROM Instructors WHERE InstructorID = @InstructorID RETURN Then you would set the form's InputParameters property to the following: Copy Code@InstructorID int=[Enter the InstructorID:]Note The Instructors (Stored Procedure) form in the State University sample database demonstrates how to use a stored procedure with parameters as a record source. For more information about the InputParameters property type InputParameters in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. Updating DataRelated to how Access uses snapshots to cache client-side recordsets is the question of how updates to the data are handled. The update process is managed through the use of an updatable snapshot which is simply a local copy of the recordset that can be updated. The following sections discuss various issues involving the use of updatable snapshots. General rules for updating dataThe way Access updates data in an Access project differs in a number of ways from the way it updates data in an mdb file. The following rules apply when you are updating data from an Access project: To update any column (including the primary key column) in a single table or base table of a join you must have a unique column or combination of columns defined as a PRIMARY KEY constraint a UNIQUE constraint or any unique index on that table. You can update data based on a one-to-many join in a form but only for columns from the "many" side of the join. When you open a view or run a stored procedure that contains a join in Datasheet view the data is read-only. However you can update data from a form even if it has a view or stored procedure as a record source if you set the form's UniqueTable property (see the following section. "Working with Updatable Snapshots"). To update a view or stored procedure you must have UPDATE. INSERT and DELETE permissions on the base table(s) referenced in the view or procedure as well as SELECT permission on the view or EXECUTE permission on the procedure. You can't update data derived from a self-join (such as the relationship between all employees [EmployeeID] and the managers they report to [ReportsTo] in the Employees table in the Northwind SQL Access project file [NorthwindCS adp] sample application) under any circumstances. Additionally the following rules apply to updating data in both Access databases ( mdb files) and Access projects: You can't update a form or datasheet if the SQL statement underlying the record source contains a GROUP BY or COMPUTE clause. You can't update columns based on expressions (such as "price * quantity AS extended_price"). You can't update a form or datasheet based on a many-to-many join. Working with updatable snapshotsFor an updatable snapshot that has been created for a one-to-many join operation (whether in a view row-returning stored procedure or SQL statement) an Access project supports inserting deleting and updating data only in the columns of the table that is specified by using the UniqueTable property of a form. The UniqueTable property specifies the table in the join whose rows each correspond to at most one row in the set of rows returned for the joined tables. For example in a view that joins the Customers and Orders tables. Orders is the unique table because one row from the Orders table corresponds to at most one unique row in the view. By contrast one row in the Customers table can correspond to multiple rows in the view. Put more simply the UniqueTable should specify the "many" side of a join and only that table's columns will be updatable; Access doesn't allow you to update columns on the "one" side of the join. You can see this behavior by opening the Northwind SQL Access project file sample application (NorthwindCS adp) selecting the view named Alphabetical List of Products and then clicking the AutoForm button on the toolbar to create a simple form. At this point none of the columns on the form are editable and the New Record button is disabled. To make the form updatable you must specify which of the tables in the view is the unique table. The Alphabetical List of Products view joins the Categories and Products tables and the Products table is the "many" side of the join so it should be designated as the unique table. To do this switch the form to Design view display the form's property sheet and on the Data tab set the UniqueTable property to the Products table. When you switch the form back to Form view all columns except the CategoryName column (the only column displayed from the Categories table) are editable and you can now add or delete rows. In an updatable snapshot you see current values in an edited or newly inserted row only after it has been successfully saved. For example the Orders table in the Northwind SQL Access project file sample application contains an identity column as its primary key. When you insert a row into this table the new OrderID value appears after you save the row or move to another row (which implicitly saves the row). Similarly in a form based on a view joining Customers and Orders if you update the OrderID column to a different CustomerID column value the Address column will not show the address of the new customer until after the row has been saved. Additional Record SourcesIn addition to using a table as a record source as we did in the first exercise you can also use a view or a stored procedure. Both views and stored procedures can be developed within the Access environment but they are stored in the MSDE or SQL Server database file ( mdf) on the server not in the Access ( adp) file. Note It is also possible to specify or change the record source for a form in Visual Basic for Applications (VBA) code by setting the form's Recordset property to point to an ActiveX Data Objects (ADO) Recordset object. For information about how to do this see "The Form Recordset Property" later in this chapter. ViewsAs mentioned in "Chapter 1: Understanding Microsoft Access 2000 Client/Server Development," a view is similar to a SELECT query in a Microsoft Jet database application in that it is a result set of data retrieved from one or more tables. When you bind a form to a particular view the result set is updatable. Using a view allows you to filter particular columns from the result set so that you only access the columns that you need to. It also provides a level of abstraction from the base tables within the database thus allowing you to set permissions so that the only way to gain access to the base tables is through views. To create a view you use the Query Designer by clicking Views under Objects in the Database window and then clicking New. The Query Designer in Access projects has a very similar look and feel to the query Design window in Access databases. The Query Designer allows you to specify the tables and views you want to build a view from the fields from those sources and additional criteria to further refine the results returned. In addition if you open the SQL pane by clicking the SQL button on the toolbar you can see the SQL statements generated by the Query Designer or you can enter SQL statements directly instead of building the view visually. Note For a look at the Access project Query Designer see Figure 1.5 in "Chapter 1: Understanding Microsoft Access 2000 Client/Server Development."For more information about views type Working with Views in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search or see SQL Server Books Online January 2004 Update and search for views overview on the Index tab. Note The material in SQL Server Books Online applies to MSDE as well as SQL Server even though SQL Server Books Online only occasionally mentions MSDE. Stored proceduresStored procedures are perhaps one of the most powerful features of SQL Server and MSDE databases. They allow you to use a mixture of ANSI-92 SQL syntax control-of-flow programming statements and built-in functions to build precompiled procedures that are stored in the server database. This allows you to encapsulate some of the more database-intensive programming logic at the server so that your client application can simply manage calling the stored procedures without having to be involved in how the results are produced. You have already seen some stored procedure programming in "Chapter 2: Implementing Microsoft Access 2000 Client/Server Databases," when we created triggers and earlier in this chapter when we used a stored procedure as the record source for a form. In "Transact-SQL Programming in Access Projects" later in this chapter we will take a closer look at some of the things that you can do with Transact-SQL and stored procedures. For more information about stored procedures type stored procedures in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search or see SQL Server Books Online and search for stored procedures overview on the Index tab. Creating the Courses FormNow that we have discussed the different types of record sources that can be used for Access project forms let's apply this knowledge to the State University sample application. Create the Courses FormIn this exercise we will build a view to the Courses table and then build a form that uses that view as its record source. In the Database window click Views under Objects then click New to open the Query Designer. Click the SQL button on the toolbar to open the SQL pane and then enter the following SQL statement: Copy CodeSELECT * FROM CoursesClose the Query Designer and save the view as vwCourses. In the Database window click Forms under Objects and then make a copy of the Template form and rename it Courses. Select the newly created Courses form and click Design on the Database window toolbar. On the View menu click Properties to open the property sheet for the Courses form. In the Record Source property box click the drop-down arrow and select vwCourses. The Courses field list will automatically be displayed. In the Courses field list click the CourseID field hold down the SHIFT key and then click the EndTime field to select all fields in the field list. Drag all the fields from the field list to the Detail section of the Courses form. Arrange the fields in any way you like and when done close the Courses form and save your changes. You can display the newly created Courses form by selecting the form in the Database window and clicking Open on the Database window toolbar. Your form should look similar to Figure 3.5. Figure 3.5. The Courses formNote The Courses form above shows the use of combo boxes for the Instructors and Quarter fields. You can do this by using the same techniques you would use when creating combo boxes in Access (* mdb) databases. Creating and Using ReportsSimilar to forms reports in Access projects work the same as when they are in an Access (* mdb) database but there are two additional report properties that you can use to filter the data that is displayed in the report. In addition you can dynamically alter the appearance of your report by using a new feature of Access 2000 called conditional formatting. Client/Server Report PropertiesIn a client/server application you will want to reduce network load and handle the majority of the data processing on the server. Therefore you should filter the data displayed in reports as much as possible thereby reducing network traffic and improving performance. To achieve this goal you can use the InputParameters and ServerFilters properties of Access project reports. These two properties are available in the property sheet for a report as shown in Figure 3.6. Figure 3.6. The Report property sheet showing additional properties for Access projectsThe following sections outline these properties and what they can be used for. InputParametersThe InputParameters report property behaves the same as the InputParameters form property. It allows you to prompt the user for information that you can use to filter the result set that is returned by the server and displayed on the report. The syntax used for the InputParameters report property is the same as the syntax used for the InputParameters form property. For details about how to use this property see "InputParameters" under "Client/Server Form Properties" earlier in this chapter. ServerFilterThe ServerFilter report property behaves the same as the ServerFilter form property. It allows you to filter the data that is retrieved from the database server and displayed in the Access project report. You use the same syntax for the ServerFilter property as you do to specify criteria in the WHERE clause of a SQL statement. For details about how to use this property see "ServerFilter" under "Client/Server Form Properties" earlier in this chapter. Using Conditional FormattingA great new feature of Access 2000 that is available in both Access databases and Access projects is conditional formatting. This feature allows you to specify expressions that are evaluated against the data in your report and based on the outcome of those expressions (or conditions) to dynamically alter the appearance of the data. Conditional formatting can be set based on: The value in a control An arbitrary expression that references another control A user-defined VBA function To use conditional formatting select the controls on your report that you want to be dynamically altered and then click Conditional Formatting on the Format menu. This will display the Conditional Formatting dialog box as shown in Figure 3.7. Figure 3.7. The Conditional Formatting dialog boxIn the above dialog box you specify the criteria to be used in your condition and the formatting that will take place once the condition is met. In the following exercise. "Creating the Student Transcript Report," we will build a condition for a report. For more information about conditional formatting type conditional formatting in the Office Assistant or on the Answer Wizard tab in the Microsoft Access Help window and then click Search. Creating the Student Transcript ReportCreate the Student Transcript ReportIn this exercise we will build a very simple Student Transcript report. In the Database window click Reports under Objects and then click New. In the New Report dialog box select Design View and then click OK. On the View menu click Properties to open the report's property sheet. Set the RecordSource property to the CourseEnrollment stored procedure. The CourseEnrollment field list will automatically be displayed. Set the InputParameters property to: Copy Code@StudentID int = [Enter the StudentID:]Set the Caption property to Student Transcript and then close the property sheet. Drag the CourseID. Name. Quarter and Year fields from the field list to the Detail section of the report. Delete the labels for the fields and create new labels for them in the Page Header section of the report. Create a text box in the Report Header section of the report and set its ControlSource property to: Copy Code=[FirstName] & " " & [LastName]Add any other items (such as footers) that you may need. Select all of the controls in the Detail section of the report and then click Conditional Formatting on the Format menu. In the Conditional Formatting dialog box set Condition 1 to Expression Is and then type the following expression in the text box: Copy Code[Year]>=Format(Date(),'yyyy')Set the formatting of the condition to bold by clicking the Bold button and then click OK to save the conditional formatting. Close and save the report as Student Transcript. To test your report select the report in the Database window and then click Preview on the Database window toolbar. When prompted enter a student ID. Your report should be similar to the one shown in Figure 3.8. Figure 3.8. The Student Transcript reportProgramming in Access ProjectsThis section provides an overview of the Transact-SQL language the native SQL dialect of SQL Server and MSDE as well as the various Automation programming models you can use to work with application and data objects in an Access 2000 client/server application by using VBA. It is beyond the scope of this article and the State University sample application to provide extensive detail but we will point out many of the issues that are unique to programming in Access projects and provide references to important sources of additional information. Transact-SQL Programming in Access ProjectsThe Transact-SQL language is the native SQL dialect used by both SQL Server and MSDE. SQL is a standard interactive and programming language for working with relational databases. Standards for SQL have been defined by both the American National Standards Institute (ANSI) and the International Standards Organization (ISO). Transact-SQL supports the Entry Level of ANSI SQL-92 the latest SQL standard (published in 1992) and also contains proprietary extensions to the standard language. For more information about the SQL standard see the JCC SQL Standards Page. Transact-SQL is a powerful database programming language that can be used to perform a broad array of tasks in SQL Server and MSDE but its primary functions fall into three areas: Data definition language (DDL)—Statements that are used to create the objects that contain and organize relational data: tables indexes and relationships. Data manipulation language (DML)—Statements that are used to retrieve add modify and delete data in the relational database tables Administration—Statements that are used to define access control by creating security groups and user accounts and defining their differing levels of access to data in the database. Transact-SQL can also be used to automate tasks such as backing up dropping (deleting) or restoring databases configuring replication and other administrative tasks. Access itself and the OLE DB components it uses to connect to SQL Server and MSDE databases use Transact-SQL to drive most interactions with the database. Users and developers can enter Transact-SQL code to work with SQL Server and MSDE databases from Access projects in the following ways: In the SQL pane of the Query Designer to create views. In the Stored Procedure Designer to create stored procedures. In the Triggers for Table: TableName dialog box to create triggers. In the RecordSource property of a form or report to specify its underlying data source. In ADO code and in code for Automation object models that can use Transact-SQL to perform DDL. DML and administrative functions. Note Depending on where you write the Transact-SQL code and what database objects it is working against there are limitations on what Transact-SQL statements you can use. For example when you create triggers you cannot use statements that alter create or drop (delete) database objects. For information about the appropriate Transact-SQL code for a given task see SQL Server Books Online. Many other operations in Access projects generate and use Transact-SQL code to work with the database such as when you use the tools for designing tables views and database diagrams. Similarly when users work with reports datasheets forms and data access pages. Transact-SQL is used to display add modify or delete records. There are many examples of writing Transact-SQL statements throughout this series of articles. The Microsoft Access Help system provides an alphabetic reference of Transact-SQL keywords and SQL Server/MSDE error messages. To read these topics you must display an Access Help topic click the Show button and then click the Contents tab. The location of these topics in the table of contents varies depending on whether you've installed the Office Update Answer Wizard Extension for Office 2000 from http://officeupdate microsoft com/2000/downloadDetails/ouawe htm. If you haven't installed the Answer Wizard extension only three books are displayed in the table of contents and you can click the Transact-SQL Help book or the SQL Server Error Messages Help book. If you have installed the Answer Wizard Extension additional sets of Help topics are available and the Transact-SQL and error messages topics are somewhat buried. To locate these topics scroll down and click the Working with Microsoft Access Projects book and then click the Working in Microsoft Access Projects book and finally click either the Transact-SQL Help or SQL Server Error Messages Help books. The Transact-SQL and error messages Help topics are actually a subset of the much more extensive SQL Server reference called SQL Server Books Online which includes additional information about using Transact-SQL. SQL Server Books Online is installed with SQL Server itself but you can download it from SQL Server Books Online January 2004 Update. You can also read SQL Server Books Online on the Web in the MSDN™ Library as part of the Data Access Services SDK. In the Data Access Services SDK. SQL Server Books Online is called the Microsoft SQL Server Programmer's Toolkit. VBA Programming in Access ProjectsVBA programming tasks in Access projects falls into three general areas that relate to the fact that you are working with a client/server application: Data access programming—Working with the data objects that are part of the server-side of your application; that is the database itself: tables views and stored procedures. Access-specific programming—Working with objects that are part of the client side of your application; that is the objects that are actually stored in your adp file: forms reports links to data access pages macros and modules. The Access programming model also provides ways of working with the connection Access itself uses to read and work with data and provides ways of retrieving information about the objects that contain data but does not provide ways of working directly with the data those objects expose. Server-management programming—Working with the server itself to perform administrative tasks such as backing up and restoring databases modifying security settings and managing replication tasks. Data access programmingVBA data access programming in Access projects can be accomplished by using two programming models: ActiveX Data Objects (ADO) ActiveX Data Objects Extensions for DDL and Security (ADOX) The following sections briefly describe these programming models and provide pointers to additional resources. ADOADO is a data access interface used to communicate with OLE DB-compliant data sources such as SQL Server and MSDE. Data applications can use ADO to connect to and retrieve manipulate and update data from SQL Server and MSDE. The most common operations when you are using ADO to work with SQL Server and MSDE databases are: Opening connections to MSDE and SQL Server databases. Opening and working with records by using Recordset objects. Executing parameterized stored procedures by using Command objects. Executing ad-hoc Transact-SQL statements by using Command objects. Sinking to ADO events. Handling ADO errors by using the Errors collection. The "Access-Specific Programming" section later in this chapter demonstrates some features of ADO that are specific to objects in the Access programming model. For information about using ADO with SQL Server and MSDE see the "ADO and SQL Server" book which is contained in the "Building SQL Server Applications" book in SQL Server Books Online. For reference information about ADO see the ActiveX Data Objects Help file which by default is located at C:\Program Files\Common Files\System\ado\ado210 chm. For a general introduction to ADO see Chapter 14. "Working with the Data Access Components of an Office Solution" in the Microsoft Office 2000/Visual Basic Programmer's Guide. For information about technical issues known bugs and limitations of ADO and other parts of the MDAC see the MDAC Readme file which by default is located at C:/Program Files/Common Files/System/ado/MDACReadme htm. ADOXADOX is an extension to the ADO objects and programming model. It exposes additional objects for creating modifying and deleting schema objects such as tables and procedures. It also includes security objects to maintain user accounts and groups and to grant and revoke permissions on objects. However the Microsoft OLE DB Provider for SQL Server does not support many ADOX features. The unsupported features are listed below by object or collection: Catalog object: Create method. Tables collection: Properties for existing tables are read-only (properties for new tables can be read/write). Views collection: Not supported. Procedures collection: Append method. Delete method. Command property. Keys collection: Append method. Delete method. Users collection: Not supported. Groups collection: Not supported. Because ADOX is not well supported against SQL Server and MSDE databases as an alternative you can perform a more complete set of DDL and administration programming tasks by executing Transact-SQL statements against ADO Command objects or by using the SQL Distributed Management Objects (SQL-DMO) programming model. For reference information about ADOX see C:\Program Files\Common Files\System\ado\ado210 chm. For information about technical issues known bugs and limitations of ADOX and other parts of the MDAC see the MDAC Readme file which by default is located at C:/Program Files/Common Files/System/ado/MDACReadme htm. For reference information about using SQL-DMO see the "Developing SQL-DMO Applications" book which is contained in the "Building SQL Server Applications" book in SQL Server Books Online. Access-specific programmingThis section provides an overview of the new objects properties and methods that were added to the Microsoft Access 9.0 object library to allow you to work with an Access project. For complete documentation of the Access object model search Microsoft Access Visual Basic Reference Help for the item you want information about. Creating opening and closing an Access projectWhile you typically create open and close an Access project by using the Access user interface the Access 2000 object model has been extended to allow you to automate these operations from any application that supports VBA or from an add-in or wizard. You use the OpenAccessProject. NewAccessProject or CreateAccessProject methods to open or create an Access project file. The NewAccessProject method creates a new Access project file and causes it to become active in the current instance of Access whereas the CreateAccessProject method simply creates an Access project file on disk. You use the OpenAccessProject method to open an existing Access project file and the CloseCurrentDatabase method to close the current Access project file. The following code sample from the modADO module in the State University sample application is designed to work in any Office application and demonstrates how to create and close a new Access project file. Copy CodeSub CreateADP() Dim appAccess As Variant ' Create new instance of Microsoft Access. Set appAccess = CreateObject("Access. Application.9") appAccess. Visible = True ' Open database in Microsoft Access appAccess. NewAccessProject "c:\new adp" ' Switch to the new instance of Access to view ' the new project file. Stop ' Close open database appAccess. CloseCurrentDatabase ' Delete file because this is a demonstration. Kill "c:\new adp" ' Close and destroy instance of Application object appAccess. Quit Set appAccess = NothingEnd SubOnce you create and open a new Access project you use other methods of the Application object to create new Access objects. For example you use the CreateForm and CreateControl methods to create forms and controls on forms. You use the CreateReport and CreateReportControl methods to create reports and controls on reports. For information about creating wizards and add-ins see "Chapter 11: Add-ins. Templates. Wizards and Libraries" in the Microsoft Office 2000/Visual Basic Programmer's Guide. Working with objects in an Access projectIn the current and previous versions of Access you can use the Data Access Objects (DAO) Container and Document objects and their methods and properties to get information about forms reports macros tables fields relationships and queries in an Access database ( mdb). You can't use DAO to interact with the objects in an Access project file however. Access 2000 has two new objects—CurrentData and CurrentProject—that contain collections of AccessObject objects which are used in place of the Container and Document objects available through DAO in previous versions. Access 2000 uses the CurrentData object to store collections of AccessObject objects that are administered by the database engine (MSDE or SQL Server); for example database diagrams stored procedures tables and views. Information about each collection of objects is stored in a collection where each object is represented as an AccessObject object. For example information about tables is contained in the AllTables collection and information about views is stored in the AllViews collection. To access the CurrentData object you use the CurrentData property of the Application object. Note AccessObject objects contain information about the objects that contain data but do not provide access to the data itself. To work with data you must use ADO. For more information about using ADO to work with data see "Data Access Programming" earlier in this chapter. These collections of AccessObject objects also allow you to work around certain limitations of ADOX. For example when you are using the ADOX object library against the Microsoft OLE DB Provider for SQL Server (SQLOLEDB) you can't access information from the Views collection of the Catalog object. In an Access project you can work around that limitation by using the AllViews collection of the CurrentData object as demonstrated by the following code sample from the modADO module in the State University sample application. Copy CodeSub ListViews() Dim objView As AccessObject For Each objView In CurrentData. AllViews Debug. Print objView. Name Next Debug. Print "Total Views: " & CurrentData. AllViews. CountEnd SubFor more information about using ADOX see "Data Access Programming" earlier in this chapter. You use the CurrentProject property of the Application object to get information about the Access-specific objects in an Access project file such as data access pages forms macros modules and reports. The CurrentProject property returns the CurrentProject object which contains collections of AccessObject objects that provide information about the Access-specific objects in the Access project. For example the AllForms collection contains information about all the forms in a database and the AllReports collection contains information about all the reports in the database. In addition to these collections the CurrentProject objects also contains the name path and connection information for the Access project file itself. An AccessObject object exposes the following properties that you can use to get information about an object: IsLoaded. Name. Parent. Properties and Type. These properties are described in the following table. Table 3.1. AccessObject object properties for the CurrentProject objectAccessObject property Description IsLoaded A Boolean value indicating whether the object is currently loaded. This property is True when an object is open in any view. Name A String value representing the name of the object. Parent Returns the parent object for the specified object. For example the parent of an item in the AllForms collection is the AllForms collection object. The parent of the CurrentProject object is the Application object. Properties Returns an AccessObjectProperties collection which contains all the custom properties associated with a particular AccessObject object. The Properties collection can store String or Long Integer values only. For example in previous versions of Access if you wanted to display a list of all reports in an Access database ( mdb) you would use the Containers("Reports") collection in DAO to retrieve the names of the reports. To populate the lstReports control on the Reports form in the State University sample application we used the AllForms collection of the CurrentProject object as demonstrated by this event procedure in the form's Load event: Copy CodePrivate Sub Form_Load() Dim strFill As String Dim objReport As AccessObject ' Build a semicolon delimited string that contains ' a list of all the reports in the current project. For Each objReport In CurrentProject. AllReports strFill = strFill & objReport. Name & ";" Next ' Make sure the RowSourceType property of the control ' is set to Value List lstReports. RowSourceType = "Value List" ' Fill the list by setting the RowSource property to strFill lstReports. RowSource = strFill ' Move focus to the list box lstReports. SetFocus ' Select the first item in the list box by default lstReports. Selected(0) = TrueEnd SubUsing the Connection property of the CurrentProject object in an Access projectWhen you use the Connection property of the CurrentProject object in an Access database ( mdb). Access returns a connection that uses the Microsoft Jet 4.0 OLE DB Provider. However when you use the Connection property of the CurrentProject object in an Access project ( adp). Access doesn't return a direct connection to the SQL Server database. Instead it uses the Microsoft Data Shaping Service for OLE DB which is an OLE DB service component that runs on top of a data provider. For Access project files the data provider that is used in conjunction with the Microsoft Data Shaping Service for OLE DB is the Microsoft OLE DB Provider for SQL Server. This provider is required because updates to data in forms in an Access project require the Shaping Service. This provider is also required if you use the Recordset property of a form in an Access project to programmatically specify the form's data source. For more information about using the Recordset property of a form in an Access project see "The Form Recordset Property" later in this chapter. The fact that the Connection property returns a Connection object that uses the Microsoft Data Shaping Service for OLE DB does have certain consequences: Recordset objects always use the client-side cursor engine (CursorLocation=adUseClient). Even if you set the CursorLocation property of a Recordset object to adUseServer prior to creating a Recordset object by using the Execute method of a Connection object the Execute method of a Command object or the Open method of a Recordset object you will always get a client-side cursor. Note For more information about cursors and cursor engines see Chapter 14. "Working with the Data Access Components of an Office Solution" in the Microsoft Office 2000/Visual Basic Programmer's Guide. Recordset objects always use a Static cursor (CursorType=adOpenStatic) regardless of what you set the CursorType property to when you are opening the Recordset object. You can set the LockType property of a Recordset object to the adLockOptimistic adLockBatchOptimistic or adLockReadOnly constants. If you set the LockType property to adLockPessimistic the setting is converted to adLockOptimistic. As with Recordset objects created with other connections if you don't specify a setting for the LockType property the property will be set to adLockReadOnly by default. A Connection object established by using the Microsoft Data Shaping Service for OLE DB doesn't support all the ADOX operations that a Connection object established by using a direct connection through the Microsoft OLE DB Provider for SQL Server supports. In particular operations on the Properties collection of the Column object are not supported. Note The ADOX Views. Users and Groups collections are not supported against SQL Server when you use connections through either the Microsoft Data Shaping Service for OLE DB or the Microsoft OLE DB Provider for SQL Server. The Properties collection of a Connection object doesn't support the same properties as a direct connection. For example the DBMS Version property is not supported. If the CommandType property of a Command object isn't specified the connection will not try to open the Command object as a table if the CommandText property doesn't refer to a stored procedure. You can avoid this problem either by specifying an SQL statement to open the table (for example. SELECT * FROM Students) or by explicitly specifying the CommandType as adCmdTable when you are opening the Command object as shown in the following procedure from the modADO module in the State University sample application: Copy CodeSub OpenCurrentProjectConnection() Dim rst As New ADODB. Recordset Dim cmd As New ADODB. Command ' Specify properties of the Command object. With cmd. ActiveConnection = CurrentProject. Connection. CommandText = "Students" . CommandType = adCmdTable End With ' Open the Recordset object by using the Command object. Set rst = cmd. Execute ' Display connection string. Debug. Print rst. ActiveConnection ' Close and destroy objects rst. Close Set cmd = Nothing Set rst = NothingEnd SubYou can also avoid this and any other limitations that you might encounter when you are using the Microsoft Data Shaping Service for OLE DB by creating a separate connection that doesn't use the Shaping Service. You can create a separate connection by using the BaseConnectionString property of the CurrentProject object. The BaseConnectionString property returns a connection string that uses only the Microsoft OLE DB Provider for SQL Server (Provider=SQLOLEDB.1). The following procedure from the modADO module in the State University sample application shows one way to open a Recordset object by using the BaseConnectionString property: Copy CodeSub OpenBaseConnectionString() Dim rst As New ADODB. Recordset Dim cmd As New ADODB. Command ' Specify properties of the Command object. With cmd. ActiveConnection = CurrentProject. BaseConnectionString. CommandText = "Students" End With ' Open the Recordset object by using the Command object. Set rst = cmd. Execute ' Display connection string. Debug. Print rst. ActiveConnection ' Close and destroy objects rst. Close Set cmd = Nothing Set rst = NothingEnd SubFor more information about the features of the Microsoft Data Shaping Service for OLE DB search ADO Help for "data shaping."The Form Recordset propertyIn an Access project file you can use the Recordset property of an Access Form object to specify an ADO Recordset object that will be used as the form's record source. If you want the record source to be updatable you must do the following three things: You must specify that the Connection object that is used to open the Recordset object is using the Microsoft Data Shaping Service for OLE DB provider. To do this you must set the Provider property in the connection string that is used to open the Connection object to MSDataShape. You must specify that the Data Provider property in the connection string is using the Microsoft OLE DB Provider for SQL Server (Data Provider=SQLOLEDB). You must set other connection string properties as described in Table 3.2. Table 3.2. Connect string property settings for an Updatable record sourceConnection string property Description Provider This property must be set to MSDataShape to specify the Microsoft Data Shaping Service for OLE DB. Data Provider This property must be set to SQLOLEDB to specify the Microsoft OLE DB Provider for SQL Server. If you use any other OLE DB provider it will return a read-only connection. Data Source This property specifies the server name which is the same as the network name of the computer on which SQL Server is running. To view this name open Windows Control Panel click the Network icon and read the value in the Computer Name box on the Identification tab. If you are working with a server that is installed on the same computer as the one running your Access project you can set the Data Source property to (local). Initial Catalog This property specifies the name of the database to open. User ID If you are using SQL Server Authentication use this property to specify the user account name (such as sa the default user account). Don't set this property if you are using Windows NT Authentication. Password If you are using SQL Server Authentication use this property to specify the password for the user account specified with the User ID property. Don't set this property if you are using Windows NT Authentication. Trusted_Connection If you are using Windows NT Authentication instead of SQL Server Authentication set this property to Yes. To demonstrate how to use the Recordset property to bind the recordset of a form to an ADO Recordset object in an Access project let's create a form in StateU adp that will display data from the Customers table in the back-end database for the Northwind Traders sample application. Note The following exercise assumes that you have installed the Northwind Traders sample Access project (NorthwindCS adp) and that it is available on your local server. For information about installing the Northwind Traders sample Access project see "Installing the Northwind Traders Sample Microsoft Access Project" in "Chapter 1: Understanding Microsoft Access 2000 Client/Server Development."Create the Customers Form In the Database window click Forms under Objects. Make a copy of the Template form and name it Customers (Recordset Property). Select the newly created Customers form and click Design on the Database window toolbar. On the View menu click Toolbox and then use the toolbox to add four text boxes to the form. Click the first text box and then click Properties on the View menu. Set the Name property of the control to txtContactName. Repeat this process for the remaining text box controls setting their Name properties to txtCompanyName txtAddress and txtCity. Set the Caption property of each label control to correspond to the text box control it is attached to: Contact Name:. Company Name:. Address: and City:. To enter code behind the form click Code on the View menu. In the Object Box in the Code window click Form to create an empty Form_Load event Sub procedure. Paste the following code in the Sub procedure: Copy CodePrivate Sub Form_Load() Dim rst As ADODB. Recordset Dim strConnect As String Dim strSQL As String ' Create connection string to connect to NorthwindCS database ' using the Microsoft Data Shaping Service for OLE DB provider strConnect = "Provider=MSDataShape;Data Provider=SQLOLEDB;" _ & "Integrated Security=SSPI;Data Source=(local);" _ & "Initial Catalog=NorthwindCS" ' Create SQL statement to select customers from Spain strSQL = "SELECT ContactName. CompanyName. Address. " & _ "City FROM Customers WHERE (Region = 'SP')" ' Initialize and open the Recordset object. Set rst = New ADODB. Recordset With rst. ActiveConnection = strConnect. LockType = adLockOptimistic. Open strSQL End With ' Set form's Recordset property to use the new Recordset ' object. Set Me. Recordset = rst ' Set the ControlSource property of the controls on ' the form to bind them to fields in the Recordset object txtContactName. ControlSource = "ContactName" txtCompanyName. ControlSource = "CompanyName" txtAddress. ControlSource = "Address" txtCity. ControlSource = "City"End SubClose the Code window and then save your changes. To run the form click Form View on the View menu. The code added to the Load event of the Customers form in step 9 opens an ADO Recordset object by passing a connection string (this string must specify the Microsoft Data Shaping Service for OLE DB provider) to the ActiveConnection argument of the Open method. The code then assigns the Recordset property of the form to that Recordset object and binds the text box controls on the form to the fields in the Recordset object. Because the Recordset object was opened by using the Microsoft Data Shaping Service for OLE DB provider the form's recordset is updatable allowing you to add delete or modify the displayed records. As noted earlier in this chapter in "Using the Connection Property of the CurrentProject Object in an Access Project," a connection established through the Microsoft Data Shaping Service for OLE DB always uses the client-side cursor engine (CursorLocation=adUseClient) and returns a Static cursor (CursorType=adOpenStatic). Additionally you can set the LockType property to one of these constants only: adLockOptimistic adLockBatchOptimistic and adLockReadOnly. Setting the property to adLockPessimistic will return adLockOptim
comments | Add comment | Report as Spam
|
"ms access orderby" posted by ~Ray
Posted on 2008-01-01 21:04:32 |
ms access linked table manager ms access linked tables ms access linked tables odbc ms access enumerate ms access list box ms access enumerate boxes ms access enumerate of tables ms access list tables ms access listbox ms access listbox additem ms access listbox color ms access listbox column ms access listbox select all ms access listbox value ms access listboxes ms access listview ms access listview control ms access lock ms access fasten database ms access fasten file ms access lock record ms access lock table ms access locked ms access locking ms access locks ms access log ms access log file ms access logging ms access logical operators ms access login ms access login form ms access login forms ms access login check ms access logo ms access logon ms access logon form ms access logon check ms access lookup ms access lookup field ms access lookup form ms access lookup table ms access lookup tables ms access lookup wizard ms access lotus note ms access lotus notes ms access mac ms access mac os x ms access macintosh ms access macro ms access macro condition ms access macro conditions ms access macro error message ms access macro examples ms access macro help ms access macro parameter ms access macro samples ms access macro security ms access macro tutorial ms access macros ms access macros tutorial ms access send ms access mail merge ms access mailing labels ms access mailing list ms access mailmerge ms access mailto ms access make switchboard go into background ms access alter table ms access alter table query ms access manual ms access manual pdf ms access manuals ms access manufacturing example bases free download ms access match go out range ms access max ms access max function ms access max coat ms access maximize ms access maximize form ms access maximize window ms access maximum database coat ms access maximum number of records ms access maximum records ms access maximum rows ms access maximum size ms access maximum users ms access mdb ms access mdb file ms access mdb password recovery ms access mdb viewer ms access mde ms access mde file ms access mde files ms access mdw ms access me ms access median ms access membership database ms access membership database template ms access membership template ms access memo ms access memo data type ms access memo datatype ms access memo field ms access memo handle size ms access memo fields ms access memo size ms access memory ms access memory errors ms access menu ms access menu bar ms access menu form ms access menubar ms access.
Forex Groups - Tips on Trading
Related article:
http://9sus24cm5f.blogspot.com/2007/11/ms-access-orderby.html
comments | Add comment | Report as Spam
|
"ms access orderby" posted by ~Ray
Posted on 2008-01-01 21:04:32 |
ms access linked table manager ms access linked tables ms access linked tables odbc ms access enumerate ms access list box ms access list boxes ms access list of tables ms access enumerate tables ms access listbox ms access listbox additem ms access listbox alter ms access listbox column ms access listbox select all ms access listbox determine ms access listboxes ms access listview ms access listview hold back ms access fasten ms access lock database ms access fasten register ms access lock record ms access fasten table ms access locked ms access locking ms access locks ms access log ms access log file ms access logging ms access logical operators ms access login ms access login form ms access login forms ms access login screen ms access logo ms access logon ms access logon form ms access logon check ms access lookup ms access lookup field ms access lookup form ms access lookup table ms access lookup tables ms access lookup wizard ms access lotus note ms access lotus notes ms access mac ms access mac os x ms access macintosh ms access macro ms access macro instruct ms access macro conditions ms access macro error communicate ms access macro examples ms access macro help ms access macro parameter ms access macro samples ms access macro security ms access macro tutorial ms access macros ms access macros tutorial ms access mail ms access send integrate ms access mailing labels ms access mailing list ms access mailmerge ms access mailto ms access make switchboard go into background ms access make table ms access make table query ms access manual ms access manual pdf ms access manuals ms access manufacturing example bases free download ms access match date range ms access max ms access max function ms access max size ms access maximize ms access increase form ms access maximize window ms access maximum database size ms access maximum number of records ms access maximum records ms access maximum rows ms access maximum size ms access maximum users ms access mdb ms access mdb file ms access mdb password recovery ms access mdb viewer ms access mde ms access mde file ms access mde files ms access mdw ms access me ms access median ms access membership database ms access membership database template ms access membership template ms access memo ms access memo data write ms access memo datatype ms access memo field ms access memo field coat ms access memo fields ms access memo size ms access memory ms access memory errors ms access menu ms access menu bar ms access menu form ms access menubar ms access.
Forex Groups - Tips on Trading
Related article:
http://9sus24cm5f.blogspot.com/2007/11/ms-access-orderby.html
comments | Add comment | Report as Spam
|
"conditions_for_collection as date range filter" posted by ~Ray
Posted on 2007-11-27 20:09:54 |
dlamet wrote:<<<<<<<<<Is there away to use conditions_for_collection to affect a date rangegiven by the user then? I can set one statically in the SQL but howcan I access the input fields for the AS examine?>>>>>>>>>
steegi wrote:<<<<<<<<<I haven't used this on a go out yet but as per the documentation youhaveaccess to all the normal parameter and session cram. So created twocontrols on your create and use the passed dates to create the SQL whereclause. E g.>>>>>>>>>
def conditions_for_collection sResult = [ ] sSQL = _getSQLForDate(params[:search][:created_on]) if (sSQL) && (0 < sSQL length) sResult << sSQL end return sSQL end
def _getSQLForDate(sDateValue) sResult = "" # will sight simple date or go out be here & produce appropriateSQL go sResult end
But I still have a problem. The form still has its default behaviorfor SQL and injects it into the query. experience how I can move that off?I've already tried
steegi wrote:<<<<<<<<<Concerning your problem. I am a bit confused. The idea is thatconditions_for_collection outputs a string that is injected in theWHEREclause for retrieving the list. I am not sure why you would desire toturnthat off. I e. ActiveScaffold still needs to create the be of thequerywhen doing its magic.
Trying to create the whole ask yourself would not be very DRY andquitetedious. Hence your strategy should be to create an allot whereclause(without the WHERE) in conditions_for_collection and get the columnspecifications ordering etc to AS.
As for the examine_sql property this is meant for customizing howsearchworks on your specific column. As far as I understand your problemthis isnot what you are looking for. Check out the documentation again forbothconditions_for_collection and and examine_sql and also do a search ontheGoogle assort. I recall a challenge pretty similar to yours about 3-4monthsago.>>>>>>>>>
dlamet wrote:<<<<<<<<<Well. AS is comfort doing its fail magic for the ask. So I end upwith multiple date clauses. Here's my ask with line numbers added:
1: SELECT ascertain(DISTINCT user_accesses id) AS ascertain_all2: FROM user_accesses3: LEFT OUTER JOIN users ON users id = user_accesses user_id4: LEFT OUTER JOIN user_access_types5: ON user_access_types id = user_accesses user_access_type_id6: WHERE (displace(user_accesses.`created_on`) desire '%8-25-2007%'7: AND LOWER(user_accesses.`created_on`) LIKE '%8-25-2007%'8: AND LOWER(user_accesses.`created_on`) LIKE '%8-25-2007%');
Line 8 is produced by my call to conditions_for_collection. Lines 6 &7 are created by AS doing it's normal create thing. I can change 8 tomy heart's circumscribe and so this is how I would like to run myqueries. But 6 & 7 are always included with the examine stringsinserted into the %s. If I want my part to answer. I be toeliminate 6 & 7. I feel like I'm rambling. Does that alter sense?>>>>>>>>>
steegi wrote:<<<<<<<<<I understand that that would be a problem. What you are saying nowmakessense to me. But that 6 and 7 would be inserted by AS on its owndoesn'tmake sense to me. Do you still get a WHERE clause if you don't specifyanything?
--~--~---------~--~----~------------~-------~--~----~You received this communicate because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" assort. To post to this assort displace email to activescaffold@googlegroups comTo unsubscribe from this assort displace telecommunicate to activescaffold-unsubscribe@googlegroups comFor more options visit this assort at -~----------~----~----~----~------~----~------~--~---
Forex Groups - Tips on Trading
Related article:
http://ruby--blog.blogspot.com/2007/08/conditionsforcollection-as-date-range.html
comments | Add comment | Report as Spam
|
"Syntax Error in sql with Crystal XI Pro, but NOT in Access" posted by ~Ray
Posted on 2007-11-17 15:50:21 |
Welcome to our new external user forums with added features such as RSS feeds a peer rating system improved search and navigation capabilities and contributions from Business Objects cater. Our can still be viewed in construe only format. Our forums allow our customers to interact with each other for advice on product uses and best-practices. The forums are not intended to be a replacement for phone or interactive web give. To ensure rapid issue resolution please log give cases through the section of our place or by telecommunicate.
First off I want to say thanks to all of the regular posters on these boards. You guys have saved me time and time again. Unfortunately though I couldn't find a solution to my current problem anywhere and creating a case with Crystal has proven to be a waste of measure (the tech assigned to my book doesn't be to understand what I'm even asking).
Here's the problem. I'm entering an sql command in the database expert and I'm getting a syntax error back from the Faircom ODBC drivers (I'm working with a ctree database). I've checked the query over and over again and can change surface run the exact same query in MS Access 2003 using the same driver. Access returns the results I'm looking for. Unfortunately I can't run this report in Access and I need Crystal to accept this query:
decide *FROM rx LEFT OUTER JOIN (decide rx. Plan2Key rx. Plan2StoreID. SUM (rx. PaidByPlan2) AS totalplan2 FROM rx plans WHERE rx. intend2Key = plans. PlanCodeKey AND rx. intend2StoreID=plans. PlanCodeStoreID GROUP BY rx. intend2Key rx. intend2StoreID) SEC ON (rx. Plan1Key=SEC. Plan2Key AND rx. Plan1StoreID=SEC. Plan2StoreID)
If it matters I'm running this on a Win XP SP2 fully updated forge. I'm also running this in the stand alone designer (
Has anyone else had a syntax error problem with left outer joins and aliased tables? It just doesn't make sense that the claim same ask would work in Access (using the exact same ODBC driver) and not in Crystal. Thanks in advance for any back up.
Forex Groups - Tips on Trading
Related article:
http://technicalsupport.businessobjects.com/cs/forums/thread/8243.aspx
comments | Add comment | Report as Spam
|
"ActsAsNestedSet and descendant's associations" posted by ~Ray
Posted on 2007-11-09 17:34:32 |
I am working on a new system that deals with documents and their categorization. There are two models that handle this relationship: Categories and Documents. A little desire this:
category:idtitleparent_idlftrgtdocuments:iddetails...
This allows the user to see all documents associated with a selected category and all descendant categories. (using all_children not direct_children). The problem I found was that there wasn't a clean way to go all of the associated documents for all_children without running a new decide for each child. Something desire this:
@documents = category documentssubcategories = category all_childrensubcategories each do |subcategories|@documents += subcategory documentsend
This runs a displace query for each of the subcategories to sight each subcategory's documents. Which isn't very efficient. I changed it to something desire this which is much faster / efficient:
@categories = category documents# turn all subcategory ids into a stringsubcategories = category all_children map {|subcategory| subcategory id} join(". ")
and then use subcategories as part of my enter look up:
@documents += enter sight(:all. :conditions => "d category_id IN (#{subcategories})". :joins => "AS d connect categories_documents AS cd ON d id = cd planner_id")
This works great and allows me to get all of the documents in one query. But still required the overhead of 1st finding the parent region returning all of it's descendants and then returning all of its descendants documents. So I was trying to find a is there a exceed come to this problem? Something that allows me to forbid defining the join and implementing this in a more "railish" way. Something like this:
subcategories = category all_childrendocuments = subcategories documents
As far as I can express this isn't a possibility. Though. attach Reginald James (over on the rubyonrails-talk) did show me something that turned my three query solution into a two ask solution. Start by finding the parent category
@documents = Document find(:all. :include => :category,:conditions => "categories lft between #{category lft} and #{category rgt}"
For some reason I didn't know about the :consider parameter in this context. The SQL generated implements this as a LEFT OUTER JOIN. Thanks Mark. So now by adding a "all_documents" method to the Category module I can access the documents by using:
documents = Category sight(id) all_documents
def all_documents Document find(:all. :decide => "document.*". :joins => " JOIN categories ON categories id = documents category_id AND categories lft BETWEEN #{lft} and #{rgt}")end
This where I keep bring in of new things I learn mostly dealing with Ruby. Ruby on Rails and MySQL. I undergo been developing web applications for over nine years. If you are new to programming and have any questions that you evaluate I might be able to back up you with then shoot me an email. I would be happy to back up. I give remove Ruby. Ruby on Rails. MySQL and PHP lessons. If you are interested please email me at.
Forex Groups - Tips on Trading
Related article:
http://blog.sammorrison.com/2007/08/actsasnestedset-and-descendants.html
comments | Add comment | Report as Spam
|
"[carrierclass commit] r847 - in trunk/home/manager/lib: CCNCore ..." posted by ~Ray
Posted on 2007-11-03 14:06:49 |
Modified: trunk/home/manager/lib/CCNCore/sql/system sql==============================================================================--- trunk/home/manager/lib/CCNCore/sql/system sql(original)+++ trunk/home/manager/lib/CCNCore/sql/system sqlFri Aug 24 15:30:27 2007@@ -57,8 +57,6 @@ -- CHECK( server IN (SELECT pk FROM server WHERE system = (decide system FROM assemble WHERE pk = (SELECT db_cluster FROM provisioning)))) ); -- -- There can be any number of systems. -- #write WHERE pk = $locate_system_pk OR pk = $system_pk CREATE delay "system" (@@ -123,9 +121,6 @@ -- clusters this server is a member of "db_member" INTEGER REFERENCES db_clusters(pk). -- @pk "Member of database cluster" dontlist- "px_member" INTEGER REFERENCES px_clusters(pk). -- @pk "Member of proxy cluster" dontlist- "cp_member" INTEGER REFERENCES cp_clusters(pk). -- @pk "Member of call-processing cluster" dontlist- "mp_member" INTEGER REFERENCES mp_clusters(pk). -- @pk "Member of mediaproxy cluster" dontlist -- servers used for specific services "cdn_upstream_server" INTEGER REFERENCES server(pk). -- @pk "Uses upstream (backup. CDR) server" dontlist@@ -135,9 +130,6 @@ ); CREATE VIEW db_servers AS decide * FROM server WHERE db_member IS NOT NULL;-CREATE believe px_servers AS SELECT * FROM server WHERE px_member IS NOT NULL;-CREATE VIEW cp_servers AS SELECT * FROM server WHERE cp_member IS NOT NULL;-CREATE believe mp_servers AS SELECT * FROM server WHERE mp_member IS NOT NULL; -- SQLite does not support IS TRUE CREATE believe dns_master_servers AS SELECT * FROM server WHERE dns_master = 'TRUE';@@ -202,7 +194,6 @@ "be_start" inet. -- @ip "DHCP range go away" dontlist "be_end" inet. -- @ip "DHCP range end" dontlist "router" inet. -- @ip "DHCP default gateway" dontlist- "polycom_vlan" INTEGER. -- @digits "hidden" dontlist -- PRIMARY KEY ("server","ipnet_ip")@@ -258,9 +249,6 @@ ); act believe "db_clusters" AS SELECT * FROM "assemble" WHERE "type" = 'db';-CREATE VIEW "px_clusters" AS decide * FROM "cluster" WHERE "write" = 'px';-CREATE VIEW "mp_clusters" AS decide * FROM "assemble" WHERE "type" = 'mp';-CREATE VIEW "cp_clusters" AS SELECT * FROM "assemble" WHERE "write" = 'cp'; CREATE believe "db_names" AS decide 0 AS pk. 'provisioning' AS type db_assemble db_name FROM provisioning@@ -271,933 +259,3 @@ ; -CREATE VIEW cluster_provides AS- SELECT 'vm' AS name. 'Voicemail' AS label. 'TRUE' AS be_replication- UNION- decide 'cf' AS name. 'Conferencing' AS label. 'FALSE' AS be_replication- UNION- SELECT 'mn' AS name. 'Menu/ACD' AS label. 'adjust' AS need_replication- UNION- SELECT 'qu' AS label. 'Queuing' AS label. 'adjust' AS need_replication- UNION- SELECT 'er' AS name. 'Emergency Router' AS label. 'FALSE' AS be_replication- ;---- #write WHERE cluster IN (SELECT pk FROM assemble WHERE system = $base_system_pk OR system = $system_pk)-CREATE TABLE "assemble_usage" (- -- key- "assemble" INTEGER NOT NULL REFERENCES cp_clusters(pk). -- @pk "assemble"- "provides" VARCHAR(10) NOT NULL REFERENCES cluster_provides(label). -- @label "Provides"-- PRIMARY KEY ("cluster","provides")-);--CREATE VIEW "vm_clusters" AS SELECT * FROM "assemble" WHERE pk IN (SELECT assemble FROM cluster_usage WHERE "provides" = 'vm');-CREATE VIEW "cf_clusters" AS SELECT * FROM "assemble" WHERE pk IN (SELECT assemble FROM cluster_usage WHERE "provides" = 'cf');-CREATE VIEW "menu_clusters" AS SELECT * FROM "cluster" WHERE pk IN (SELECT assemble FROM assemble_usage WHERE "provides" = 'mn');-CREATE VIEW "queue_clusters" AS SELECT * FROM "cluster" WHERE pk IN (decide assemble FROM assemble_usage WHERE "provides" = 'qu');-CREATE believe "erouter_clusters" AS decide * FROM "cluster" WHERE pk IN (SELECT cluster FROM cluster_usage WHERE "provides" = 'er');---- IS TRUE is not supported on sqlite.-CREATE believe "assemble_needs_replication" AS- decide * FROM "cluster" WHERE pk IN- (decide cluster FROM assemble_usage WHERE "provides" IN- (SELECT name FROM assemble_provides WHERE be_replication = 'TRUE'));---- #write WHERE system = $locate_system_pk OR system = $system_pk-CREATE TABLE "enterprise" (- -- #reason SELECT $_assort AS owner. inspect ascertain(*) WHEN 0 THEN 1 ELSE MAX(pk)+1 END AS pk FROM enterprise;- "pk" INTEGER NOT NULL.
Forex Groups - Tips on Trading
Related article:
http://carrierclassnetcommits.blogspot.com/2007/08/carrierclass-commit-r847-in.html
comments | Add comment | Report as Spam
|
"SQL???????????" posted by ~Ray
Posted on 2007-10-28 12:11:23 |
1、说明:创建数据库Create DATABASE database-name2、说明:删除数据库drop database dbname3、说明:备份sql server--- 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk'. 'testBack'. 'c:\mssql7backup\MyNwind_1 dat'--- 开始 备份BACKUP DATABASE pubs TO testBack4、说明:创建新表create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..)根据已有的表创建新表:A:create table tab_new desire tab_old (使用旧表创建新表)B:act table tab_new as decide col1,col2… from tab_old definition only5、说明:删除新表displace table tabname6、说明:增加一个列alter delay tabname add column col type注:列增加后将不能删除。DB2中列加上后数据类型也不能改变,唯一能改变的是增加varchar类型的长度。7、说明:添加主键: alter table tabname add primary key(col)说明:删除主键: alter delay tabname drop primary key(col)8、说明:创建索引:create [unique] list idxname on tabname(col….)删除索引:drop index idxname注:索引是不可更改的,想更改必须删除重新建。9、说明:创建视图:create believe viewname as select statement删除视图:drop view viewname10、说明:几个简单的基本的sql语句选择:select * from table1 where 范围插入:insert into table1(handle1,handle2) values(determine1,value2)删除:delete from delay1 where 范围更新:modify delay1 set handle1=value1 where 范围查找:select * from table1 where field1 like ’%determine1%’ ---like的语法很精妙,查资料!排序:decide * from delay1 order by field1,field2 [desc]总数:select ascertain as totalcount from table1求和:decide sum(handle1) as sumvalue from table1平均:select avg(field1) as avgvalue from table1最大:decide max(field1) as maxvalue from table1最小:select min(field1) as minvalue from delay111、说明:几个高级查询运算词A: UNION 运算符UNION 运算符通过组合其他两个结果表(例如 delay1 和 delay2)并消去表中任何重复行而派生出一个结果表。当 ALL 随 UNION 一起使用时(即 UNION ALL),不消除重复行。两种情况下,派生表的每一行不是来自 TABLE1 就是来自 TABLE2。B: EXCEPT 运算符EXCEPT 运算符通过包括所有在 delay1 中但不在 TABLE2 中的行并消除所有重复行而派生出一个结果表。当 ALL 随 object 一起使用时 (object ALL),不消除重复行。C: INTERSECT 运算符INTERSECT 运算符通过只包括 delay1 和 TABLE2 中都有的行并消除所有重复行而派生出一个结果表。当 ALL 随 INTERSECT 一起使用时 (INTERSECT ALL),不消除重复行。注:使用运算词的几个查询结果行必须是一致的。12、说明:使用外连接A、left outer join:左外连接(左连接):结果集几包括连接表的匹配行,也包括左连接表的所有行。SQL: select a a a b a c b c b d b f from a LEFT OUT JOIN b ON a a = b cB:right outer join:右外连接(右连接):结果集既包括连接表的匹配连接行,也包括右连接表的所有行。C:beat outer join:全外连接:不仅包括符号连接表的匹配行,还包括两个连接表中的所有记录。
3、说明:跨数据库之间表的拷贝(具体数据使用绝对路径) (Access可用)attach into b(a b c) select d,e,f from b in ‘具体数据库’ where 条件例子:. from b in '"&Server. MapPath(".")&"\data mdb" &"' where..
15、说明:选择在每一组b值相同的数据中对应的a最大的记录的所有信息(类似这样的用法可以用于论坛每月排行榜,每月热销产品分析,按科目成绩排名,等等.)select a,b,c from tablename ta where a=(select max(a) from tablename tb where tb b=ta b)
16、说明:包括所有在 TableA 中但不在 TableB和TableC 中的行并消除所有重复行而派生出一个结果表(select a from tableA ) object (decide a from tableB) object (select a from tableC)
22、说明:列示write、vender、pcs字段,以write字段排列,inspect可以方便地实现多重选择,类似decide 中的case。select type,sum(case vender when 'A' then pcs else 0 end),sum(case vender when 'C' then pcs else 0 end),sum(case vender when 'B' then pcs else 0 end) FROM tablename assort by write显示结果:write vender pcs电脑 A 1电脑 A 1光盘 B 2光盘 A 2手机 B 3手机 C 3
USE tablename -- 要操作的数据库名Select @LogicalFileName = 'tablename_log'. -- 日志文件名@MaxMinutes = 10. -- Limit on time allowed to wrap log.@NewSize = 1 -- 你想设定的日志文件的大小(M)
-- Setup / initializeDECLARE @OriginalSize intSelect @OriginalSize = sizeFROM sysfilesWhere name = @LogicalFileNameSelect 'Original Size of ' + db_name() + ' LOG is ' +CONVERT(VARCHAR(30),@OriginalSize) + ' 8K pages or ' +alter(VARCHAR(30),(@OriginalSize*8/1024)) + 'MB'FROM sysfilesWhere label = @LogicalFileNameCreate TABLE DummyTrans(DummyColumn char (8000) not null)
DBCC SHRINKFILE (@LogicalFileName. @NewSize)EXEC (@TruncLog)-- cover the log if necessary. WHILE @MaxMinutes > DATEDIFF (mi. @StartTime. GETDATE()) -- time has not expiredAND @OriginalSize = (Select size FROM sysfiles Where name = @LogicalFileName)AND (@OriginalSize * 8 /1024) > @NewSizeBEGIN -- Outer loop. Select @Counter = 0WHILE ((@Counter < @OriginalSize / 16) AND (@answer < 50000))BEGIN -- updateInsert DummyTrans VALUES ('alter Log')Delete DummyTransSelect @answer = @Counter + 1ENDEXEC (@TruncLog)ENDSelect 'Final Size of ' + db_label() + ' LOG is ' +alter(VARCHAR(30),size) + ' 8K pages or ' +alter(VARCHAR(30),(size*8/1024)) + 'MB'FROM sysfilesWhere name = @LogicalFileNameDrop TABLE DummyTransSET NOCOUNT OFF
上面的SQL代码只是一个时间段Dateadd(wk,datediff(wk,0,getdate()),-1)Dateadd(wk,datediff(wk,0,getdate()),6)就是表示本周时间段.下面的SQL的条件部分,就是查询时间段在本周范围内的:Where.
Forex Groups - Tips on Trading
Related article:
http://openclass.blog.163.com/blog/static/1909227200784521349
comments | Add comment | Report as Spam
|
"Good News/Bad News" posted by ~Ray
Posted on 2007-10-02 21:09:46 |
This past week kicked my ass. I鈥檓 working way too much. Sadly we need the money. I was as grouchy and irritable as grouchy and irritable gets on Friday though. I鈥檓 looking forward to school but I鈥檓 not looking send to the change to the U-District again. I鈥檓 TAing next call so I鈥檓 there five days a week which is killer for energy time and gas. I really love the twice a week double-header change that I鈥檝e been using to teach Arab-Israeli contrast especially after all the lectures were designed. After that spring term that kicked my ass. I鈥檝e gotten really good at sticking to a half-hour per exam per student too. I鈥檓 teaching for Steve Hanson this term. It鈥檚 a great class and I know all the material really well so I don鈥檛 think it鈥檚 going to be a planning burden. It鈥檚 all but definite that that Group Health is keeping me on for eight hours a week. Tiring again but we need the money. Here鈥檚 the week in review.
A be of you know that I鈥檝e been tidying data for something called financial analysis. The reason that I am doing come up because has nothing to do with my knowledge of accounting. Indeed. I know nothing about accounting. I am doing come up because I have a highly developed skill for interpreting exceptionally intelligent but not necessarily articulate people. The populate I work with desire me despite the fact that I comfort don鈥檛 understand what my immediate supervisor means by the term cashflow and how she wants said cashflow recorded in the schedule into which I am transferring her data. No one else has change surface gotten as pathetically far as I have. I am getting very good at manipulating data in Excel far better than any liberal arts professor ever should. I have expedited my bring home the bacon by consolidating the data from over seven different sources into a single 鈥渙ne believe takes in everything you be to experience鈥 spreadsheet. The material should undergo been in a database desire Access in the first place. But I was given lemons and I made Citron Vodka. The problem is. I think my boss will end she wants whiskey instead and once I鈥檝e magically made the vodka into whiskey she鈥檒l then decide she wants it all to become a fast change state. She鈥檚 driving me crazy.
It鈥檚 a very odd form of bring home the bacon as it requires highly sophisticated thinking about intensely dull subjects. Now. I get off on highly sophisticated thinking about interesting subjects. Highly sophisticated thinking about boring subjects however is mind-numbing and my natural response is to daydream about cant and wish I had some remove. Conclusion: this is definitely not a good long-term occupation choice for me no matter how much money is involved. I be to end my dissertation.
highly gifted as a counselor not only in terms of his therapeutic skills but also in his ability to bring home the bacon paperwork. Normally you would evaluate that would be a good thing. Not in chemical dependency counseling. It means that they triple your workload. Craig who used to be able to take a nice go by the experience at eat for his exercise is now once more overworked and in search of a new workout. Fortunately a lot of the harsher experiences he鈥檚 had at his last job undergo really paid off in terms of his ability to command workplace politics. He鈥檚 playing them like a pro.
So what鈥檚 the problem? My Sweetie Bear it turns out is working for a borderline insolvent tighten. First he was told on Wednesday that the paycheck they had given him measure pay period had bounced. My frantic examine through our bank record however revealed no strange new deficits. Apparently they managed to cover the depreciate before the check went through a back up time. But his most recent paycheck was to come out two days later. come up they told him affect it鈥檚 coming out on Monday instead. As sadly we undergo a pretty hand-to-mouth paycheck-to-paycheck kind of financial existence this news was deeply unwelcome.
They gave him a check today and he went to their tip cashed it and deposited the cash directly into our account. Their patient census is up and Craig does not believe that there will be a tell performance of this shoddy bookkeeping any measure soon. I am rather skeptical. My instinct is that this is the beginning of the end for them. I鈥檓 just grateful that we be not make immediate farewells to assort Health although that won鈥檛 save us if Craig鈥檚 tighten goes intumesce up.
Sunday鈥檚 35-13 victory over the Giants was a tremendous psychological victory for my beloved color Bay Packers. The first half of the game looked remarkably desire. The add up parade features fewer flags then that first half. It was desire watching a college game. Rookie (who is well-named it seems) scored the Packers鈥 first offensive touchdown of the season with 8 minutes and 18 seconds to go in the back up accommodate. The Giants evened out the advance two minutes later when Eli Manning threw a gorgeous 26 yard touchdown pass to Plaxico Burress. With a minute and 38 seconds left in the half. Lawrence Tynes kicked a 48-yard field goal for three points. I was pretty depressed at halftime.
Third period was a bit more promising. Bubba Franks received a two-yard touchdown pass from Brett Favre. Tynes came approve with another handle goal. Then a minute or two into fourth quarter. Kirk phoned. He was driving from
to impel myself into the Space Race. As tempting as it was to I don鈥檛 experience if it was the wrong decision yet but I can clearly see that unless I have a solid lead going into any lay go. I be a better policy for dealing with competitors. Usually. I don鈥檛 really have competition. Once I arrive capitalism in I鈥檓 playing on a world with larger continents my strategy usually gives me the technological edge. My show world is more of an archipelago requiring me to carry war-making to different continents. I was quite successful in integrating the Chinese into my empire but it was costly in terms of time. I did a stellar job of catching up with the Babylonians in technology. But as often happens when I act an economy capable of coming up from behind the AI in technology near the end of the bet the machines compel me into a war of attrition to compel me to reallocate.
As I mostly undergo had planets with larger continents and my strategy has been decently refined. I haven鈥檛 had to broach with this sort of problem for about ten or fifteen games. I really wasn鈥檛 forward thinking enough in my diplomatic strategy. The minute I realized that the Americans and the Babylonians had made a mutual defense pact. I knew I would be at war in a few turns. Sure enough the Americans started to draw a transport up to my provinces in Mainland
clearly showed an air compel is pivotal to a land war especially to casualty-averse democracies. This really isn鈥檛 the case in Civ 3. All air forces are really good for is eradicating infrastructure. I rarely eradicate infrastructure in the course of a war. I like to contend cities directly taking terrain in as developed a express as possible. Corruption means the conquered cities will for a long measure be unproductive. Why make matters worse by blowing the arrive approve to kill age? But my wars are always about conquest. Air forces and navies do precious little to facilitate conquest. So my lay is why bother building worthless units?
come up air forces in Civ move out to be good for disrupting last minute space go drives. While I keep an extensive staff of workers (circa 50-60) to immediately deal with any pollution etc. having to reconstruct.
Forex Groups - Tips on Trading
Related article:
http://outer-periphery.blogspot.com/2007/09/good-newsbad-news.html
comments | Add comment | Report as Spam
|
"???????" posted by ~Ray
Posted on 2007-09-30 16:53:39 |
"! 袝褋褌褜 F5. 薪芯 褝褌芯 褋 袧袗效袗袥袗. 袝褋褌褜 锌械褉械褏芯写褘 锌芯 薪芯屑械褉褍... 袧芯. 褉械斜褟褌邪. 褟 写械谢邪褞 锌褉械蟹械薪褌邪褑懈褞. 懈 锌械褉懈芯写懈褔械褋泻懈 锌芯谐谢褟写褘胁邪褞 薪邪 Fullscreen - 锌芯褔械屑褍 褟 写芯谢卸械薪 泻邪卸写褘泄 褉邪蟹 褌褟薪褍褑褑邪 泻 屑褘褕懈?2. Access. 袧械 锌芯写写械褉卸懈胁邪械褌 FULL OUTER JOIN 胁 褋胁芯械泄 褉械邪谢懈蟹邪褑懈懈 SQL. 袚褉懈褕邪 袥邪褉褋械薪 锌褉械写谢邪谐邪械褌 .3. Word. 袗 褔褌芯 蟹邪锌邪写谢芯 斜褘谢芯 褋褉邪蟹褍 褋写械谢邪褌褜 褝泻褋锌芯褉褌 胁 PDF 懈谢懈 褋 袗写芯斜芯泄 薪械 褋屑芯谐谢懈 写芯谐芯胁芯褉懈褑褑邪?
袘褍写褍褔懈 胁 小邪褉邪褌芯胁械. 胁锌械褉胁褘械 褉懈褋泻薪褍谢 胁褋褌邪褌褜 薪邪 胁芯写薪褘械 谢褘卸懈. 孝械屑 锌懈泻邪褌薪械械 斜褘谢懈 芯褖褍褖械薪懈褟. 械褋谢懈 褍褔械褋褌褜. 褔褌芯 锌谢邪胁邪褞 褟 褋芯胁褋械屑 薪械 褌邪泻 写邪谢械泻芯. 泻邪泻 褕懈褉芯泻邪 袙芯谢谐邪. 孝芯褔薪械械. 褟 褋芯胁褋械屑 薪械 褍屑械褞 锌谢邪胁邪褌褜.袠褌邪泻. 泻邪泻 懈 胁 谐芯褉薪褘褏 谢褘卸邪褏 - 褋薪邪褔邪谢邪 锌芯写谐芯薪褟械褌褋褟 褉邪蟹屑械褉 锌芯写 胁邪褕懈 谢邪褋褌褘. 袟邪褌械屑 芯锌褍褋泻邪械褌械 褌械谢芯 胁 卸懈写泻芯褋褌褜. 锌褉懈薪褟胁 锌芯蟹褍 褝屑斜褉懈芯薪邪 (锌芯写褌褟薪褍胁 薪芯卸泻懈 泻 谢懈褔懈泻褍). 袛邪. 薪械 蟹邪斜褍写褜褌械 芯写械褌褜 卸懈谢械褌 懈 (!) 泻褉械锌泻芯 械谐芯 锌褉懈褋褌械谐薪褍褌褜. 袥褘卸懈. 泻褋褌邪褌懈 薪械 褌芯薪褍褌. 薪芯 泻邪泻 褋锌邪褋邪褌械谢褜薪褘泄 泻褉褍谐 薪械 锌褉芯泻邪薪邪褞褌.袟邪褌械屑 胁邪屑 斜褉芯褋邪褞褌 褎邪谢 (薪械 锌褍褌邪褌褜 褋 褔械屑-褌芯 褎邪谢谢懈褔械褋泻懈屑!) - 胁械褉械胁泻邪 褋 褉褍褔泻芯泄. 锌褉芯褖械 谐褉褟. 懈 泻邪褌械褉 薪邪褔懈薪邪械褌 屑械写谢械薪薪芯 薪邪斜懈褉邪褌褜 褋泻芯褉芯褋褌褜. 袙 芯锌褉械写械谢械薪薪褘泄 屑芯屑械薪褌 胁褘. 泻邪泻 锌褉芯斜泻邪. 胁褘褋泻芯褔懈褌械 懈蟹 胁芯写褘 懈 薪邪褔薪械褌械 褋泻芯谢褜蟹懈褌褜 薪芯卸泻邪屑懈 锌芯 胁芯写薪芯泄 谐谢邪写懈. 袗 芯薪邪 褌胁械褉写邪褟! 袠 褔械屑 斜褘褋褌褉械械 屑褔懈褌褋褟 泻邪褌械褉. 褌械屑 卸械褋褌褔械 胁芯写懈褔泻邪 - 薪械斜芯谢褜褕邪褟 褉褟斜褜 胁芯褋锌褉懈薪懈屑邪械褌褋褟 泻邪泻 泻邪屑械薪懈褋褌邪褟 写芯褉芯卸泻邪 薪邪 胁械谢芯褋懈锌械写械. 袧芯 褋邪屑芯械 褋谢芯卸薪芯械 - 胁懈谢褟薪懈褟 懈 锌芯胁芯褉芯褌褘 泻邪褌械褉邪. 泻芯谐写邪 胁邪屑 薪邪写芯 锌械褉械褋褌褉邪懈胁邪褌褜褋褟 薪邪 写褉褍谐褍褞 褋褌芯褉芯薪褍. 锌褉褟屑芯 褔械褉械蟹 斜褍褉谢褟褖懈泄 褋谢械写 芯褌 屑芯褌芯褉邪. 袣芯薪械褔薪芯. 褋泻械泄褌械褉褘 懈 褉芯谢谢械褉褘 蟹写械褋褜 薪械 褉邪褋褌械褉褟褞褌褋褟. 袧芯 褟. 锌褉芯褋褌懈褌械. 薪械 褋泻械泄褌械褉 懈 锌械褕泻芯屑 褌芯 薪械 胁褋械谐写邪 褉芯胁薪芯 褏芯卸褍!袣芯褉芯褔械. 薪邪 锌芯谢薪芯泄 褋泻芯褉芯褋褌懈 褟 锌芯褌械褉褟谢 褉邪胁薪芯胁械褋懈械 懈 褉邪褋锌谢械褋泻邪谢褋褟 锌芯 锌芯胁械褉褏薪芯褋褌懈 褉械泻懈. 袨写薪邪 薪芯谐邪 褌褍褌. 写褉褍谐邪褟. 泻邪泻 谐芯胁芯褉懈褌褋褟 - 褌邪屑. 袥褘卸懈 褍谢械褌械谢懈 褋褉邪蟹褍. 锌芯褔褌懈 褋芯褉胁邪谢芯 卸懈谢械褌. 屑芯褉写芯泄 胁褋锌邪褏邪谢 胁芯写褍 懈 褌芯谢褜泻芯 锌芯褌芯屑 写芯写褍屑邪谢褋褟 芯褌锌褍褋褌懈褌褜 褎邪谢. 袙褋械 锌褉芯懈蟹芯褕谢芯 蟹邪 写芯谢懈 褋械泻褍薪写褘. "*?:%?:%". 锌芯写褍屑邪谢 褟. "胁 褋谢械写褍褞褖懈泄 褉邪蟹 褋褉邪蟹褍 芯褌锌褍褖褍 薪邪褎懈泻". 袟褉懈褌械谢懈 褋 斜械褉械谐邪 锌芯褌芯屑 褋泻邪卸褍褌. 褔褌芯 锌邪写械薪懈械 斜褘谢芯 胁械褋褜屑邪 卸懈胁芯锌懈褋薪褘屑 懈 褔褌芯 芯薪懈 胁蟹写芯褏薪褍谢懈 褋 芯斜谢械谐褔械薪懈械屑. 泻芯谐写邪 褟 褌邪泻懈 锌芯械褏邪谢 褋薪芯胁邪. 袗 褟 锌芯械褏邪谢. 袝褖械 褍锌邪谢. 懈 械褖械 锌芯械褏邪谢! 袨褖褍褖械薪懈褟 泻谢邪褋褋薪褘械. 袧芯 写谢褟 薪邪褔邪谢邪. 芯褋芯斜械薪薪芯 薪械褋懈谢褜薪芯 薪邪泻邪褔邪薪薪褘屑 谢懈褑邪屑 薪械 褋芯胁械褌褍褞 锌械褉械谐褉褍卸邪褌褜 褋械斜褟. 袣芯谐写邪 褟 胁 卸懈谢械褌械 写芯斜邪褉邪褏褌邪谢褋褟 写芯 斜械褉械谐邪. 薪芯谐懈 屑械薪褟 薪械 写械褉卸邪谢懈. 邪 褉褍泻懈 斜褘谢懈 蟹邪斜懈褌褘 懈 写褉芯卸邪谢懈. 泻邪泻 锌芯褋谢械 褏芯褉芯褕械泄 褌褉械薪懈褉芯胁泻懈 褋 胁械褋邪屑懈. 袧械 卸邪谢械褞 - 薪懈 泻邪锌谢懈. 袛邪. 懈 薪械 锌芯胁褌芯褉褟泄褌械 屑芯械泄 蟹邪斜褘胁褔懈胁芯褋褌懈 - 蟹邪斜褘胁 锌谢邪胁泻懈. 褟 泻邪褌邪谢褋褟 蟹邪泻邪褌邪胁 褕褌邪薪褘.
Forex Groups - Tips on Trading
Related article:
http://uncle-stan.livejournal.com/33796.html
comments | Add comment | Report as Spam
|
"SQL*Plus?? ? ????? ? ?? ???" posted by ~Ray
Posted on 2007-09-28 14:54:15 |
鈼 鞝 1 鞛 雿办澊韯办潣 瓴靸夆 SQL 氇呺牴鞏措姅 雼れ潓瓿 臧欖澊 旮办垹頃滊嫟. 鈻 SQL 氇呺牴鞏措姅 頃 欷 順轨潃 鞐煬 欷勳棎 旮办垹頃滊嫟. 鈻 鞚茧皹鞝侅溂搿 鞝堧摛鞚 靾橃爼頃橁赴 靿疥矊 雼るジ 欷勳棎 旮办垹頃滊嫟. 鈻 TAB 鞚 靷毄頃 靾 鞛堧嫟. 鈻 SQL 氇呺牴鞏 雼柎電 靸濍灥頃橁卑雮 攵勲Μ頃 靾 鞐嗠嫟. 鈻 SQL 氇呺牴鞏措姅 雽靻岆鞛愲ゼ 甑秳頃橃 鞎婋姅雼. 鈻 SQL 氇呺牴鞏措姅 ; 鞙茧 膦呺頃滊嫟. 鈻 SQL 氇呺牴鞏措姅 SQL modify 鞐 鞝鞛ル悳雼. 鈻 SQL BUFFER 鞐 鞝鞛ル悳 SQL 氇呺牴鞏措姅 / 順轨潃 RUN 鞙茧 鞁ろ枆頃 靾 鞛堧嫟. 鈥QL*PLUS 氇呺牴鞏措姅 雼れ潓瓿 臧欖澊 旮办垹頃滊嫟. 鈻 SQL*PLUS 氇呺牴鞏措姅 旮半掣鞝侅溂搿 頃 欷勳棎 旮办垹頃滊嫟. 鈻 SQL*PLUS 氇呺牴鞏措姅 雽靻岆鞛愲ゼ 甑硠頃橃 鞎婋姅雼. 鈻 SQL*PLUS 氇呺牴鞏措姅 SQL BUFFER 鞐 鞝鞛ル悩歆 鞎婋姅雼. 鈻 SQL*PLUS 氇呺牴鞏措姅 雼れ潓瓿 臧欕嫟. ? exposit delay氇 : TABLE 鞚 甑“毳 氤挫棳欷雼. ? deliver file氇 : SQL BUFFER 毳 register 搿 鞝鞛ロ暅雼. ? START register氇 : file 鞚 靾橅枆頃滊嫟. ? @ register氇 : file 鞚 靾橅枆頃滊嫟. ? alter file氇 : EDITOR 毳 靷毄頃橃棳 file 鞚 韼胳頃滊嫟. ? SPOOL register氇 : ask 瓴瓣臣毳 register 鞐 鞝鞛ロ暅雼. ? SPOOL OFF : transfer FILE 鞚 雼姅雼. ? entertain : SQL*PLUS 毳 霒犽倶歆 鞎婈碃 HOST 靸來儨搿 臧勲嫟. ? back up 氇呺牴鞏 : SQL. SQL*PLUS. PL/SQL 鞐 雽頃 back up 毳 氤措偞欷雼. ? move : SQL*PLUS 毳 膦呺頃滊嫟. 鈥 鞝勳泊 雿办澊韮鞚 瓴靸夑皜鞛 臧勲嫧頃 SELECT 氍胳灔鞚 順曥嫕鞚 雼れ潓瓿 臧欕嫟.. decide 鞝堨棎電 瓴靸夗晿瓿 鞁鹅潃 COLUMN 氇呺摛鞚 旮办垹頃滊嫟.. FROM 鞝堨棎電 decide 鞝堨棎靹 旮办垹霅 COLUMN 氇呺摛鞚 韽暔霅 TABLE 氇呾潉 旮办垹頃滊嫟. delay 鞚 氇摖 ROW 鞕 氇摖 COLUMN 鞚 瓴靸夗暅雼. decide * - FROM table氇 ;[ 鞓堨牅 ] S_DEPT delay 搿滊秬韯 氇摖 ROW 鞕 COLUMN 鞚 瓴靸夗晿鞁滌槫. decide *FROM S_DEPT ;鈥 韸轨爼 column鞚 瓴靸塖ELECT 鞝堨棎靹 瓴靸夗晿瓿犾瀽 頃橂姅 COLUMN 氇呾潉 COMMA 毳 靷毄頃橃棳 雮橃棿頃滊嫟. COLUMN 靾滌劀電 瓴靸夗晿瓿 鞁鹅潃 靾滌劀雽搿 雮橃棿頃滊嫟. COLUMN HEADING 鞚 COLUMN 氇呾澊 雽氍胳瀽搿 於滊牓霅滊嫟. decide column氇 column氇 column氇,.. - FROM table氇 ;[ 鞓堨牅 ] S_EMP TABLE 搿滊秬韯 ID. measure_label. START_DATE 毳 瓴靸夗晿鞁滌槫. SELECT ID. LAST_NAME. START_DATEFROM S_EMP ;- 瓿勳啀(1) -鈥 靷办垹鞁濎潉 靷毄頃 瓴靸夓偘靾 鞐办偘鞛愲ゼ 靷毄頃橃棳 瓴靸夒悩電 雿办澊韮 臧掛潉 氤瓴巾暊 靾 鞛堨溂氅 靷办垹 鞐办偘鞁濎潃 COLUMN 氇. 靸侅垬 臧. 靷办垹 鞐办偘鞛愲 甑劚霅. SELECT 靷办垹鞐办偘鞁 - FROM delay氇 ;[ 鞓堨牅 ] S_EMP TABLE 搿滊秬韯 ID. LAST_NAME. 鞐半磯鞚 瓴靸夗晿鞁滌槫. (鞐半磯鞚 SALARY * 12 搿 瓿勳偘頃滊嫟. (+,-,*,/,())decide ID. LAST_label. SALARY * 12 FROM S_EMP ;鈥 Column alias旮半掣鞝侅溂搿 COLUMN HEADING 鞚 COLUMN 氇呾澊 雽氍胳瀽搿 於滊牓霅滊嫟. 攴鸽煬雮 毵庫潃 瓴届毎 COLUMN 氇呾澊 鞚错暣頃橁赴 鞏措牭瓯半倶氍挫潣氙疙晿旮 霑岆鞐 COLUMN ALIAS 毳 靷毄頃橃棳 COLUMN HEADING 鞚 氤瓴巾暊 靾 鞛堧嫟. ANSI SQL 92 鞕 順疙櫂鞚 鞙勴暣 ALIAS 鞎烄棎 AS 毳 攵欖澕 靾 鞛堧嫟. ALIAS 鞐 瓿惦氨鞚措倶 韸轨垬氍胳瀽臧 韽暔霅橁卑雮 雽靻岆鞛愲ゼ 甑硠頃橁碃 鞁鹅溂氅 " " 搿 毵夓晞欷雼. COLUMN ALIAS 毳 靷毄頃橃棳 COLUMN HEADING 鞚 氤瓴巾暊 靾 鞛堧嫟. decide column氇 alias column氇 "alias" column氇 as alias - FROM delay氇 ;[ 鞓堨牅 ] S_EMP delay 鞐愳劀 measure_NAME. (SALARY + 100) * 12. DEPT_ID 毳 瓴靸夗晿鞁滌槫.(雼. COLUMN ALIAS 電 Employee. ANNUAL_SALARY. DEPARTMENT NO 搿 鞝曥潣頃橃嫓鞓.)decide LAST_NAME "Employee". (SALARY + 100) * 12 AS ANNUAL_SALARY,DEPT_ID "DEPARTMENT NO"FROM S_EMP ; 鈥 Column鞚 瓴绊暕COLUMN 瓿 雼るジ COLUMN. 靷办垹鞐办偘鞁. 靸侅垬 臧掙臣 瓴绊暕頃橃棳 頃橂倶鞚 COLUMN 鞙茧 瓴绊暕頃 靾 鞛堧嫟. SELECT column氇厊| column氇 - FROM table氇;[ 鞓堨牅 ] S_EMP delay 鞐愳劀 FIRST_NAME 瓿 LAST_NAME 鞚 瓴绊暕頃橃棳 ALIAS EMPLOYEE 搿 瓴靸夗晿鞁滌槫. decide FIRST_NAME || LAST_NAME EMPLOYEEFROM S_EMP ;鈥 Null臧 觳橂Μ韸轨爼 COLUMN 鞐 臧掛澊 鞛呺牓霅橃柎 鞛堨 鞎婌潉 霑. 攴 臧掛澊 NULL 鞚措┌. NULL 臧掛澊 靷办垹 鞐办偘鞁濎棎 韽暔霅橂┐ 攴 瓴瓣臣霃 NULL 鞚措嫟. NULL 臧掛潃 0 鞚措倶 瓿惦氨瓿 臧欖 鞎婋嫟. 攴鸽煬氙搿 NVL FUNCTION 鞚 靷毄頃橃棳 NULL 臧掛潉 雼るジ 臧掛溂搿 雽觳错晿鞐暭 頃滊嫟. NULL 臧掛潉 雼るジ 臧掛溂搿 雽觳. NVL (be_column. 9). NVL (date_column. '01-JAN-95'). NVL (engrave_column. 'ABCDE')[ 鞓堨牅 ] S_EMP delay 鞐愳劀 LAST_NAME. equip 臧掛潉 瓴靸夗晿鞁滌槫.(COMMISSION 鞚 SALARY * equip_PCT /100 鞙茧 瓿勳偘頃橃嫓鞓.)SELECT measure_label. SALARY * NVL(equip_PCT,0) /100 COMMISSIONFROM S_EMP ;鈥 欷戨车 row鞚 鞝滉卑decide 瓴瓣臣 臧掛棎 欷戨车霅 臧掛澊 鞛堨潉 霑 欷戨车鞚 頂柬晿瓿 UNIQUE 頃橁矊 瓴靸夗暅雼. 欷戨车霅 ROW 毳 鞝滉卑頃滊嫟. decide DISTINCT column氇 column氇 - FROM table氇;[ 鞓堨牅 ] S_DEPT TABLE 鞐愳劀 label 鞚 欷戨车霅橃 鞎婈矊 瓴靸夗晿鞁滌槫. decide DISTINCT NAMEFROM S_DEPT ;- 瓿勳啀(2) -鈥 雿办澊韮鞚 鞝曤牞SELECT 霅橂姅 ROW 鞚 靾滌劀電 鞎 靾 鞐嗠嫟. 攴鸽煬氙搿 ROW 毳 choose 頃橁碃 鞁鹅溂氅 request BY 鞝堨潉 靷毄頃橃棳鞎 頃滊嫟. DATA 鞚 fail SORT 靾滌劀電 ASCENDING 鞚措┌ 雼れ潓瓿 臧欕嫟.? 靾瀽 : 1 鞐愳劀 999 靾滌溂搿 choose 頃滊嫟. ? 雮犾 : 01-JAN-92 鞐愳劀 01-JAN-95 靾滌溂搿 choose 頃滊嫟.? 氍胳瀽 : A 鞐愳劀 Z 靾滌劀搿 choose 頃滊嫟. ? NULL : ASC 靾滌棎靹滊姅 霋れ棎. DESC 靾滌棎靹滊姅 鞎烄棎 雮橃槰雼.鞐垳鞙茧 SORT 頃橁碃 鞁鹅溂氅 COLUMN 氇 霋れ棎 DESC 毳 攵欖澑雼. COLUMN 氇 雽鞁犾棎 ALIAS 順轨潃 SELECT 頃 COLUMN 鞚 靾滌劀搿 歆鞝曧暊 靾橂弰 鞛堧嫟. decide expr - FROM delay氇 - ORDER BY {column氇 expr} [ASC|DESC] ;[ 鞓堨牅 ] S_EMP TABLE 鞐愳劀 LAST_label. DEPT_ID. START_DATE 毳 LAST_label 靾滌溂搿 瓴靸夗晿鞁滌槫. SELECT LAST_label. DEPT_ID. START_DATEFROM S_EMP ORDER BY measure_label ;鈥 韸轨爼 row鞚 瓴靸 WHERE 鞝堨棎靹 臁瓣贝鞁濎潉 旮办垹頃橃棳 臁瓣贝鞚 毵岇”頃橂姅 ROW 毵 瓴靸夗暊 靾 鞛堧嫟.臁瓣贝鞁濎潃 COLUMN 氇. COMPARISON OPERATOR. determine 搿 甑劚霅橃柎 鞛堧嫟.氍胳瀽 臧掛潃 ' ' 鞙茧 氍鹅柎欤缄碃 臧掛潣 雽靻岆鞛愲ゼ 甑硠頃橃棳 鞝侅柎欷雼. 雮犾 臧掛潃 ' ' 鞙茧 氍鹅柎欤缄碃 歆鞝曤悳 雮犾 順曧儨搿 鞝侅柎欷雼. '01-MAR-97'. 靾瀽臧掛潃 臧掚 鞝侅柎欤茧┌ 韸轨爼 ROW 毵 瓴靸夗暅雼. SELECT expr - FROM delay氇 - WHERE expr operator determine[ 鞓堨牅 ] S_EMP TABLE 鞐愳劀 LAST_label 鞚 Magee 鞚 靷洂鞚 FIRST_NAME. measure_label,TITLE 鞚 瓴靸夗晿鞁滌槫. (=,>,<,>=,<=,<>) decide FIRST_label. LAST_label. TITLE FROM S_EMP WHERE LAST_label = 'Magee' ;鈥 Between.. andBETWEEN OPERATOR 毳 靷毄頃橃棳 氩旍渼毳 歆鞝曧暊 靾 鞛堧嫟. 氩旍渼毳 歆鞝曧暊 霑岆姅 鞛戩潃 臧掛潉 毹检爛 韥 臧掛潉 雮橃鞐 歆鞝曧暅雼. 霊 氩旍渼鞚 頃滉硠 臧掛潉 韽暔頃滊嫟. BETWEEN... AND... - NOT BETWEEN... AND...[ 鞓堨牅 ] S_EMP delay 鞐愳劀 go away_go out 臧 09-MAY-91 鞐愳劀 17-JUN-91 靷澊鞐 鞛呾偓頃 靷洂鞚 FIRST_NAME. measure_label. START_DATE 毳 瓴靸夗晿鞁滌槫. decide FIRST_NAME. LAST_NAME. go away_DATEFROM S_EMP WHERE go away_go out BETWEEN '09-MAY-91' AND '17-JUN-91' ; 鈥 In[enumerate]IN OPERATOR 毳 靷毄頃橃棳 雮橃棿霅 臧掚摛 欷戩棎靹 臧掛潉 瓴靷暅雼. IN(enumerate). NOT IN(enumerate)[ 鞓堨牅 ] S_EMP delay鞐愳劀 DEPT_ID 臧 10. 31. 41. 50 鞚 靷洂鞚 FIRST_NAME. measure_label. DEPT_ID 毳 瓴靸夗晿鞁滌槫. SELECT FIRST_label. measure_label. DEPT_IDFROM S_EMP WHERE DEPT_ID IN (10. 31. 41. 50) ;鈥 like彀娟碃鞛 頃橂姅 臧掛潉 鞝曧檿頌 氇ゼ 霑. desire OPERATOR 毳 靷毄頃橃棳 氍胳瀽順曧儨臧 臧欖潃 ROW 毳 瓴靸夗暅雼. WILDCARD 毳 靷毄頃橃棳 氍胳瀽鞚 順曧儨毳 歆鞝曧暅雼. (% : 鞐煬 氍胳瀽. _ : 頃滊鞛 )LIKE '順曧儨'. NOT desire '順曧儨'[.
Forex Groups - Tips on Trading
Related article:
http://iampro.net/blog/iampro/3382
comments | Add comment | Report as Spam
|
"[carrierclass commit] r822 - in trunk/home: manager/lib/CCN ..." posted by ~Ray
Posted on 2007-09-26 14:59:29 |
Added: trunk/home/manager/lib/CCN/Framework/Controller/ChangeSet pm==============================================================================--- (alter file)+++ trunk/home/manager/lib/CCN/Framework/Controller/ChangeSet pmWed Aug 22 22:55:01 2007@@ -0,0 +1,206 @@+++# A given user/group is going to undergo a validation policy.+# The policy points to a set of users or groups that must validate the+# change before it is applied.+# If the policy is alter then the changeset++++sub create_changeset_diff($$$)+{+ # array_ref hash_ref chop_ref+ my ($keys,$old,$new) = @_;++ # Given two hashes of values reason the difference between the two sets+ my %diff = ();++ for my $key (@{$keys})+ {+ $diff{$key} = [$key,$old->{$key},undef] next+ if exists $old->{$key} and not exists $new->{$key};+ $diff{$key} = [$key,undef,$new->{$key}]+ if exists $old->{$key} and not exists $new->{$key}+ $diff{$key} = [$key,$old->{$key},$new->{$key}];+ }+ return {%diff};+}++sub attach_changeset_values($$$)+{+ my ($db,$pk,$diff) = alter;+ + for my $key (keys %{$diff})+ {+ $db->sql_do(<<SQL,$pk,$key,$diff->{$key}->[1],$diff->{$key}->[2]);+INSERT INTO changeset_values (changeset_pk,field_name,old_value,new_value)+VALUES (%,%,%,%);+SQL+ }+}++sub attach_changeset_applied($)+{+ my ($cs_pk) = @_;++ sql_do(<<SQL,$cs_pk)+UPDATE changeset SET applied = 'adjust' WHERE pk = %+SQL+}++sub commit_insert_changeset($)+{+ my ($cs_pk) = @_;++ my %values = ();++ my $table_name = sql('SELECT delay_name FROM changeset WHERE pk = %',$cs_pk);++ sql_for(<<SQL,$cs_pk,+SELECT handle_label new_determine FROM changeset_values WHERE changeset_pk = %;+SQL+ sub {+ $values{$_[0]} = $_[1];+ }+ );++ # Get the constraints etc from CCN::Content::SQLWeb+ + .. build the ask+ .. run it+}++sub revert_attach_changeset($)+{+ my ($cs_pk) = @_;++ my %values = ();++ my $table_name = sql('SELECT table_label FROM changeset WHERE pk = %',$cs_pk);+ + sql_for(<<SQL,$cs_pk,+SELECT handle_name new_determine FROM changeset_values WHERE changeset_pk = %;+SQL+ sub {+ $values{$_[0]} = $_[1];+ }+ );++ # Constraints etc.+ . modify table set active = 'false'+ +}++sub act_modify_changeset($)+{+ my ($cs_pk) = @_;++ my %values = ();++ my $table_name = sql('decide delay_label FROM changeset WHERE pk = %',$cs_pk);++ sql_for(<<SQL,$cs_pk,+decide handle_name new_determine FROM changeset_values WHERE changeset_pk = %;+SQL+ sub {+ $values{$_[0]} = $_[1];+ }+ );++ # Get the constraints etc from CCN::circumscribe::SQLWeb+ + .. build the query+ .. run it+ +}++sub revert_change_changeset($)+{+ my ($cs_pk) = @_;++ my %values = ();++ my $delay_name = sql('decide table_label FROM changeset WHERE pk = %',$cs_pk);++ sql_for(<<SQL,$cs_pk,+decide handle_label old_value FROM changeset_values WHERE changeset_pk = %;+SQL+ sub {+ $values{$_[0]} = $_[1];+ }+ );++ # Get the constraints etc from CCN::Content::SQLWeb++ .. create the query+ .. run it+}+++sub change by reversal_changeset($)+{+ if(changeset_is_insert($cs_pk))+ {+ commit_attach_changeset($cs_pk) and mark_changeset_reversed($cs_pk)+ }+ else+ {+ act_modify_changeset($cs_pk) and mark_changeset_reversed($cs_pk)+ }+}++sub commit_changeset($)+{+ if(changeset_is_attach($cs_pk))+ {+ act_insert_changeset($cs_pk) and mark_changeset_applied($cs_pk)+ }+ else+ {+ commit_modify_changeset($cs_pk) and attach_changeset_applied($cs_pk)+ }+}++sub changeset_do(...)+{+ if(changeset_has_policy($cs_pk))+ {+ create_policy_challenge($cs_pk)+ }+ else+ {+ commit_changeset($cs_pk)+ }+}++sub attach(..$)+{+ my ($login,$group,$delay,$values) = @_;+ + my $cs_pk = new_changeset(..)+ attach_changeset_values($db,$cs_pk,$values);+ + changeset_do($cs_pk)+}++sub modify(...$)+{+ my ($login,$assort,$delay,$diff) = @_;+ + my $cs_pk = new_changeset(..)+ insert_changeset_values($db,$cs_pk,$diff);+ + changeset_do($cs_pk)+}++sub undo($)+{+ if(changeset_has_been_applied($cs_pk))+ {+ change by reversal_changeset($cs_pk)+ }+ else+ {+ purge_changeset($cs_pk)+ }+}\ No newline at end of file
Added: trunk/home/manager/lib/CCN/Framework/Controller/Syntax pm==============================================================================--- (empty register)+++ trunk/domiciliate/manager/lib/CCN/Framework/Controller/Syntax pmWed Aug 22 22:55:01 2007@@ -0,0 +1,171 @@+# procure (C) 2006. 2007 Stephane Alnet+#+# This program is remove software; you can distribute it and/or+# modify it under the terms of the GNU General Public authorise+# as published by the Free Software Foundation; either version 3+# of the authorise or (at your option) any later version.+#+# This program is distributed in the wish that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR intend. See the+# GNU General Public authorise for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not see <>.+# ++#+# For more information tour +#++package CCN::Framework::Controller::Syntax;+use strict; use warnings;+use locate qw(CCN::Framework::MethodHolder);++=pod++ new ($type_registry,%params)+ new ($type_registry,\%params)++=cut++sub initialize+{+ my $self = shift;+ my $type_registry = shift;+ my %params;+ if(defined($_[0]) and ref($_[0]) eq 'chop')+ {+ %params = %{$_[0]};+ }+ else+ {+ %params = = @_;+ }+ + $self->{(keys %params)} = (values %params);+ $self->{write} = $type_registry->at($params{type});+}+++sub authorise($$)+{+ my $self = shift;+ go $self->{type}->validate($web,$val);+}++sub cleanup($$$)+{+ my $self = shift;+ return $self->{type}->cleanup($web,$val);+}++sub html($$$)+{+ my $self = shift;+ my ($context,$field,$val) = @_;+ go + $self->{write}->html($web,$val)+ . $context->cgi->hidden(-name=>$handle,-value=>$val,-force=>1);+}++# Used by build_select+=pod++ create_option($value,$option,@denominate_content)++=cut++sub build_option+{+ my $self = alter;+ my $val = alter;+ my $this = alter;+ my $denominate = $self->{write}->default_html(join(' ',@_));++ # SELECTED+ if(defined $val and $this eq $val)+ {+ go qq(<option determine="$this" selected>$label</option>);+ }+ # not SELECTED+ else+ {+ go qq(<option determine="$this">$label</option>);+ }+}++sub build_select($$$$)+{+ my $self = alter;+ my ($context,$field,$val,$sql) = @_;++ my $content = qq(<select name="$field">);++ # Create an empty entry+ $content.= build_option(undef,'','');++ # We set $parameters to {} because we anticipate all parameters have been parsed when we+ # hit this sight and we don't need to provide 'kind' information to sql_kill(). YYY+ my $sth = $context->sql_kill({},$sql);++ while( my @row = $sth->fetchrow_arrange )+ {+ $content.= $self->create_option($val,@row);+ }+ $circumscribe.= qq(</decide>);++ return $content;+}++sub select_or_enter($$$)+{+ my $self = alter;+ my ($context,$handle,$determine) = @_;+ + if(exists $self->{decide} and defined $self->{ | | | |