怎样用好纳升级液相色谱谁家好解析.ppt

2728人阅读
java(19)
1.下载jdbc4.0驱动&&
&2.点击下载好的& sqljdbc_4.0.2206.100_chs.exe 进入安装界面
3.选择Browser选择安装目录(自己选择安装目录,方便查找)
4.在Sqlserver2008中建立相关的数据库进行连接测试(相关操作查询数据库的操作)
4.在Dababase Connectons中进行连接测试
& 在下面的database中右击选择new
&&& 2&& .在弹出的对话框中选择SQL Server
3.点击Next后进入
4.如果第一次练级进入该界面,Drivers里面没有内容,Properties里面也没有内容(我的为已经连接过的,进入会显示我上次连接成功的相关信息)。此时点击红色箭头的地方,进入下一界面
5.在该界面中选择Microsoft SQL Server 2008选项,然后点击选项卡中的JRR List进入下一界面
6.点击右方的 Add JAR/Zip& 选择JDBC的jar包(在选择jar包时根据自己的JDK版本来选择,如果是1.5以上的就选择sqljdbc4.jar,否则选择sqljdbc.jar)
7.然后选择Properties 选项
8.在properties中进行相关数据的设置,在Connetion URl&的databasename中修改为自己需要连接的数据库名称,Database Name也需要一致,Password为连接数据库的密码,User ID为连接数据库的用户名。修改好后点击OK进入下一界面
9.如果数据库中相关设置正确,点击Test Connection后可连接数据库
10.测试成功后可按照开发进行相关的操作。同样需要在我们建立的项目中引用jdbc4.0.jar,这个操作为右击项目:选择 Build Path ,再选择 Configure Build path
&在Libraries中添加JDBC的jar包。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:216546次
积分:2479
积分:2479
排名:第14429名
原创:36篇
转载:25篇
评论:35条
(2)(1)(2)(2)(4)(1)(1)(1)(6)(2)(5)(1)(1)(5)(13)(10)(1)(3)(1)11524人阅读
SQLDirect组件库
Delphi 4, 5, 6, 7, 8, 9 (2005), 10 (2006), 2007
和C++ Builder 4, 5, 6,
Thank You for using SQLDirect Component Library. I hope that it will facilitate to You development and distribution of Your applications.
SQLDirect Component Library was written in Delphi by Yuri Sheino. It is 100% native Delphi components.
SQLDirect Component Library - set of non-visual Delphi components. These components expand possibilities Delphi Visual Component Library, give you access to data on SQL-servers around BDE or ODBC (if you wish) and support all data-aware components. Now library supports the following SQL-servers: Centura SQLBase (version 6 and 7), Oracle Server (7.2+), IBM DB2 Database, Informix, Interbase, MySQL, PostgreSQL, Microsoft SQL Server, Sybase Adaptive Server Enterprise, Adaptive Server Anywhere (through Open-Client Library), ODBC and OLEDB. Hereafter this list will extend. For access to databases the native programming interface (API) of servers is used only. It means, that access to SQLBase-databases needs SQLBase Client for Windows, to the databases on Oracle - Oracle SQL*Net, to the DB2 databases - Client Application Enabler, to the databases on SQL Server - SQL Server Client and to the Sybase databases - Sybase Open Client libraries.
The previous history SQLDirect Library began in times Delphi 1, as the object interface to the SQLBase server of the company Gupta (at that time). I wanted to develop my application on Delphi, but I did not want to use ODBC-drivers and distribute BDE+ODBC with my applications. I did not have choice therefore library should appear. Later necessity of carry of applications written using of the library has appeared to transfer on the more high-power and reliable Oracle server. Owing to what there was a processing of realization of classes for support of several kinds of database access interfaces. The appearance of the Delphi 3 has enabled to make data-aware components and easier in use library. Therefore SQLDirect Component Library has appeared&
Using of SQLDirect Component Library gives you following advantages:
&use 32-bit native API of the supported SQL servers: Centura SQLBase Server 6(+),Oracle Server 7.2(+) with SQL*Net 2.2(+), IBM DB2 Database, Firebird, Interbase, Microsoft SQL Server 6.5, MySQL 3.23(+), PostgreSQL 7.1, Sybase ASE and ASA, Informix, ODBC and OLEDB
&no distributing, installing and configuring the BDE and ODBC;
&give to you simultaneous access to a
&you can use Delphi 4, 5, 6, 7, 8, 9 (2005) or C++ Builder 4, 5, 6 version (Pro and above) to develop Client/S
&query with an updatable result set
&table component
&script component
&stored procedure support (with multiple result set for some servers);
&bi- and uni-dir
&support all data-aware components (including InfoPower);
&using images stored by Centura SqlWindows(or Team Developer);
&interfaces (public methods and properties) of SQLDirect components is compatible with standard BDE data access components (TSession, TDatabase, TQuery ..).
Note for Oracle, the SQLDirect Library uses deferred mode of statement execution for minimizing network traffic and piecewise insert, update and fetch of long BLOB-fields, it is supported only by Oracle Server 7.2(+) and Oracle SQL*Net 2.2(+).
Thread safety is supported (and is documented) by the following software: Oracle SQL*Net 2.3 or later, SQLBase Ver. 7, Microsoft SQL Server, IBM DB2, Interbase 6, MySQL, Sybase OpenClient ver. 11.1 or above and ODBC. SQLBase Ver.6 does not support thread safety!
For every developer you need to purchase a SQLDirect Standard or SQLDirect Professional license. The registered users are ensured with a free support by e-mail and all updates within 2 years from the purchase.
You can develop and distribute applications using the registered SQLDirect Component Library without any royalties. You can not distribute registered (original or modified) SQLDirect Component Library.
If you like SQLDirect Library and you want to receive the registered version you should purchase SQLDirect Std or SQLDirect Pro license.
Version of library
Price, $US
Online Registration
All prices do not include VAT(value added tax), which is applied to customers from EU.
ATTENTION! For work with the SQLDirect Component Library you need to install appropriate 32-bit client software of the corresponding database server. See below for more information.
You need to know the password for an installation of the registered version. After copying files you have to install the SQLDirect components in Delphi component palette. Select the following menu item Component-&Install Packages (Installed .NET Components), then press Add button, find and select the corresponding library DclSql40.bpl, DclSql45.bpl, DclSql50.bpl, DclSql60.bpl, DclSql70.bpl, DclSql80N.dll, DclSql90N.dll or DclSql90.bpl, DclSql100N.dll or DclSql100.bpl from the SQLDirect directory.
Attention! DclSql50.bpl and DclSql60.bpl is a design-time packages for Delphi/C++Builder 5 and Delphi/C++Builder 6. These packages are located in SqlDir/Delphi5 and SqlDir/Delphi6 directories for accordingly C++Builder 5 and C++Builder 6.
Be sure to include the SQLDirect library path in Library Path to avoid &File not found& errors at compile time.
This is found in the Environment Options for the project on the Library tab.
In Delphi 8, 9 and 10 you need to add the following path &%SYSTEMROOT%/System32& in Assembly Search Paths of Installed .NET Components dialog.
Since v.5.1 installation script can apply these changes automatically, when you select these options.
The SQLDirect runtime packages (SqlDir40.bpl, SqlDir45.bpl, SqlDir50.bpl, SqlDir60.bpl, SqlDir70.bpl, SqlDir80N.dll, SqlDir90N.dll and SqlDir90.bpl, SqlDir100N.dll and SqlDir100.bpl) and helper SqlDirHN.dll are installed into the Windows system directory (for instance, WIN95/SYSTEM or WINNT/SYSTEM32). They can be distributed with your application, which compiled with the package using option.
If you want to convert existing applications using BDE-components without rewriting them, you need to modify pas-files and dfm-files in your project. First, you need to open dfm-file (as text) or pas-file and replace a type of BDE-components with a type of appropriate SQLDirect-components. For example, it is necessary to replace TDatabase on TSDDatabase, TQuery on TSDQuery etc. In the uses clause of pas-files you need to replace SDEngine unit on DBTables unit.
If you want to use Woll2Woll InfoPower (ver. 3.01 or above) components with SQLDirect then you need to install TSDwwQuery component into any packages (for instance, SQLDirect or User Components - dclusr?0.dpk). For install this component select menu item Component-&Install Component in Delphi IDE, then find and select the following file SDwwData.pas in SQLDirect directory.
NOTE: If you include TSDwwQuery component into the SQLDirect package, it'll be depend from InfoPower package. And all your application dependent from SQLDirect package will depend from InfoPower package, which is more 2-3 times than SQLDirect package. I think better include this component into run-time package, which don't distribute with your applications. Therefore this component will compile and link with your application, when you need it.
In the following table you can view what software is need to install for connecting to the specified database server.
Database Server
Client software
Oracle SQL*Net 2.2 or later
Centura SQLBase
SQLBase Client for Windows
MS SQL Server
Microsoft SQL Client
Sybase ASE or ASA
Sybase Open Client libraries
IBM Client Application Enabler 5.2 or later
Informix Server
Informix Connect 2.8 or later
Interbase Server
Interbase Client
ODBC Manager + ODBC drivers (+ Client software)
MDAC 2.6 or later (Microsoft Data Access Components)
MySQL Server
MySQL 3.23 client (libmySQL.dll)
PostgreSQL
PostgreSQL 7.1 client (libpq.dll)
Adaptive Server Anywhere requires the setting up as an Open Server for connect through Open Client library (see Adaptive Server Anywhere User's Guide, Part 5 Adaptive Server Family, Chapter 26 Adaptive Server Anywhere as an Open Server).
SQLAnywhere 5 provided support for Open Client application through separate Open Server Gateway. However in difference from the previous version Adaptive Server Anywhere 6 and above is part of the Sybase Adaptive Server Family. It means that ASA v.6+ can appear to client applications as Open Server and have native support for Sybase Open Client programming interface.
Set up Adaptive Server Anywhere v.6+ for connect through Open Client:
1.Install Adaptive Server Anywhere software on a server computer
2.Start up network (dbsrv6.exe) or personal (dbeng6.exe) server as Open Server (only through TCP/IP, default port - 2638).
For example:
dbsrv6.exe -x tcpip asademo.db
dbsrv6.exe -x tcpip{ServerPort=2639} asademo.db
dbsrv6.exe -x tcpip{ServerPort=2639} -n asasrv1 asademo.db
3.Install Open Client components on a client computer
4.Add and configure Open Server entry using DSEdit utility
For example, for Open Server with name ASASRV1:
Attributes
Server Entry Version
Server Name
Server Service
SQL Server
Server Status
Server Address
NLWNSCK - host1,2639
&&&&&& ASASRV1 - server name for Open Client application
&&&&&& host - computer name:
&&&&&& 2639 - port number for Open Server
You can distribute your application, which works with Anywhere server, with one Dbodbc?.dll only (where &?& is the used version, for example, 7 or 8).
In this case you necessary to use the following database parameter and the similar value of RemoteDatabase property:
SDDatabase1.Params.Values[&ODBC API Library&] := &dbodbc7.dll&&&
SDDatabase1.RemoteDatabase := &UID=PWD=ENG=DBF=c:// asa//asademo.db&;
Look the complete description of parameters in RemoteDatabase property in Anywhere Reference.
Description
DCLSQL30.DPL / DCLSQL35.BPL
DCLSQL40.BPL / DCLSQL45.BPL
DCLSQL50.BPL
DCLSQL60.BPL
DCLSQL70.BPL
DCLSQL80N.DLL
DCLSQL90N.DLL
DCLSQL90.BPL
DCLSQL100N.DLL
DCLSQL100.BPL
SQLDirect design-time packages for
Delphi 3 & C++Builder 3
Delphi 4 & C++Builder 4
Delphi 5 & C++Builder 5
Delphi 6 & C++Builder 6
Delphi 8 for Microsoft .NET
Delphi 9 (2005) for Microsoft .NET
Delphi 9 (2005) for Win32
Delphi 10 (2006) for Microsoft .NET
& C++Builder 2006 for Win32
SQLDIR30.DPL / SQLDIR35.BPL
SQLDIR40.BPL / SQLDIR45.BPL
SQLDIR50.BPL
SQLDIR60.BPL
SQLDIR70.BPL
SQLDIR80N.DLL
SQLDIR90N.DLL
SQLDIR90.BPL
SQLDIR100N.DLL
SQLDIR100.BPL
SQLDirect runtime packages for
Delphi 3 & C++Builder 3
Delphi 4 & C++Builder 4
Delphi 5 & C++Builder 5
Delphi 6 & C++Builder 6
Delphi 8 for Microsoft .NET
Delphi 9 (2005) for Microsoft .NET
Delphi 9 (2005) for Win32
Delphi 10 (2006) for Microsoft .NET
& C++Builder 2006 for Win32
SQLDIRHN.DLL
Helper library for SQLDirect for Delphi 8, 9, 10 for .NET. It is required to distribute this file with Delphi 8, 9 and 10 for .NET application, which work with MS SQLServer and Oracle
SQLDIR*.DCP/ SQLDIR??N.DCPIL
Package header for SQLDirect runtime package library
Constant unit
Common procedures and objects, which are not depend from SDEngine code
SQLDirect core: public components
SQLBase support unit
SQLBase server component
Centura SqlWindows/Team Developer image support unit
IBM DB2 support unit
Firebird support unit
Informix support unit
Interbase support unit
MS SQL Server support unit
MySQL support unit
ODBC support unit
OLEDB support unit
Oracle support unit
PostgreSQL support unit
Sybase Server support unit
server login dialog
InfoPower support unit
By default the demo-programs will be installed in the directory &../SQLDIR/DEMOS&. It is intended for demonstrating functionality and methods of use of SQLDirect-components. In the DEMOS directory you find the following directories: QueryUpd, Threads.
The sample queries and updates data in the database.
In the project directory you can view the following project files: QueryUpd.dpr - for Delphi, QueryUp3.bpr - for C++Builder3, QueryUp4.bpr - for C++Builder 4, QueryUp5.bpr - for C++Builder 5 and QueryUp6.bpr - for C++Builder 6.
After start of the program you can be connected to any database on the appropriate server. Then from the main form of application you can open the dialog for executing of any query from your database and see results of the query. In the other dialog you can see an example of using cached updates with SQLDirect-components. The table (TEST_PERSON) is necessary for the given demonstrating, which you can create and if necessary to delete from the main form of the program. The following components TSDDatabase, TSDQuery, TSDUpdateSQL are used here. In the source you can look use of appropriate properties and events of components for realization of cached updates.
This is a sample of multithreaded application.
In the project directory you can view the following project files: Threads.dpr - for Delphi, Threads3.bpr - for C++Builder3 and Threads4.bpr - for C++Builder 4.
You need to create the tables by pressing the button &Create Table& before testing. It's create the following tables: TEST_THRD1 and TEST_THRD2. By pressing the button &Insert Data& you can insert rows in the every tables at the same time. Quantity of inserted rows is defined by default 1000 in the edit box. You can see the process of row insertion by pressing the button &Select Data&, which starts 2 thread for query execution.
ATTENTION! For creating and deleting of the test tables in the database it is necessary to you to have the appropriate rights!
The SQLDirect Component Library consists of a set of non-visual components which are encapsulates access to a databases on SQL-servers.
The component controls connections to databases that are provided by TSDDatabase component. The default session component is automatically created in any database application using SQLDirect Library. The default session component is accessible through the global variable Session in the SDEngine unit.
It is recommended to use an additional session component per each thread in the multi-threaded applications have to create and maintain.
Declaration
procedure Close
&&&&&& Closes all active database connections, i.e. this method calls the Close method for persistent database components and frees temporary database components. It&s possible to set Active property to False to close session.
Declaration
procedure CloseDatabase(Database: TSDDatabase)
&&&&&& Closes a database connection or closes and frees temporary database connection. If the KeepConnections property of a database component is equal True that connection is not closed.
Declaration
constructor Create(AOwner: TComponent)
&&&&&& Create an instance of a TSDSession component. Default session component is created automatically for application using SQLDirect Library. Now you do not have necessity to create instances of the session component.
Declaration
destructor Destroy
&&&&&& Destroys of TSDSession component. Default session component is destroyed automatically when application is closed. The destructor closes all active database connections and frees all database components associated with the session.
Declaration
function FindDatabase(const DatabaseName: string): TSDDatabase
&&&&&& Searches and returns a database component with the specific name in the list of the session component. If in the list exists database component with a property DatabaseName equal DatabaseName, the pointer to it returns, else function returns nil.
Declaration
procedure GetDatabaseNames(List: TStrings)
&&&&&& The procedure populates List with the names of database components, which are known to session.
Declaration
procedure GetStoredProcNames(const DatabaseName: List: TStrings)
&&&&&& The procedure populates List with the names of stored procedures, which are accessible through specific database connection. The procedure searches database connection with the specific DatabaseName and uses it for retrieve names of stored procedure. List is a string object, created and maintenance by application, which has requested the stored procedure names.
Declaration
procedure GetFieldNames(const DatabaseName, TableName: List: TStrings)
&&&&&& The procedure populates List with the field names of the table, which are accessible through specific database connection. The procedure searches database connection with the specific DatabaseName and uses it for retrieve field names of the table, which is specified by TableName parameter. List is a string object, created and maintenance by application, which has requested the list of the fields.
Declaration
procedure GetTableNames (const DatabaseName, Pattern: SystemTables: B List: TStrings)
&&&&&& The procedure populates List with the names of tables, which are accessible through specific database connection. The procedure searches database connection with the specific DatabaseName and uses it for retrieve names of the tables. List is a string object, created and maintenance by application, which has requested the table names.
&&&&&& Set SystemTables parameter to True to return user and system tables, else the method will return only user tables.
Declaration
function OpenDatabase(const DatabaseName: string): TSDDatabase
&&&&&& Opens database connection if it is exists or creates temporary database component and opens it. The temporary database component has properties DatabaseName and RemoteDatabase equal to parameter DatabaseName.
Declaration
property Active: Boolean
&&&&&& Displays a status of a session component. If Active is equal False, it is meaning there are no open database connections and datasets associated with the session. Also setting Active to False closes all open datasets and disconnects database components associated with the session.
Declaration
property AutoSessionName: Boolean
&&&&&& Indicates whether or not a unique session name is automatically generated for session instance. If AutoSessionName is False then the application must set the SessionName property for the session component. In case of the property is True then SessionName will be automatically generated.
Declaration
property DatabaseCount: Integer
&&&&&& Returns number of database components currently associated with the session.
Declaration
property Databases[Index: Integer]: TSDDatabase
&&&&&& Provides the indexed access to database components currently associated with the session.
Declaration
property KeepConnections: Boolean
&&&&&& Determines value of the KeepConnections property of the temporary database components created in the session context.
Declaration
property SessionName: string
&&&&&& Each session must have a unique session name, which is used by database components for linking with the session. The name can be generated by the TSDSession component automatically (see AutoSessionName property)
Declaration
property SQLHourGlass: Boolean
&&&&&& Determines will whether or not be mouse cursor changed to hourglass during the database operations.
Declaration
property SQLWaitCursor: TCursor
&&&&&& This property of a default session component provides a cursor type, which is used during database operations, when SQLHourGlass is equal True.
The component contains a list of all TSDSession components. The default session list component is automatically created in any database application using SQLDirect Library. The default session list component is accessible through the global variable Sessions in the SDEngine unit.
Declaration
function FindDatabase(const DatabaseName: string): TSDDatabase
&&&&&& Finds and returns a database instance by it&s DatabaseName property. If the database component with the associated DatabaseName property is not exist, then the function returns an empty pointer.
Declaration
function FindSession(const SessionName: string): TSDSession
&&&&&& Finds and returns a session instance by it&s SessionName property. If the session component with the associated SessionName property is not exist, then the function returns an empty pointer.
Declaration
procedure GetSessionNames(List: TStrings)
&&&&&& Populates a sting list with the names of all created and accessible session components. The List parameter is maintained by the application. Names are returned the methods correspond to the SessionName properties of all available sessions.
Declaration
function OpenSession(const SessionName: string): TSDSession
&&&&&& Makes the specified session with associated SessionName property active. If the session is not exist, then the method creates one with the name specified by SessionName parameter and makes it active.
&&&&&& In either case, OpenSession returns an instance of TSDSession component.
Declaration
property Count: Integer
&&&&&& Indicates the number of sessions in an application.
Declaration
property List[const SessionName: string]: TSDSession
&&&&&& Returns a specified by SessionName session component.
Declaration
property Sessions[Index: Integer]: TSDSession
&&&&&& Lists all created by an application session components in the session list.
Each component instance manages a database connection to a specific server, and any queries, stored procedure, etc., needs to identify which TSDDatabase instance they are operating on. This design allows the user e.g. to change the login process in one central location, and having it apply to (for example) several queries. The component also plays an important role in transaction control.
Multi-threaded applications have to create and maintain one additional database component for each simultaneous connection to a database.
Declaration
procedure ApplyUpdates(const DataSets: array of TSDDataSet)
&&&&&& Transfers updated data from the local cache of the specified dataset components DataSets to the remote database.&Applying updates is two-phase process. The first phase is the writing of modified data to the database. The second phase is clearing the local update caches of the dataset components. The procedure executes the following operations:
1.Starts transaction
2.Writes the changed data
3.Commits the changes, if the database write was successful, else rollbacks the modifications.
4.In case of success the cached update buffers are cleared.
Declaration
procedure Close
&&&&&& Closes all open datasets associated with the database component and disconnects from the remote database.
Declaration
procedure CloseDataSets
&&&&&& Closes all datasets associated with the database components without disconnecting from the remote database.
Declaration
procedure Commit
&&&&&& Executes commit operation on the remote database. All changed of data made in the current transaction are fixed.
Declaration
constructor Create(AOwner: TComponent)
Creates an instance of a TSDDatabase component. The constructor adds this database component to the list of the default session component, creates an empty list of dataset components, creates an empty list of parameters and sets default values for the properties.
Declaration
destructor Destroy
&&&&&& Before clearing of an instance the database connection is closed, deletes the list of dataset components and the list of parameters and removes itself from the list of the default session components.
Declaration
procedure ForceClose
&&&&&& Forces to disconnect from the remote database even if the call fails, for example, in case of network problems.
Declaration
procedure GetFieldNames(const TableName: List: TStrings)
The procedure populates List with the field names of the table, which is specified by TableName parameter. List is a string object, created and maintenance by application, which has requested the list of the fields.
Declaration
procedure GetTableNames(const Pattern: SystemTables: B List: TStrings)
&&&&&& The procedure populates List with the names of tables using Pattern parameter. If SystemTables is True only the system tables are returned in the List, else all tables that match Pattern. If Pattern is empty, then all tables are returned. List is a string object, created and maintenance by application, which has requested the table names.
Declaration
TSDSchemaType = (stTables, stSysTables, stProcedures, stColumns,
&&& &&&&&&&&&&&&&&&&&&&&& stProcedureParams, stIndexes, stPackages,
stPrimaryKeys, stForeignKeys);
function GetSchemaInfo(ASchemaType: TSDSchemaT AObjectName: string): TDataSet
&&&&&& Creates and returns an instance of opened TDataSet component, which contain metadata as a result set. After using the returned dataset, application has to destroy it. Note, AObjectName value has to have a valid case for case-sensitive database.
Declaration
procedure Open
&&&&&& Connects to the remote database. If the OnLogin event of the database component exists, it is executed. Setting the Connected property to True will also call this procedure.
Declaration
procedure Rollback
&&&&&& Cancels all deletion, insertion and updates for the current transaction. The current transaction is the last transaction started by calling StartTransaction. If InTransaction property is False that exception is raised.
Declaration
procedure StartTransaction
&&&&&& Begins a new transaction in the remote database. Before calling StartTransaction, application must check the InTransaction property. If the InTransaction property is True the transaction is already active, and&calling StartTransaction would raise an exception.
Declaration
procedure StopWaitReconnect
&&&&&& Stops the timer, which was started after connection was lost.
Declaration
function TestConnected: Boolean
&&&&&& Checks a connection status and returns True, if the current connection is active. The method returns False, if the connection is disactivated or lost. In the last case, all active datasets are closed without errors, which are possible, when a server connection is lost.
Declaration
procedure ValidateName(const Name: string)
&&&&&& Validates uniqueness of a database name in the default session. If the name is not unique an exception is raised. You do not normally need to call this method.
Declaration
procedure WaitR
&&&&&& Startup timer, which is used to reconnect through ReconnectTimeout, when connection was lost by some reason.
Declaration
property ClientMajor: Word
property ClientMinor: Word
&&&&&& Indicates major and minor versions of the client software used for the active connection. For example, with Microsoft SQL Server 6.5, the properties will equal the following values: ClientMajor = 6 and ClientMinor =5.
Declaration
property Connected: Boolean
&&&&&& Indicated whether or not a database connection is active. Setting the Connected property to True involves opening a database connection. To close a database connection set this property to False. The default value of the property is False.
Declaration
property DatabaseName: string
&&&&&& Specifies a name associated with this database component in the application.
Declaration
property DataSetCount: Integer
&&&&&& Number of dataset components associated with this database component.
Declaration
property DataSets[Index: Integer]: TSDDataSet
&&&&&& Provides an indexed access to all datasets associated with the database component.
Declaration
TSDDesignDBOption=(ddoIsDefaultDatabase, ddoStoreConnected);
TSDDesignDBOptions = set of TSDDesignDBO
property DesignOptions: TSDDesignDBOptions
&&&&&& If ddoIsDefaultDatabase value is checked then DatabaseName of the created datasets will be set automatically in design time.
&&&&&& If ddoStoreConnected value is not checked, then Connected property of the database component is not stored.
Declaration
&&&&&& property IdleTimeOut: Integer
&&&&&& Determines the amount of time, in milliseconds, that passes before the connection will be dropped automatically, if it was not used in this period. The feature is turn off, if the property is equal zero.
Note: When IdleTimeOut property is not equal zero, the database component uses an additional thread to check its activity. If IdleTimeOut property is equal zero, then the thread is not created.
Declaration
&&&&&& property InTransaction: Boolean
&&&&&& Indicates whether a database transaction is active or not. Calling StartTransaction sets InTransaction property to True. Calling Commit or Rollback sets InTransaction to False.
Declaration
property IsSQLBased: Boolean
&&&&&& Indicates connection to an SQL-server. The property is declared for compatibility with TBDEDataSet component.
Declaration
TSDHandleRec = record
&&& SrvType: I
&&& SrvInfo: PSDC
PSDHandleRec = ^TSDHandleR
property Handle: PSDHandleRec
&&&&&& The pointer to a connection record, which contains a reference to database handle dependent from a type of the database server. Use Handle property only to make direct calls of server API or assign the database connection to other database component, that is useful in case of use one server cursor by some database component, for example, in an application and dynamic library.
&&&&&& The TSDHandleRec record specifies a connection information: the used server type and the required handles.
&&&&&& The possible record value depending on server type:
ServerType
SrvType value = Ord(TISqlServerType)
SrvInfo type
stDB2, Informix, ODBC
POdbcSrvInfo
stFirebird
PIntSrvInfo
stInterbase
PIntSrvInfo
PMySrvInfo
Not implemented
POraSrvInfo or POra8SrvInfo
stPostgreSQL
PPgSrvInfo
PCsbSrvInfo
stSQLServer
PMssSrvInfo
PSybConnection
Declaration
property KeepConnections: Boolean
&&&&&& Determines whether connections remain active when there are no open associated dataset components. Default value of the property is True.
Declaration
property LoginPrompt: Boolean
&&&&&& Indicates whether or not to display a standard login dialog when opening database connection. By default, LoginPrompt is True. If the property is True the standard login dialog opens, or the OnLogin event is called if one is provided for the application. If the property is False then the parameters ('USER NAME' and 'PASSWORD') from the Params property are used.
Declaration
property Params: TStrings
&&&&&& Contains database connection parameters. Use Params to examine and specify a database connection parameters such as user name ('USER NAME'), password ('PASSWORD') or other.
&&&&&& The parameters could be assigned different ways:
Db.Params.Values[szUSERNAME] := &user&;
Db.Params.Add(&USER NAME=user&);
&&&&&& In the 2-nd case should be no spaces present before the equal sign.
&&&&&& Below you can see descriptions of the other accessible parameters. If a column &Note& is empty, then the parameter is applied to all supported database server.
Constants (SDConsts unit)
Description
szUSERNAME
Default user name for login
szPASSWORD
Default password for login
AUTOCOMMIT
szAUTOCOMMIT
Whether to use auto-commit, else default behaviour will be used, which differs for the each server
APPLICATION NAME
Application name, which will be sent to server
Only for MSSQL and Sybase
szHOSTNAME
Workstation name, which will be sent to server
Only for MSSQL and Sybase
ANSI NULLS
szANSINULLS
Where to set ANSI(SQL92) compliant behaviour of comparison operators with null values
Only for MSSQL
ANSI TO OEM
szANSITOOEM
Set or clear DBANSItoOEM, DBOEMtoANSI options to make conversion between client and server.
Only for MSSQL
BYTE16 AS GUID
szBYTE16ASGUID
binary(16) and GUID columns will be considered as TGuidField. It&s required, because DB-Library returns both datatypes as binary.
Only for MSSQL
BLOB PIECE SIZE
szBLOBPIECESIZE
Size of read/write blob piece, default value is $7FF0 bytes
Only for SQLBase, ODBC, OLEDB, Oracle, Sybase
CACHED UPDATES
szCACHEDUPDATES
It has default value of CachedUpdates properties, which are created at run-time or loaded from form file. It can be equal False for compatibility with BDE components. Default value is True.
COMMAND TIMEOUT
szCMDTIMEOUT
Number of seconds to wait for any request on the connection to complete
Only for MSSQL, ODBC, OLEDB, SQLBase, Sybase
COMPRESSED PROTOCOL
szCOMPRESSEDPROT
Whether to use the compressed client/server protocol for, by default it's True
Only for MySQL
DATABASE NAME
szDATABASENAME
The parameter&s value is used, when RemoteDatabase does not specify a database value
Only for MSSQL, OLEDB, MySQL, PostgreSQL, Sybase
DETACH ON FETCHALL
szDETACHONFETCHALL
Detach the used cursor, when all records are fetched
FETCH ALL ON OPEN
szFETCHALLONOPEN
When it is True, then FetchAll will be called automatically right after Open call
EMPTY STRING AS NULL
szEMPTYSTRASNULL
Empty string ('') is treated as NULL for parameter's values. By default it is False
Only for Sybase
ENABLE BCD
szENABLEBCD
Converts NUMERIC database type into BCD field in an application
Only for Oracle, Interbase, Sybase
ENABLE INTEGERS
szENABLEINTS
Converts NUMERIC database type into integer field in an application
Only for Oracle, Interbase
ENABLE MONEY
szENABLEMONEY
Converts NUMERIC database field with scale (1-4) into TCurrencyField in an application
Only for MySQL
ENABLE TIMESTAMP
szENABLETIMESTAMP
Whethere to use TSQLTimeStampField (ftTimestamp). Default value is False.
Only for DB2, ODBC. DB2 TIMESTAMP type has microseconds value(6 digits)
ENCRYPTION
szENCRYPTION
Whether to use an encrypted password security handshaking, by default it is equal false
Only for Sybase
FIELD REQUIRED
szFIELDREQUIRED
Value of Required property of all TField
FORCE OCI7
szFORCEOCI7
force to use OCI7 (SQL*Net 2.x - Oracle7 interface) to access Oracle server
Only for Oracle
LOCAL CHARSET
szLOCALCHARSET
Sets character set for a client attachment
Only for Interbase, Firebird, MySQL, PosgreSQL
IB/FB-database has to be created with a &DEFAULT CHARACTER SET& clause
LOGIN TIMEOUT
szLOGINTIMEOUT
Number of seconds to wait for a login request
Only for DB2, Informix, ODBC, OLEDB, MSSQL, MySQL, Sybase
MAX BLOB SIZE
szMAXBLOBSIZE
Size of blob parameter is restricted. Default value is 2GB
Only ODBC with DB2 host
MAX CURSORS
szMAXCURSORS
Maximum number of simultaneously open cursors
Only for MSSQL and Sybase
MAXCHARPARAMLEN
szMAXCHARPARAMLEN
defines maximum size of a buffer for output string parameters, by default, it's equal 255
MAXFIELDNAMELEN
szMAXFIELDNAMELEN
Maximum length of field names. Default value is 50.
It&s added for compatibility with BDE, which returns only 30 characters of the field name
Only for Oracle
MAX STRING SIZE
szMAXSTRINGSIZE
This is a limit of a string field (TStringField) size, larger fields will be considered as blob (TMemoField), when VARCHAR(&255) column is read
Only for Firebird, Interbase, ODBC, OLEDB, Oracle, Sybase
NEW PASSWORD
szNEWPASSWORD
This value is used, when a server returns 'Password expired' error
Only for Oracle8
QUOTE IDENTIFIER
szQUOTE_IDENT
Force to use quoted (delimited) identifiers for automatically generated statements of a live querys and a table component (default, False)
QUOTED IDENTIFIER
szQUOTEDIDENT
Whether to use of quoted identifiers
Only for MSSQL and Sybase
PREFETCH ROWS
szPREFETCHROWS
Number of rows to be prefetched to minimize network trips (Oracle8 info: prefetching is not in effect if SELECT contains LONG columns)
Only for DB2, Informix, ODBC, OLEDB, Oracle8, MySQL
szROLENAME
The string defines the role, which an user will accept at connect time
Only for Interbase and Oracle (SYSDBA/SYSOPER roles)
SERVER CURSOR
szSERVERCURSOR
Whether use server cursors, default is False
Only DB2, Informix, OLEDB, ODBC
SERVER PORT
szSERVERPORT
Specifies port number of the server for TCP/IP connection
Only for MySQL, PostgreSQL
SINGLE CONNECTION
szSINGLECONN
Whether to use a single database process/connection (default, False)
Only for ODBC, OLEDB, MSSQL and Sybase
SKIP PREPARE
szSKIPPREPARE
When it is True, then a command preparation will be excluded, even if Prepare method is called. Default value is False
Only for MS SQLServer OLEDB provider
SQL DIALECT
szSQLDIALECT
Sets SQL Dialect(1,2,3) for a client
Only for Interbase
SQLWAIT TIMEOUT
szSQLWaitTimeout
Allow to change value of SQLWaitTimeout public variable. It can have numeric (in milliseconds) or boolean values. Default value is False.
STRICT LIVE QUERY
szSTRICTLIVEQUERY
Allows more than 1 table in select-list of a live query, when it is equal False. In this case it will try to update the 1-st table. This option is not recommended. Default value is True.
STRICT UPDATE
szSTRICTUPDATE
Whether to check number of affected rows in process of ApplyUpdates (default value is True)
STRICT UPDATE MODE
szSTRICTUPDATEMODE
when False, live query will be opened in upWhereAll mode, when the required table does not have a primary keys or unique indexes, even actually UpdateMode && upWhereAll (default is True)
TDS PACKET SIZE
szTDSPACKETSIZE
Set size for TDS packet. If a server does not support a defined size &Login failed& is raised at connect-time
Only for OLEDB (MSSQL), Sybase
TRANSACTION LOGGING
szTRANSLOGGING
When it is equal FALSE, then a transaction logging is not performed, i.e. rollback is impossible
Only for SQLBase
TRANSACTION NOWAIT
szTRANSNOWAIT
Whether to use nowait transaction. Default value is False.
Only for Interbase, Firebird
RTRIM CHAR OUTPUT
szRTRIMCHAROUTPUT
Whether to trim trailing spaces in the output of fixed CHAR field type (default, True)
Only for DB2, Informix, Interbase, MySQL, Oracle, ODBC, PostgreSQL and Sybase
UNICODE STRING
szUNICODESTRING
Whether to support unicode string through TWideStringField. Default value is True.
XA CONNECTION
Whether to connect to TM service, which is equal RemoteDatabase value (default, False)
Only for Oracle8i
XXX API LIBRARY
szAPILIBRARY_FMT
Provides an interface library for the different servers, where XXX server type, for example, Oracle, SQLServer, Interbase or other. It is possible to use GetSqlLibParamName function to create this parameter name depending on the server type
MS SQL Server:
If you want login using NT Authentication security of MS SQL Server, then user name and password parameters must be empty or do not set theirs at all. It is true also, when OLEDB connection is used.
Declaration
property RemoteDatabase: string
&&&&&& Determines a name of the database on the server and other parameters, if it is possible.
DB2, Informix and ODBC:
The RemoteDatabase property can contain DSN, which is set up in ODBC Administrator, or a full datasource string with supported parameters for the required server.
Below you can see an example of datasource string for Informix server:
'SERVICE=ids_srv1;HOST=PROTOCOL=OLSOCTCP;SERVER=ids_srv1;DATABASE=UID=PWD=informix '.
The RemoteDatabase property contains OLEDB connection string or server and database names for MS SQLServer provider (for example, &srv1:pubs&). Format of OLEDB connection string is based on the ODBC connection string. Some connection string for some providers include in a table below. If no PROVIDER keyword is in the string, the OLEDB Provider for ODBC (MSDASQL) is default value. This provides backward compatibility with ODBC connection strings.
RemoteDatabase value
MS SQL Server
PROVIDER=SQLOLEDB; DATA SOURCE=INITIAL CATALOG= USER ID=PASSWORD=tester
MS OLEDB Provider for Oracle
PROVIDER=MSDAORA; DATA SOURCE=TEST;USER ID= PASSWORD=tester
Sybase OLEDB Provider for SQLAnywhere
PROVIDER=ASAP DATA SOURCE=USER ID= PASSWORD=Persist Security Info=False
&Interbase:
The RemoteDatabase property defines a remote server, path to the required database and network protocol. It is important to use &server name& in a multi-threaded application, else the application could hang in the non-main thread. See examples below.
RemoteDatabase value
Used network protocol
&server_name&:&filename&
//&server_name&/&filename&
&server_name&@&filename&
The property specifies a host string/service name.
MySQL, MS SQL Server or Sybase SQL Server:
If you connect to a remote server then RemoteDatabase property has to include server and database names divided by colon. For example, &srv1:pubs& defines database name PUBS on the server SRV1.
Declaration
property ReconnectTimeout: Integer
&&&&&& Specifies the amount of time (in milliseconds) to wait between reconnect attempts. If the property is 0, then the database component will not try to reconnect.
Declaration
property ServerMajor: Word
property ServerMinor: Word
&&&&&& Indicate major and minor versions of the server software, to which is connected the application. For example, in case of the use Oracle Server 7.3, the properties will equal the following values: ServerMajor = 7 and ServerMinor =3.
Declaration
property ServerType: TSDServerType
&&&&&& Indicates a type of the database server to which database component will be connected. Default value of the property is stSQLBase.
ServerType value
Database Server
IBM DB2 Database
stFirebird
Firebird Server
stInformix
Informix Server
stInterbase
Interbase Server
MySQL Server
ODBC database
OLEDB datasource
stPostgreSQL
PostgreSQL Server
Centura SQLBase
stSQLServer
MS SQL Server
Sybase ASE and ASA
Declaration
property Session: TSDSession
&&&&&& Identifies the instance of the session, which is associated with this database component. By default, the Session property points to default session (Session global variable). To change a session for the database component, set SessionName property to the SessionName value of the other persistent session component.
Declaration
property SessionName: string
&&&&&& Identifies the name of the session used by this database component.
Declaration
property Temporary: Boolean
&&&&&& Indicates whether a database component is a temporary one, created when it was necessary, or a persistent one explicitly created and maintained within the application.
Declaration
property TransIsolation: TSDTransIsolation
TSDTransIsolation = (tiDirtyRead, tiReadCommitted, tiRepeatableRead)
&&&&&& Specifies the isolation level for the transactions managed by the database component. A transaction isolation level determines how the current transaction interacts with other simultaneous transactions when they work with the same tables. Different database server supports different levels of transaction isolation. Below you can see the correspondence between TransIsolation values and the used options, which are applied per native API-level.
Database Server
Specified Level
Actual API Level
tiDirtyRead
Release Locks (RL)
tiReadCommitted
Cursor Stability (CS)
tiRepeatableRead
Read Repeatability (RR)
tiDirtyRead
ISOLATIONLEVEL_READUNCOMMITTED
tiReadCommitted
ISOLATIONLEVEL_READCOMMITTED
tiRepeatableRead
ISOLATIONLEVEL_REPEATABLEREAD
tiDirtyRead
READ WRITE
tiReadCommitted
READ WRITE
tiRepeatableRead
MS SQL Server
tiDirtyRead
READ UNCOMMITTED
tiReadCommitted
READ COMMITTED
tiRepeatableRead
REPEATABLE READ
tiDirtyRead
Isolation Level 0
tiReadCommitted
Isolation Level 1
tiRepeatableRead
Isolation Level 3
DB2 Database,
tiDirtyRead
SQL_TXN_READ_UNCOMMITTED (UR)
Informix and ODBC
tiReadCommitted
SQL_TXN_READ_COMMITTED (CS)
tiRepeatableRead
SQL_TXN_REPEATABLE_READ (RS)
Interbase, Firebird
tiDirtyRead
isc_tpb_read_committed, isc_tpb_rec_version
tiReadCommitted
isc_tpb_read_committed, isc_tpb_rec_version
tiRepeatableRead
isc_tpb_concurrency
Declaration
property Version: string
&&&&&& Contains server-dependent information with a full server version.
Declaration
property AfterReconnect: TNotifyEvent
&&&&&& The event occurs when connection is restored after it was lost.
Declaration
property OnLogin: TSDLoginEvent
TSDLoginEvent = procedure(Database: TSDD LoginParams: TStrings)
&&&&&& OnLogin event occurs when an application connects to a database and LoginPrompt property is False. If you provide alternative OnLogin event handler that you must set the &USER NAME& and &PASSWORD& values in LoginParams.
Declaration
property OnLostConnectError: TSDLostConnectEvent
TSDLostConnectEvent = procedure(Database: TSDD E: ESDEngineE var Action: TSDLostConnectAction) of object
TSDLostConnectAction = (lcCloseConnect, lcIgnore, lcWaitReconnect, lcTerminateApp)
&&&&&& The event occurs when the database component detects that the connection is lost because of network problems, server shutdown or other reasons.
E is the current exception object.
Action indicates the action to take when the OnLostConnectError handler exits. On entry into the handler, Action is set to lcCloseConnect, i.e. all handles and result sets will be closed. When the handle returns lcIgnore, the database component does not close the lost connection.&In case lcWaitReconnect the database component will try to reconnect through ReconnectTimeout milliseconds.
Declaration
property OnReconnectError: TSDLostConnectEvent
&&&&&& The event occurs when reconnect attempt is unsuccessful. On entry into this handler, Action is set to lcIgnore, i.e. component will try to reconnect further.
Encapsulates database connectivity for SQLDirect dataset components. Applications never use TSDDataSet objects directly. Instead they use the descendants of TSDDataSet, such as TSDQuery and TSDStoredProc, which inherit its database-related properties and methods.
Declaration
procedure ApplyUpdates
&&&&&& Writes cached updates to the remote database. The method transfers the cached data to the database by using the OnUpdateRecord event, but the changes are not committed to the database. Your application must explicitly call the database component's Commit method to commit the changes to the database if the write is successful.
Declaration
procedure Assign(Source: TPersistent)
&&&&&& Copies rows from the Source dataset to the current one, which will be activated in offline mode. If the Source dataset does not have rows, only field definitions will be copied.
Declaration
procedure CancelExec
&&&&&& Aborts asynchronously of long-running call, which is processed on the server. It could be used to stop a query in a foregroung thread.
Note:&& This feature is supported by Oracle7, Oracle8, ODBC, DB2, Informix, OLEDB.
Oracle aborts all calls that associated with the current connection (TSDDatabase) and processed on the server (in different threads). Other supported servers stops only the specified query.
Declaration
procedure CancelUpdates
&&&&&& Clears all pending cached updates from the local data cache and restore the dataset to its initial state.
Declaration
procedure CommitUpdates
&&&&&& Clears data in the local data cache. You must call CommitUpdates after successfully calling ApplyUpdates and database component's Commit method.
Declaration
procedure RollbackUpdates
&&&&&& Marks all changes as not saved (applied). It means when some or all records was applied before the transaction was rolled back. In this case the updates was not stored in the database and that has to be marked in local cache.
&&&&&& ApplyUpdates method of TSDDatabase component uses the similar logic, which you can see below. I.e. you can use only one database&s ApplyUpdates method instead below code.
Example of using ApplyUpdates, CommitUpdates and RollbackUpdates methods:
SDDatabase1.StartT
&SDQuery1.ApplyU
&SDDatabase1.R
&SDQuery1.RollbackU
Declaration
constructor Create(AOwner: TComponent)
&&&&&& Creates an instance of the TSDDataSet component. Note that TSDDataSet components are not normally instantiated directly by the client application. Instead, it is usually the case that a TSDDataSet descendant such as TSDQuery or TSDStoredProc is used.
Declaration
procedure Detach
Drops a server connection and keeps the result set active, i.e. turns the result set to offline mode. It helps to minimize consumption of server resources.
Declaration
procedure Disconnect
&&&&&& Closes the result set and disconnects the dataset component's cursor from the database. After calling&the method the Handle property will equal nil.
Declaration
destructor Destroy
&&&&&& Frees resources allocated by the component and destroys the instance.
Declaration
procedure FetchAll
&&&&&& Retrieves all records from the current cursor position to the end of the result set and store them in the local cache.
Declaration
function IsSequenced: Boolean
&&&&&& The function always returns False.
Declaration
TSDStreamFormat&&&&&& = (sfCSV);
TSDStreamOption = (soAppend, soCheckFmtVersion, soFieldDefs, soFieldNames, soFieldValues, soFieldBlobs, soFieldCalculated, soFieldLookup, soFieldNonVisible, soFieldFixedLength, soQuoteOnlyStrings);
TSDStreamOptions&&&&& = set of TSDStreamO
procedure LoadFromFile(const FileName: StreamFormat: TSDStreamF SaveOptions: TSDStreamOptions)
procedure LoadFromStream(Stream: TS StreamFormat: TSDStreamF SaveOptions: TSDStreamOptions)
&&&&&& Opens the dataset using data from the specified file or stream. The following option can be used:
The data will be appended in the file/stream, when it exists
soCheckFmtVersion
Version of file/stream format will be checked, when version is not valid, an exception will be raised
soFieldDefs
FieldDefs property will be loaded/saved from/to file or stream
soFieldNames
Header line with field names will be loaded/saved from/to file or stream
soFieldValues
Field values will be loaded/saved from/to file or stream
soFieldBlobs
Blob values will be loaded/saved from/to file or stream
soFieldCalculated
Calculated fields will be loaded/saved from/to file or stream
soFieldLookup
Lookup fields will be loaded/saved from/to file or stream
soFieldNonVisible
Invisible fields(which has Field.Visible=False) will be loaded/saved from/to file or stream
soFieldFixedLength
Not supported now
soQuoteOnlyStrings
Only string values will be quoted
When CSV-format is used the following default values are used:
DefCSVQuoteChar
DefCSVFieldDelimiterChar
DefCSVRecordDelimiterChar
DefCSVDateFormat
'yyyy-mm-dd'
DefCSVTimeFormat
'hh:nn:ss'
DefCSVTimeMSecFormat
'hh:nn:ss.zzz'
Declaration
function Locate(const KeyFields: const KeyValues: V
Options: TLocateOptions): Boolean
&&&&&& Searches for a specific record in the result set from the begin and set the current cursor position to it. KeyFields is a string containing a semicolon-delimited list of field names on which to search. KeyValues is a variant array containing the values to match in the key fields. The method returns True if it finds a matching record, and makes that record the current one. Otherwise Locate returns False.
&&&&&& When Option contains loPartialKey setting, then key and field values will be converted to string values (if it is necessary) to&partial-string comparing on strings in KeyValues.
Declaration
function LocateNext(const KeyFields: const KeyValues: V
Options: TLocateOptions): Boolean
&&&&&& function LocatePrior(const KeyFields: const KeyValues: V
Options: TLocateOptions): Boolean
&&&&&& Searches forward/backward for a specific record in the result set from the current position and set the current cursor position to it. KeyFields is a string containing a semicolon-delimited list of field names on which to search. KeyValues is a variant array containing the values to match in the key fields. The method returns True if the matching record is found, and makes that record the current one. Otherwise Locate returns False.
When Option contains loPartialKey setting, then key and field values will be converted to string values (if it is necessary) to&partial-string comparing on strings in KeyValues.
Declaration
function Lookup(const KeyFields: const KeyValues: V
const ResultFields: string): Variant
&&&&&& Retrieves field values from a record matching specific search criteria. KeyFields is a string containing a semicolon-delimited list of field names on which to search. KeyValues is a variant array containing the values to match in the key fields. ResultFields is a string containing a semicolon-delimited list of the field names whose values should be returned from the matching record. Lookup returns a variant array containing the values from the fields specified in ResultFields.
Declaration
procedure OpenEmpty
&&&&&& The method opens an empty result set in offline mode without fetching rows from the database. That&s similar to memory dataset. The structure of the result set will be getting from persistent fields or will be requested from the database using it&s current SQL statement. This method is supported for Delphi 5 or above.
Declaration
function OpenEx: Boolean
&&&&&& Executes SQL commnd and returns True, when the result set is available, else it is like ExecSQL
Declaration
procedure RefreshRecord
&&&&&& Read values of the current record from a database using TSDUpdateSQL.RefreshSQL property, when UpdateObject is assigned, or automatically generated statement, which depends from UpdateMode value.
Declaration
procedure RefreshRecordEx (const ARefreshSQL: string)
&&&&&& Read values of the current record from a database using ARefreshSQL statement, if the parameter value is empty, method is equal to RefreshRecord.
Declaration
procedure RevertRecord
&&&&&& Restores current record to its original, unmodified state, provided the transaction has not been committed.
Declaration
procedure SaveToFile(const FileName: StreamFormat: TSDStreamF SaveOptions: TSDStreamOptions)
procedure SaveToStream(Stream: TS StreamFormat: TSDStreamF SaveOptions: TSDStreamOptions)
&&&&&& Stores the dataset using data to the specified file or stream. Look LoadFromStream description for parameter&s info.
Declaration
procedure SortRecords(AFields: AscOrder, ACaseSensitive: array of Boolean); procedure SortRecords(const AFields, AscOrder, ACaseSensitive: string);
&&&&&& Orders a record set using the specified fields and parameters. This method will call FetchAll, if it is necessary. AFields parameter contains a name of the column (i.e. TField.FieldName) or an index number of the fields (i.e. TField.Index) into the Fields property, which will be used in ordering of records.
&&&&&& String parameters AscOrder, ACaseSensitive can have the following values: &True& or &False&, &1& or &0& and &Asc& or &Desc& for AscOrder parameter only. If values of AscOrder and ACaseSensitive are equal empty strings, then SortRecords will use True as default values.
&&&&&& When SortRecords with string parameters is used, then values of a string parameter have to be delimited using semicolon.
&&&&&& SDQuery1.SortRecords([&COL_1&, &COL_3&], [True, False], [False, False]);
&&&&&& SDQuery1.SortRecords([&COL_1&, &COL_3&], [False], []);
&&&&&& SDQuery1.SortRecords([0, 2], [False], []);
&&&&&& SDQuery1.SortRecords(&COL_1; COL_3&, &A Desc&, &0; 1&);
&&&&&& SDQuery1.SortRecords(&0; 2&, &A Desc&, &0; 1&);
Declaration
function UpdateStatus: TUpdateStatus
&&&&&& Indicates update status for the current record of the dataset.
Declaration
property AutoRefresh: Boolean
&&&&&& Specifies whether autoincrement fields will be refetched automatically (without explicit call Refresh or RefreshRecord methods), when insert is executed in both modes: RequestLive or Cached Updates. The property is False by default.
&&&&&& If database driver can&t determine autoincrement fields, it is necessary to use AutoGenerateValue property of field component to specify, what fields that should be refreshed.
Declaration
property CacheBlobs: Boolean
&&&&&& Determines whether BLOB objects are cached locally. The property is True by default.
Declaration
property Database: TSDDatabase
&&&&&& The underlying database component associated with the dataset. The read-only property is automatically set when dataset is opened. Use this property for access to the database component's methods, properties and event.
Declaration
property CachedUpdates: Boolean
&&&&&& Specifies whether cached updates mode is enabled for a dataset. When CachedUpdates is True, then cached updates mode is enabled and posted records are stored in an internal cache until ApplyUpdates of TSDDataSet or TSDDatabase method will be not called.
&&&&&& In cached updates mode records are applied into the database using statements of UpdateObject, OnUpdateRecord or automatically generated statements according to UpdateMode property, when RequestLive is True.
Declaration
property DatabaseName: string
&&&&&& Name of the database component associated with the dataset. This property should match DatabaseName property of the associated database component.
Declaration
property DBSession: TSDSession
&&&&&& Determines the instance of the session component with which this dataset is associated.
Declaration
&&&&&& TUpdateKinds&&&&&& = set of TUpdateKind
property EnableUpdateKinds: TUpdateKinds
&&&&&& Defines what kind updates will be applied. The property is empty when the dataset is closed. Default value, when dataset is opened, is equal [ukModify, ukInsert, ukDelete], i.e. all updates will be applied, when ApplyUpdates method will be called. It is possible to select only some update kind, what is useful for master-detail relationship.
Declaration
property Filter: string
&&&&&& Specifies the text of the current filter for a dataset.
Declaration
property Filtered: Boolean
&&&&&& Specifies whether record filtering is active for a dataset. If Filtered is True, then filtering is active. You need to define Filter property or OnFilterRecord event handler, which define how to filter the records. The following methods allow navigation in the filtered dataset: FindFirst, FindNext, FindPrior, FindLast.
Declaration
property Handle: PSDCursor
&&&&&& Returns a pointer to a cursor on the remote database, which depends on type of the used database server. The Handle property is used to make direct calls to the database server API, which is not normally necessary for client applications.
Database Server
Type of cursor
stSQLServer
TSybConnection
stDB2, stInformix, stODBC
stInterbase, stFirebird
TISC_STMT_HANDLE
TMYSQL_RES
stPostgreSQL
Declaration
&&&TSDDataSetOption = (doKeepSorting, doDetachOnFetchAll, doFetchAllOnOpen);
&&&TSDDataSetOptions= set of TSDDataSetO
property Options: TSDDataSetOptions
&&&&&& Contains dataset options, which affect dataset&s behaviour.
When szFETCHALLONOPEN or szDETACHONFETCHALL database parameters are equal True, it is like that all data sets have &doDetachOnFetchAll or doFetchAllOnOpen options, even if they are not set.
doKeepSorting
To save a sort order after Refresh and insert/modify of the record, when SortRecords was called or the current SQL command has ORDER BY clause
doDetachOnFetchAll
If option is set on, then the dataset releases a server cursor automatically, when all record are fetched: FetchAll method is called or EOF is reached
doFetchAllOnOpen
When the option is turn, then FetchAll is called automatically right after Open
Declaration
property RecNo: LongInt
&&&&&& Indicates ordinal position of the current record in the dataset. When a dataset component is activated, RecNo will be a number between one (1) and the total number of rows (RecordCount) in the result set. Property is writable, i.e. position in the result set will be changed if a new value is assigned to RecNo property.
Declaration
property SessionName: string
&&&&&& Specifies the name of the session with which this dataset is associated. If SessionName property is blank, then a dataset component is associated with the default session (see public variable Session).
&&&&&& A dataset component can be associated with any database component within one session, i.e. SessionName properties of the dataset and the database must be equal.
Declaration
property Sorted: Boolean
&&&&&& Read-only property specifies, whether the result set is sorted using SortRecords method or ORDER BY clause is used in SQL command (doKeepSorting has to be set in the last case).
Declaration
property UniDirectional: Boolean
&&&&&& Determines whether or not bidirectional cursors are enabled for a result set. By default, UniDirectional is False, enabling forward and backward navigation. When the property is set on, the result set requires less memory.
Declaration
property UpdateObject: TSDDataSetUpdateObject
&&&&&& Specifies which update object component will write modified data to the database. Without this component dataset is read-only.
Declaration
property UpdateRecordTypes: TUpdateRecordTypes
TUpdateRecordTypes = set of (rtModified, rtInserted, rtDeleted, rtUnmodified)
&&&&&& Specifies the type of records visible in a dataset. By default, a dataset is created with an UpdateRecordTypes set of [rtModified, rtInserted, rtUnmodified], meaning that all existing, edited, or inserted records are visible to the user.
UpdateRecordTypes Value
rtModified
Modified records are visible
rtInserted
Inserted records are visible
Deleted records are visible
rtUnmodified
Unmodified records are visible
Declaration
property UpdatesPending: Boolean
&&&&&& Indicates whether the cached updates buffer contains data, which have not been transferred to the remote database and committed. If UpdatesPending is False, the cached updates buffer is empty.
Declaration
property OnFilterRecord: TFilterRecordEvent
&&&&&& The event used to determine the visibility of each record in a result set when record filtering is active. The filter handler will be called one time for each record in the set. The handler uses the Accept parameter to determine if the record will be passed to the application. Accept is set to True to indicate that the record is visible, and False for not visible (the record will not be passed to the application). While the client application is processing a filter, the State property of the DataSet is dsFilter.
Declaration
property OnUpdateError: TupdateErrorEvent
TUpdateAction = (uaFail, uaAbort, uaSkip, uaRetry, uaApplied);
TUpdateErrorEvent = procedure(DataSet: TDataS E: EDatabaseE
&&& &&&&&&&&& UpdateKind: TUpdateK var UpdateAction: TUpdateAction)
&&&&&& The event occurs if an exception is generated while cached updates are being applied to a remote database. DataSet is the component whose cached updates are being applied to a database. E is an exception generated during this process. UpdateKind indicates the type of update operation (insert, update or delete). UpdateAction determines the action after exit from the handler. In the entry point of the handler UpdateAction is uaFail. The error handler can use the TField.OldValue and TField.NewValue properties.
UpdateAction value
Abort update operation and displays an error message
Abort update operation and without displaying an error message
Skips updating the record, which raised an exception
Repeats update operation which raised exception
Declaration
property OnUpdateRecord: TUpdateRecordEvent
TUpdateAction = (uaFail, uaAbort, uaSkip, uaRetry, uaApplied);
TUpdateErrorEvent = procedure(DataSet: TDataS E: EDatabaseE
&&& &&&&&&&&& UpdateKind: TUpdateK var UpdateAction: TUpdateAction)
&&&&&& The event occurs when cached updates are applied to a record. Write an OnUpdateRecord event handler to process updates that cannot be handled by a single update component, such as implementation of cascading updates, insertions, or deletions. This handler is also useful for applications that require additional control over parameter substitution in update components. DataSet is the dataset to which updates are applied.
&&&&&& UpdateKind indicates the current action: whether the record is inserted, updated or deleted. This parameter is usable for define, for example, which statement of TSDUpdateSQL need to perform.
&&&&&& UpdateAction defines a success or failure of the update operation.
UpdateAction value
Abort update operation and displays an error message
Abort update operation and without displaying an error message
Skips updating the record, which raised an exception
Repeats update operation which raised exception
The event handler applied the update
The component controls trace messages, which are sent, when some events happens.
Note:&&&& An application can have only one monitor component.
Declaration
property Active: Boolean
&&&&&& Activates monitoring. At design-time this property has no sense, because trace messages are generated only at run-time.
Declaration
property FileName: string
&&&&&& Specifies file, where trace messages will be stored. If FileName is empty, trace messages will be sent to SQLDirect monitor application.
Declaration
TSDTraceOption&&&&&&& = (toConnect, toTransact, toQPrepare, toQExecute, toDataIn, toDataOut);
TSDTraceOptions&&&&&& = set of TSDTraceO
property TraceOptions: TSDTraceOptions
&&&&&& Defines what trace messages will be generated.
The component encapsulates a dataset with result set returned by an SQL-statement. You can use this component to return a result set from a re

我要回帖

更多关于 纳升级液相色谱谁家好 的文章

 

随机推荐