Object LibMyWitch ActiveX ControlThis is the main ActiveX object and the starting point to get access to all other objects and interfaces available in this product.
About methodmethod LibMyWitchOcx.About() This method shows About box window that provides basic information about the component.AddSlashes methodmethod LibMyWitchOcx.AddSlashes(sText) Quotes a string
Authentification propertyproperty LibMyWitchOcx.Authentification As boolean Use authentification for connecting to restricted web resource
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 propertyproperty LibMyWitchOcx.AuthPassword As string Authentification password for connecting to restricted web 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 propertyproperty LibMyWitchOcx.AuthUserName As string Authentification username for connecting to restricted web 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 propertyproperty LibMyWitchOcx.BlowfishEncryption As mw_EncryptionEnum Encypt datatransfere
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 propertyproperty LibMyWitchOcx.BlowfishPassword As string Encrypt data-transfer (via PHP-script)
CloseConnection methodmethod LibMyWitchOcx.CloseConnection() Close database connection if openedConnectionType propertyproperty LibMyWitchOcx.ConnectionType As mw_ConnectionEnum Connect to MySQL server via PHP-Script or via MySQL API library 'libmysql.dll'
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 propertyCreateMainScript methodmethod 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
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 methodmethod LibMyWitchOcx.Connect (lgRow, lgColumn, sValue, sSql) As LibMyWitchOcx.mw_ErrorEnum To update the current dataset, create automaticaly an UPDATE SQL query.
If the query is correcly created you get back as an result a function value "mw_Error_NoError" Execute methodmethod LibMyWitchOcx.Execute (QueryString, AffectedRows) As LibMyWitchOcx.MyWitch_Recordset Execute any SQL statements.
GetInformation methodmethod LibMyWitchOcx.GetInformation (tInformation, sInformation, Optional PHPInfo_Section, Optional PHPInfo_Field) Get Informations about configuration.
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 propertyproperty LibMyWitchOcx.GZipUse As boolean Compress data for transfere between client and server
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 propertyproperty LibMyWitchOcx.LicenceKey As string Set serialnumber / key
MCryptVersion propertyproperty LibMyWitchOcx.MCryptVersion As mw_mCryptVersionEnum Set the encryption version on 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 propertyproperty LibMyWitchOcx.MySQLDatabase As string Restrict access to MySQL server to a single 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 propertyproperty LibMyWitchOcx.MySQLPassword As string MySQL password of the database server.
MySQLPort propertyproperty LibMyWitchOcx.MySQLPort As string MySQL Port of the database server.
MySQLServer propertyproperty LibMyWitchOcx.MySQLServer As string IP or servername of the MySQL server
MySQLUsername propertyproperty LibMyWitchOcx.MySQLUsername As string MySQL Username to acces the database server.
(You need this property only, if you access the MySQL database directly via the MySQL API DLL *libmysql.dll*) ProxyPassword propertyproperty LibMyWitchOcx.ProxyPassword As string Password for remote proxy
ProxyPort propertyproperty LibMyWitchOcx.ProxyPort As long Port on remote proxy.
ProxyServer propertyproperty LibMyWitchOcx.ProxyServer As string Hostname of remote proxy.
ProxyUse propertyproperty LibMyWitchOcx.ProxyUse As boolean Enable access via proxyserver
ProxyUsername propertyproperty LibMyWitchOcx.ProxyUsername As string Login/Username for remote proxy.
Recordset propertyproperty LibMyWitchOcx.Recordset As MyWitch_Recordset Get Recordset (read only).
SelectDatabase propertyproperty LibMyWitchOcx.SelectDatabase As string Set or Get the current database for this server connection.
See also MySQLDatabase property State propertyproperty LibMyWitchOcx.State As mw_StatesEnum Current state of LibMyWitch component.
StateString methodmethod LibMyWitchOcx.StateString(State) Current state of LibMyWitch component.
TempPath propertyproperty LibMyWitchOcx.TempPath As string Temporary folder
UrlScript propertyproperty LibMyWitchOcx.UrlScript As string URL of the PHP-script on your webserver.
The script has to be uploaded on your webserver. The URL of the script on the webserver has to be always set.UseBackticks propertyproperty LibMyWitchOcx.UseBackticks As boolean Use backticks within SQL statements
The way around this is to place backticks (`name`) around the table name and relevant column names, for example: CREATE TABLE `group` ( (Only for MySQL Version >3.22.6) Versionproperty LibMyWitchOcx.Version As string Holds version information of LibMyWitch control
VersionScriptproperty LibMyWitchOcx.VersionScript As string Holds version information of LibMyWitch PHP-script
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. |