AtvSoftware
Home
Products
About Us
Contact Us
« Return To Products //



Visual FoxPro library Fb_post_event.fll
Description How to Use How to Test

Version: 2.0
Requirements: Firebird Database Server for Windows
File Size: 34 KB
Download License: Free to Try

// Description

The library enables the Firebird POST_EVENT functionality for Visual FoxPro. Visual FoxPro applications can register for events they wish to receive notifications about. When an event occurs, a callback function registered for this event will be called.

The library contains functions:

FB_CONNECT,
FB_STRINGCONNECT,
FB_DISCONNECT,
FB_SUBSCRIBE,
FB_UNSUBSCRIBE.

FB_CONNECT(cServerName, cDatabase, cUserName, cPassword[, nPortNum])
Establishes a connection to a database. Returns a connection handle.

Parameters:
cServerName
- Specifies the name or network address of the host where the FB server is running.

cDatabase
- Specifies the database.

cUserName
- The FB server login account.

cPassword
- The password of the FB server account logging on.

nPortNum
- The port number FB server is listening.

FB_STRINGCONNECT(cConnString)
Establishes a connection to a database through a connection string. Returns a connection handle.

Parameters:
cConnString
- Specifies the data source connection string. See your Firebird ODBC driver connection string.

FB_DISCONNECT(nConnection)
Terminates a connection to a database.

Parameters:
nConnection
- The connection handle to the data source returned by FB_CONNECT().

FB_SUBSCRIBE(nConnection, cEventName, cCallBackFunctionName)
Registers an event.

Parameters:
nConnection
- The connection handle to the data source returned by FB_CONNECT().

cEventName
- Specifies the event. The event name can be a maximum of 64 characters in length.

cCallBackFunctionName
- The parameter can be any Visual FoxPro command or function that will be executed when the specified event occurs. Use keyword to specify where event message must be placed. Example: "? " will output message to active screen. The parameter can be a maximum of 64 characters in length.

FB_UNSUBSCRIBE(nConnection, cEventName)
Unregisters an event.

Parameters:
nConnection
- The connection handle to the data source returned by FB_CONNECT().

cEventName
- Specifies the event. The event name can be a maximum of 64 characters in length.

SET LIBRARY TO FB_POST_EVENT.FLL

nConn = Fb_connect("192.168.0.1",
"c:/Program Files/Firebird/Firebird_2_0/TEST_DATA.fdb", "SYSDBA", "masterkey")

IF ERROR() = 0
Fb_subscribe(nConn, "Test1", "? ")
ENDIF

*
* Execute procedure on FB server that is call POST_EVENT "Test1"
* execute "commit;" statement
* The "Test1" string will output into main VFP screen.
*

Fb_unsubscribe(nConn, "Test1")

SET LIBRARY TO
// Top Products   WinCrypto
  Xp_Pop3
  Xp_smtp
  Xp_adsi
  DB Event Alerter [MS SQL]
  DB Event Alerter [Postgre SQL]
  DB Event Alerter [Firebird]
  DB Event Alerter [MySQL]
  DB Event Alerter [Oracle]
  VFP Post_event Library

Go Back Go Up Go Forward Copyright © AtvSoftware 2025