10.03.2010 @ 03:46


» Home «
spacerspacerspacer
spacerspacerspacerspacer
spacerspacerspacer
» DumpTimer for MySQL «
spacer MySQL DBs sichern und kopieren
» Remote DB Editor for MYSQL «
spacer MySQL DBs editieren und sichern
» ActiveSQLX for MySQL «
spacer eigene MySQL Programme entwickeln
»Download «
spacer Software laden
spacer spacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacerspacer
spacerspacerspacer
»Software bestellen«
»Partnerprogramm«
spacer spacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacerspacer
spacerspacerspacer
» FAQ «
» Testschlüssel «
spacer spacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacer
spacerspacerspacerspacer
spacerspacerspacer
» Kontakt «
» Partner Links «
spacer spacer
spacerspacerspacer
spacerspacerspacer
LibMyWitch: LibMyWitch Objects Druckversion
»Object LibMyWitch«»LibMyWitch Events«»LibMyWitch Recordset Object«
»LibMyWitch Fields Object«»LibMyWitch Field Object«

 
  

Object LibMyWitch ActiveX Control

This is the main ActiveX object and the starting point to get access to all other objects and interfaces available in this product.

About method

method LibMyWitchOcx.About()

This method shows About box window that provides basic information about the component.

AddSlashes method

method LibMyWitchOcx.AddSlashes(sText)

Quotes a string

Type Description
sText As String String, which should be quoted


Return Description
String Quoted string
Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte).

Authentification property

property LibMyWitchOcx.Authentification As boolean

Use authentification for connecting to restricted web resource

Type Description
Boolean Turn on authentification with web server

Authentication property determines if LibMyWitch should authenticate with the web server to access protected resource. In most cases this is not needed, but sometimes access to restricted areas may be needed.

AuthPassword property

property LibMyWitchOcx.AuthPassword As string

Authentification password for connecting to restricted web resource.

Type Description
String String expression that represents your password to access the resource.

Password property (together with Login property) specifies your credentials to supply to the server when protected resource need to be accessed. It is used only when Authentication property is set.

AuthUsername property

property LibMyWitchOcx.AuthUserName As string

Authentification username for connecting to restricted web resource

Type Description
String String expression that represents your login (or username) to access the resource.

Login property (together with Password property) specifies your credentials to supply to the server when protected resource need to be accessed. It is used only when Authentication property is set not set to AuthNone.

BlowfishEncryption property

property LibMyWitchOcx.BlowfishEncryption As mw_EncryptionEnum

Encypt datatransfere

Type Description
mw_EncryptionEnum Constant value htat determines encryption mode
To protect transfered data, it is possible to encrypt it. It is necessary that the *mCrypt* library is instaled on the webserver.

To check if these libraries a instaled, you can use the GetInformation method

Another way to protect the data is to use SSL encryption by accessing the webserver via 'https://...'


BlowfishPassword property

property LibMyWitchOcx.BlowfishPassword As string

Encrypt data-transfer (via PHP-script)

Type Description
String Password for encryption (4-54) characters
Encypt data with password (4-54 charcaters).

CloseConnection method

method LibMyWitchOcx.CloseConnection()

Close database connection if opened

ConnectionType property

property LibMyWitchOcx.ConnectionType As mw_ConnectionEnum

Connect to MySQL server via PHP-Script or via MySQL API library 'libmysql.dll'

Type Description
mw_ConnectionEnum Constant value that determines the connection mode
If the MySQL server is hostet on a webserver behind firewall it is not possile to access the database directly. In this case a special PHP-script has to be created and uploaded on the webserver.

If the MySQL server is loacted in a LAN it is possible ti access the database directly via the MySQL API library *libmysql.dll*.

To set the type of connection use this property

CreateMainScript method

method LibMyWitchOcx.CreateMainScript (optional sMySQLServer,optional sMySQLDatabase,optional sMySQLUsername,optional sMySQLPassword,optional lgMySQLPort,optional bBackTicks,optional bCompressData,optional sBlowfishKey,optional mCryptVersion,optional sSaveToPhpFile)

Create a special PHP script to access MySQL databases on webserver

Type Description
sMySQLServer As String MySQL server hostname (default: localhost)
sMySQLDatabase as String Restrict access to a database
sMySQLUsername as String MySQL username
sMySQLPassword as String MySQL password
lgMySQLPort as long MySQL Port (deafult: 3306)
bBackTicks as boolean Use backticks within SQL statements (default: true)
bCompressData as boolean Compress data transfer (default: false)
sBlowfishKey as boolean Key for encryption
EncryptType as mw_EncryptionEnum Encyption type (default: mw_NoEncryption)
mCryptVersion as boolean Constant value that determines encryption version which is installed on the server (default mw_Version24)
sSaveToPhpFile as String Path and Filename of the PHP script
To access the MySQL database on the webserver, a special PHP script has to be creted and uploaded.

The creation of the script is depending on the configuration of your server and your client.

To check which values should be set to create the PHP-main-script you can call this method once without any parameters. A PHP-test-script will be created. Upload this and use the GetInformation method to check the configuration.

Then call the CreateMainScript a second time with the necessary values.

Have also a look at the example Create PHP-script .


CreateUPDATEQuery method

method LibMyWitchOcx.Connect (lgRow, lgColumn, sValue, sSql) As LibMyWitchOcx.mw_ErrorEnum

To update the current dataset, create automaticaly an UPDATE SQL query.

Type Description
lgRow As Long Recordset of dataset which should be updated
lgColumn As Long Column of the recordset which should be updated
sValue As String New Value you want to set
sSql As String Created UPDATE - SQL string will be returned


Return Description
Error code Value will be set to mw_Error_NoError=0 if no error raised


Set the row, the column and the value of the dataset which you want to update.
If the query is correcly created you get back as an result a function value "mw_Error_NoError"

Execute method

method LibMyWitchOcx.Execute (QueryString, AffectedRows) As LibMyWitchOcx.MyWitch_Recordset

Execute any SQL statements.

Type Description
QueryString As String SQL query, which should be executed
AffectedRows As Long The number of rows affected by the last SQL statement to be executed.


Return Description
MyWitch_Recordset Dataset containing records of SELECT query

GetInformation method

method LibMyWitchOcx.GetInformation (tInformation, sInformation, Optional PHPInfo_Section, Optional PHPInfo_Field)

Get Informations about configuration.

Type Description
tInformation As mw_InformationEnum Type of information
sInformation As String Return string with requested information or error description
PHPInfo_Section As String If tInformation=mw_PHP_Info_Information, this value sets then section of the PHP-Info file
PHPInfo_Field As String If tInformation=mw_PHP_Info_Information, this value sets then field of the PHP-Info file


Return Description
boolean Returns boolean if inforamtion is avialable
To configure the PHP-script correctly, which is necessary to access the database, some informations about the MySQL database and the PHP installation can be called.

If tInformation is set to 'mw_PHP_Info_Information' inforamtions cann be directly called from the PHP-Info file. This file can be called from the webserver and contains all informations about the PHP configuration and the installed components. With the additional values of PHPInfo_Section and PHPInfo_Field the most values can be called from this file.

To see more details have a look at the definition of mw_InformationEnum


GZipUse property

property LibMyWitchOcx.GZipUse As boolean

Compress data for transfere between client and server

Type Description
Boolean Turn on/off compression of data
Set this property if you want to compress (gzip) the transfere.

To use this property the free library *zLib.dll* has to be installed on the client and on the server.

To check if these libraries a instaled, you can use the GetInformation method


LicenceKey property

property LibMyWitchOcx.LicenceKey  As string

Set serialnumber / key

Type Description
string String expression that specifies licencekey when you bought the product
You have to set the  registered release code directly within the control property. It don't work, if you set this code within the source code.

MCryptVersion property

property LibMyWitchOcx.MCryptVersion As mw_mCryptVersionEnum

Set the encryption version on server

Type Description
mw_mCryptVersionEnum Constant value that determines encryption version which is installed on the server
If the data transfere should be encrypted it is necessary to get the correct encryption version, which is installed on the server.

According to the mCrypt version the PHP script have to use different functions.

To check if the version, you can use the GetInformation method


MySQLDatabase property

property LibMyWitchOcx.MySQLDatabase As string

Restrict access to MySQL server to a single database

Type Description
String String expression that represents the database

The are two ways to set the database you want to use. With this MySQLDatabase property you restrict the access to only one database. If you don't set this property you have to set the SelectDatabase property  before executing a SQL statement.

(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*)


MySQLPassword property

property LibMyWitchOcx.MySQLPassword  As string

MySQL password of the database server.

Type Description
String Set or Get the password
(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*)

MySQLPort property

property LibMyWitchOcx.MySQLPort  As string

MySQL Port of the database server.

Type Description
String Set or Get the port
(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*)

MySQLServer property

property LibMyWitchOcx.MySQLServer  As string

IP or servername of the MySQL server

Type Description
String Set or Get the host-/servername
(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*)

MySQLUsername property

property LibMyWitchOcx.MySQLUsername  As string

MySQL Username to acces the database server.

Type Description
String Set or Get the username


(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*)


ProxyPassword property

property LibMyWitchOcx.ProxyPassword As string

Password for remote proxy

Type Description
string A string expression that specifies the password to use when connecting to a proxy server.

ProxyPort property

property LibMyWitchOcx.ProxyPort As long

Port on remote proxy.

Type Description
long Long integer value that specifies the port number of a remote proxy server.
When connection to a remote server is requested through a proxy server, this property specifies the proxy's port number for connection purposes. The usual value for web proxies is 80, or sometimes even 8000, or 8080.

ProxyServer property

property LibMyWitchOcx.ProxyServer As string

Hostname of remote proxy.

Type Description
string String expression that specifies the hostname of the proxy to use when connecting to a server.
When the LibMyWitch control clinet is unable to establish a direct connection (not connected directly to the internet, for example), the proxy option can be used.  When any proxy is used, this property specifies the hostname for the remote proxy.

ProxyUse property

property LibMyWitchOcx.ProxyUse As boolean

Enable access via proxyserver

Type Description
Boolean Turn on/off proxy authentification

ProxyUsername property

property LibMyWitchOcx.ProxyUsername As string

Login/Username for remote proxy.

Type Description
string String expression that specifies the hostname of the proxy to use when connecting to a server.
This property specifies the Login (username) to use when connecting to a remote server through a proxy server. Since some proxy servers require authorization for access, ProxyLogin and ProxyPassword properties enable the user to specify his logon name and password on the proxy server.

Recordset property

property LibMyWitchOcx.Recordset  As MyWitch_Recordset

Get Recordset (read only).

Type Description
MyWitch_Recordset Reference to the actual recordset

SelectDatabase property

property LibMyWitchOcx.SelectDatabase As string

Set or Get the current database for this server connection.

Type Description
String String expression that represents the current database
The currently selected database, setting this property will cause a "USE Database" on this database server.

See also MySQLDatabase property


State property

property LibMyWitchOcx.State As mw_StatesEnum

Current state of LibMyWitch component.

Type Description
mw_StatesEnum Constant value that holds current state.
This property may take on many values while executing commands. Depending on this value, the user is able to monitor the current action that LibMyWitch is performing.

StateString method

method LibMyWitchOcx.StateString(State)

Current state of LibMyWitch component.

Type Description
State As mw_StatesEnum Constant value that represent state number


Return Description
String String expression that holds text description of the state.
This property returns a string expression that tells the current state of the control, or any state indexed by State argument.

TempPath property

property LibMyWitchOcx.TempPath As string

Temporary folder

Type Description
string String expression that specifies folder where LibMyWitch store temporary files
If this property is not the set the Windows Temp folder will be used

UrlScript property

property LibMyWitchOcx.UrlScript As string

 URL of the PHP-script on your webserver.

Type Description
string String expression that specifies the Url of the uploaded PHP script
If the MySQL database is hosted on a webserver behind a firewall, all database queries will be encapsulated throuh a PHP-script which will be created by the LibMyWitch Control.

The script has to be uploaded on your webserver.

The URL of the script on the webserver has to be always set.

UseBackticks property

property LibMyWitchOcx.UseBackticks As boolean

Use backticks within SQL statements

Type Description
boolean Enable quoting table and column names.
A common problem stems from trying to create a table with column names that use the names of datatypes or functions built into MySQL, such as TIMESTAMP or GROUP.

The way around this is to place backticks (`name`) around the table name and relevant column names, for example:


CREATE TABLE `group` (
ID CHAR(13) NOT NULL,
createdByID CHAR(13) NOT NULL,
`read` CHAR(1) NULL,
PRIMARY KEY (ID)
)

(Only for MySQL Version >3.22.6)


Version

property LibMyWitchOcx.Version As string

Holds version information of LibMyWitch control

Type Description
string Value that holds version information for the component.
This is readonly property where you can find out version number of your instance of LibMyWitch.ocx

VersionScript

property LibMyWitchOcx.VersionScript As string

Holds version information of LibMyWitch PHP-script

Type Description
string Value that holds version and date information for the components PHP-script.
This is readonly property where you can find out version number of your instance of the PHP-script - created with this LibMyWitch Control.
Every LibMyWitch control correspond with a special PHP-script.
To avoid to get in troube with different versions, the name of the created PHP-script should always contain this version number.

»Object LibMyWitch«»LibMyWitch Events«»LibMyWitch Recordset Object«
»LibMyWitch Fields Object«»LibMyWitch Field Object«




von judgy zuletzt geändert am 01.03.2004


Copyright 2003/2004 - http://www.richtsoft.com - Dirk Richter (info(@)richtsoft.com)
Disclaimer