SybaseDatabase Component
Derived
from Tcomponent
Overview:
This is the
first component required for use with any of the other Sybase database
components. It provides login functionality
along with facilities to set basic login parameters. Events are provided for user supplied error messages, should the
user not want to use the default error messages. (Useful for foreign languages).
A login dialog box will pop up automatically if the component does not
have all the parameters required for a login. (requires username, password and
server name). Password encryption (MD5)
facilities are also provided.
A before login event is provided for users to set any other loginrec parameters they want, such as DBSETLENCRYPT or similar.
Properties
AppName: |
Calls DBSETLAPP. Set the application name in the LOGINREC structure. |
BufferSize: |
Calls dbsetopt(dbproc,DBBUFFER,p,-1) to allocate client side memory for the rows returned from Sybase. |
CancelMessages: |
If true then no runtime error messages will be displayed. Users should then use the relevant events to write their own error messages. |
ClientCharSet: |
Character set which the client application will use. |
Connected: |
Set to true if you want to connect to Sybase. The underlying code will check if you have supplied a username, password and servername. If not then a dialog box will popup to collect this information. |
EncryptPassword: |
Set this to true if you want to use MD5 encryption on the password. |
LoginPrompt: |
Set this to true if you want the dialog box to popup even if you have provided a username, password and servername. |
LoginTimeOut: |
Time in seconds before the login will be aborted if no response has been received from Sybase. |
Name: |
The component Name. |
PacketSize: |
Change your network packet size if you have configured Sybase to allow this. |
Password: |
Login password. |
SQLTimeOut: |
Number of seconds to await a response from Sybase after posting a request. |
Tag: |
User available integer. |
UseDataBase: |
The database to login into, if other than master. |
UserName: |
The user name to login with. |
UserPlus: |
If EncryptPassword is true, then whatever is entered here will be appended to the username before logging in to Sybase. |
UseServerName:
|
The Sybase server to login to. |
OnBeforeLogin |
This event is provided for users to add additional parameters to the loginrec structure called by dbopen. |
OnConnect |
Triggered immediately after a successful login has been achieved. |
OnDisconnect |
Triggered immediately after a disconnection has been called and activated. |
All other events |
Use these to provide alternative error messages and /or handlings to login errors. |
void _fastcall CanQuery() |
Cancels any remaining rows from the previous call. |
AnsiString ServerName |
Holds the name of the Sybase server being used. |
AnsiString
DataBase |
Holds the name of the database being used. |
DBPROCESS *dbproc |
Pointer to the active db process. Used by most other db-library calls. |
__property AnsiString ServerCharSet |
Read-only. Holds the server character set being used by the Sybase server. |
__property AnsiString CharSet |
Read-only. Holds the character set being used by the client. |
__property AnsiString Language |
Read-only. Holds the National Language being used by the Sybase server. |
See also TSybSql, TSybVariable,
TSybArray