About  Usage  ADOxtra  Common  Connection  Recordset  Field  Property

ADOxtra functions:

Basic xtra functions:
Init(),
CreateObject(),
 
Xtra information functions:
Version(),
About(),
 
Date convertion functions:
DateTimeListToFloat(),
FloatToDateTimeList(),
 
Connection string functions:
BuildConnectionString(),

Init()

Syntax

bSuccess=Init(Object me,Integer bDebugMode)

Parameters

me
Reference to the ADOxtra instance: xtra "ADOxtra"
 
bDebugMode
Boolean value that indicates whether to use debug mode or not

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Use this function to initialize COM and set debugging mode. If bDebugMode is set to true, all instances created by this xtra are created with DebugMode property being set to true. So you will see every error right in Message window.

Version()

Syntax

strVersion=Version(Object me)

Parameters

me
Reference to the ADOxtra instance: xtra "ADOxtra"

Returns

String
Version information

Description

Returns the version of ADOxtra as string: "ADOxtra.1.10.000"

About()

Syntax

strAbout=About(Object me)

Parameters

me
Reference to the ADOxtra instance: xtra "ADOxtra"

Returns

String
About information

Description

Returns the string with short information about ADOxtra

CreateObject()

Syntax

objADO=CreateObject(Object me,Symbol type)

Parameters

me
Reference to the ADOxtra instance: xtra "ADOxtra"
 
type
Symbol that defines which object to create.
This parameter may take one of the following symbols:
#Connection, #Recordset

Returns

Object
If operation competed successfully, this function returns reference to the newly created object of the requested type
 
String
If operation failed, this function returns string with error description

Description

Creates ADO objects. Currently supported types are:
 #Connection   "ADODB.Connection" 
 #Recordset   "ADODB.Recordset" 

Example

cnn=CreateObject(xtra"ADOxtra",#Connection)
if stringP(cnn) then put "Error:"&&cnn
rst=CreateObject(xtra"ADOxtra",#Recordset)
if stringP(rst) then put "Error:"&&rst

DateTimeListToFloat()

Syntax

floatDateTime=DateTimeListToFloat(PropertyList dateTimeList)

Parameters

dateTimeList
PropertyList that defines date/time values in form
[#year: 2001, #month: 2, #day: 23, #Hour: 19, #Minute: 42, #Second: 23].

Returns

Float
value that represents specified by dateTimeList date/time value.
 
String
value that indicates that a error occured and convertion cannot be performed. This occures if you specify a date/time value out of the present range.

Description

Converts "human readable" date/time property list to float representation of date/time values which is used in databases. Use this function to assign new value to table fields of date/time type.
The dateTimeList parameter may contain any subset of properties. If empty property list is passed, the current date and time will be returned in float form. If you specify only time part of the list, the current date will be used by default. If time part is missed it is set to midnight by default.

FloatToDateTimeList()

Syntax

put FloatToDateTimeList(float floatDateTime)

Parameters

floatDateTime
float that defines date/time value in float representation.

Returns

PropertyList
value that represents specified by floatDateTime date/time in "human readable" form:
[#year: 2001, #month: 2, #day: 23, #DayOfWeek: 5, #Hour: 19, #Minute: 42, #Second: 23]
 
String
value that indicates that a error occured and convertion cannot be performed. This occures if you specify a date/time value out of the present range (big positive or big negative).

Description

Converts float representation of date/time value into the "human readable" date/time property list. Use this function to convert values of table fields of date/time type.

BuildConnectionString()

Syntax

strConnectionString=BuildConnectionString(Object me)

Parameters

me
Reference to the ADOxtra instance: xtra "ADOxtra"

Returns

String
with connection parameters.

Description

Invokes the dialog box for choosing data source and other properties. Returns the string with connection information, that may be used as connectionString while opening Connection object or Recordset object.

©2001 Eugene Shoustrov www.adoxtra.com Built on March 28, 2001