1010data VBA SDK
 All Data Structures Files Functions Variables
Data Structures | Functions | Variables
vbasdk1010.h File Reference

1010data VBA Software Development Kit by 1010data, Inc. More...

Data Structures

Public Type  TentenTabDir
 Table or Directory info. More...
 
Public Type  TentenColumn
 Column Info. More...
 
Public Type  TentenProgress
 Progress info about the query currently running on 1010data. More...
 

Functions

Public Sub TentenInit ()
 Initializes the SDK Run this once at the start of any script that uses the SDK.
 
Public Sub TentenTearDown ()
 Tears down the SDK Frees all the objects created through use of the SDK.
 
Public Function TentenSDKVersion () As Double
 Get the version number of this SDK.
 
Public Function TentenLatestVersion (ByVal location As String) As Long
 Check the 1010data website for the date of the latest released version.
 
Public Sub TentenSetUserAgent (ByVal useragent As String)
 Set the useragent string.
 
Public Sub TentenGetUserAgent (ByRef useragent As String)
 Get the useragent string.
 
Public Sub TentenSetAPIVersion (ByVal apiversion As String)
 Specify API version.
 
Public Sub TentenGetAPIVersion (ByRef apiversion As String)
 Get the API version.
 
Public Function TentenNewHandle () As Long
 Allocates a new 1010 session handle.
 
Public Sub TentenFreeHandle (ByVal ttsid As Long)
 Frees client-side resources associated with a 1010 session handle.
 
Public Function TentenEnableLog (ByVal ttsid As Long, ByVal filename As String, ByVal append As Boolean) As Long
 Opens a file which will have the session's API transactions recorded into.
 
Public Function TentenDisableLog (ByVal ttsid As Long) As Long
 Disables logging on a session, and closes the file opened by TentenEnableLog.
 
Public Sub TentenGetSessionCredentials (ByVal ttsid As Long, ByRef sid As String, ByRef epw As String)
 Returns the session credentials associated with an active 1010 session handle.
 
Public Sub TentenSetHandleUserAgent (ByVal ttsid As Long, ByVal useragent As String)
 Sets the HTTP useragent string for a 1010 session handle.
 
Public Sub TentenGetHandleUserAgent (ByVal ttsid As Long, ByRef useragent As String)
 Gets the User-Agent string used for http requests on a session handle.
 
Public Sub TentenSetHandleAPIVersion (ByVal ttsid As Long, ByVal apiversion As String)
 Changes the API version to use for a 1010 session handle.
 
Public Sub TentenGetHandleAPIVersion (ByVal ttsid As Long, ByRef apiversion As String)
 Gets the API version used by a session handle.
 
Public Function TentenSetExpBackoff (ByVal ttsid As Long, ByVal retryMax As Long, ByVal retryTimeMin As Long, ByVal retryTimeRange As Long, ByVal retryBase As Double) As Long
 Changes the retry parameters for a session handle.
 
Public Sub TentenGetExpBackoff (ByVal ttsid As Long, ByRef retryMax As Long, ByRef retryTimeMin As Long, ByRef retryTimeRange As Long, ByRef retryBase As Double)
 Gets the retry parameters for a session handle.
 
Public Function TentenSetTimeout (ByVal ttsid As Long, ByVal connectTimeout As Long, ByVal timeout As Long) As Long
 Changes the timeout parameters.
 
Public Sub TentenGetTimeout (ByVal ttsid As Long, ByRef connectTimeout As Long, ByRef timeout As Long)
 Gets the timeout parameters for a session handle.
 
Public Sub TentenSetLenient (ByVal ttsid As Long, ByVal lenient As Long)
 Sets lenient value.
 
Public Function TentenRC (ByVal ttsid As Long) As Long
 Get the return code from the previous transaction executed on a session handle.
 
Public Sub TentenMsg (ByVal ttsid As Long, ByRef msg As String)
 Get the message from the previous transaction executed on a session handle.
 
Public Sub TentenSystemVersion (ByVal ttsid As Long, ByRef sysver As String)
 Gets the version of 1010data that is running on a session.
 
Public Function TentenLogin (ByVal ttsid As Long, ByVal url As String, ByVal user As String, ByVal password As String, ByVal killp As Long) As Long
 Log a tenten session handle into 1010data.
 
Public Function TentenLoginThread (ByVal ttsid As Long, ByVal url As String, ByVal user As String, ByVal password As String, ByVal killp As Long) As Long
 Log a tenten session handle into 1010data in a spawned thread.
 
Public Function TentenCheckThread (ByVal ttsid As Long, ByRef rc As Long) As Long
 Checks if a threaded transaction is still active or has completed.
 
Public Function TentenGetUID (ByVal ttsid As Long, ByVal url As String, ByVal owner As String, ByVal group As String, ByVal password As String) As Long
 Request a free User ID from a group.
 
Public Function TentenGetUIDThread (ByVal ttsid As Long, ByVal url As String, ByVal owner As String, ByVal group As String, ByVal password As String) As Long
 Request a free User ID from a group in a spawned thread.
 
Public Function TentenLoginUID (ByVal ttsid As Long, ByVal password As String, ByVal killp As Long) As Long
 Log a Group User ID into 1010data.
 
Public Function TentenLoginUIDThread (ByVal ttsid As Long, ByVal password As String, ByVal killp As Long) As Long
 Log a Group User ID into 1010data in a spawned thread.
 
Public Function TentenLogout (ByVal ttsid As Long) As Long
 Close a connection to 1010data.
 
Public Function TentenLogoutThread (ByVal ttsid As Long) As Long
 Close a connection to 1010data in a spawned thread.
 
Public Function TentenReleaseUID (ByVal ttsid As Long) As Long
 Release a User ID.
 
Public Function TentenReleaseUIDThread (ByVal ttsid As Long) As Long
 Release a User ID in a spawned thread.
 
Public Function TentenDuplicateSession (ByVal ttsid As Long, ByVal url As String, ByVal user As String, ByVal sid As String, ByVal epw As String) As Long
 Constructs a tenten session handle to represent a connection established in the past.
 
Public Function TentenDuplicateSessionThread (ByVal ttsid As Long, ByVal url As String, ByVal user As String, ByVal sid As String, ByVal epw As String) As Long
 Constructs a tenten session handle to represent a connection established in the past in a spawned thread.
 
Public Function TentenClearCache (ByVal ttsid As Long) As Long
 Clears server side cache.
 
Public Function TentenClearCacheThread (ByVal ttsid As Long) As Long
 Clears server side cache in a spawned thread.
 
Public Function TentenCurrMem (ByVal ttsid As Long) As Double
 Get memory allocated to workspace.
 
Public Function TentenNewQuery () As Long
 Allocates a new query handle.
 
Public Sub TentenFreeQuery (ByVal qid As Long)
 Frees a query handle allocated by TentenNewHandle and any associated memory for the handle (e.g.
 
Public Sub TentenSetTable (ByVal qid As Long, ByVal tablepath As String)
 Sets the table path associated with a query id.
 
Public Sub TentenSetOps (ByVal qid As Long, ByRef ops As Variant)
 Sets the 1010 query operations associated with a query id.
 
Public Function TentenExecuteQuery (ByVal ttsid As Long, ByVal qid As Long) As Long
 Executes a query transaction.
 
Public Function TentenNumCols (ByVal qid As Long) As Long
 Gets the number of columns in a query's result set.
 
Public Function TentenNumRows (ByVal qid As Long) As Double
 Gets the number of rows in a query's result set.
 
Public Function TentenGetColumnInfo (ByVal qid As Long, ByRef colinfo() As TentenColumn) As Long
 Gets information about the columns in a query's result.
 
Public Function TentenExecuteQueryThread (ByVal ttsid As Long, ByVal qid As Long) As Long
 Executes a query transaction in a spawned thread.
 
Public Function TentenCheckProgress (ByVal ttsid As Long, ByRef progress As TentenProgress, ByVal logxml As Boolean) As Long
 Check on the progress of the currently running query.
 
Public Function TentenStop (ByVal ttsid As Long) As Long
 Sends a 'stop' transaction on a session handle.
 
Public Function TentenGetRows (ByVal ttsid As Long, ByVal qid As Long, ByVal compression As Boolean, ByRef colnames As Variant, ByVal firstrow As Double, ByVal nrowstoget As Long, ByRef nrowsgotten As Long) As Long
 Executes a getdata transaction on a session current result set.
 
Public Function TentenGetColumnData (ByVal qid As Long, ByVal colname As String, ByRef var As Variant, ByVal flags As Long) As Long
 Pulls downloaded data of a column into a VBA Array.
 
Public Function TentenGetRowsThread (ByVal ttsid As Long, ByVal qid As Long, ByVal compression As Boolean, ByRef colnames As Variant, ByVal firstrow As Double, ByVal nrowstoget As Long) As Long
 Executes a getdata transaction on a session current result set in a spawned thread.
 
Public Function TentenNumRowsGotten (ByVal qid As Long, ByVal colname As String) As Long
 Gets the number of rows downloaded for a given column of a query.
 
Public Function TentenUploadXMLTable (ByVal ttsid As Long, ByVal tablename As String, ByRef xml As Variant) As Long
 Uploads an XML table to a 1010data table.
 
Public Function TentenUploadXMLTableThread (ByVal ttsid As Long, ByVal tablename As String, ByRef xml As Variant) As Long
 Uploads an XML table to a 1010data table in a spawned thread.
 
Public Function TentenSaveToFTP (ByVal ttsid As Long, ByVal filename As String, ByVal namesp As Boolean, ByVal headersp As Boolean, ByVal sep As String, ByVal linesep As String) As Long
 Save a query to the FTP server.
 
Public Function TentenSaveToFTPThread (ByVal ttsid As Long, ByVal filename As String, ByVal namesp As Boolean, ByVal headersp As Boolean, ByVal sep As String, ByVal linesep As String) As Long
 Save a query to the FTP server in a spawned thread.
 
Public Function TentenSaveTable (ByVal ttsid As Long, ByRef table As TentenTabDir, ByVal replacep As Boolean, ByVal appendp As Boolean, ByVal appendablep As Boolean, ByVal temporaryp As Boolean, ByRef permissions As Variant) As Long
 Create, replace or append to a table.
 
Public Function TentenSaveTableThread (ByVal ttsid As Long, ByRef table As TentenTabDir, ByVal replacep As Boolean, ByVal appendp As Boolean, ByVal appendablep As Boolean, ByVal temporaryp As Boolean, ByRef permissions As Variant) As Long
 Create, replace or append to a table in a spawned thread.
 
Public Function TentenMergeTables (ByVal ttsid As Long, ByRef tablenames() As String, ByRef table As TentenTabDir, ByVal replacep As Boolean, ByRef permissions As Variant) As Long
 Merge a list of tables.
 
Public Function TentenMergeTablesThread (ByVal ttsid As Long, ByRef tablenames() As String, ByRef table As TentenTabDir, ByVal replacep As Boolean, ByRef permissions As Variant) As Long
 Merge a list of tables in a spawned thread.
 
Public Function TentenMoveTable (ByVal ttsid As Long, ByVal oldpath As String, ByVal newpath As String) As Long
 Moves a table.
 
Public Function TentenMoveTableThread (ByVal ttsid As Long, ByVal oldpath As String, ByVal newpath As String) As Long
 Moves a table in a spawned thread.
 
Public Function TentenDropTable (ByVal ttsid As Long, ByVal tablename As String) As Long
 Delete a table.
 
Public Function TentenDropTableThread (ByVal ttsid As Long, ByVal tablename As String) As Long
 Delete a table in a spawned thread.
 
Public Function TentenUpdateObject (ByVal ttsid As Long, ByVal pathname As String) As Long
 Refresh this session's view of a table or folder.
 
Public Function TentenUpdateObjectThread (ByVal ttsid As Long, ByVal pathname As String) As Long
 Refresh this session's view of a table or folder in a spawned thread.
 
Public Function TentenModifyTable (ByVal ttsid As Long, ByRef table As TentenTabDir, ByVal flags As Long, ByRef permissions As Variant) As Long
 Modifies table metadata and permissions.
 
Public Function TentenModifyTableThread (ByVal ttsid As Long, ByRef table As TentenTabDir, ByVal flags As Long, ByRef permissions As Variant) As Long
 Modifies table metadata and permissions in a spawned thread.
 
Public Function TentenGetTableInfo (ByVal ttsid As Long, ByVal tablename As String, ByRef table As TentenTabDir, ByRef colinfo() As TentenColumn) As Long
 Retrieves basic info about a table and its columns.
 
Public Function TentenGetTableInfoThread (ByVal ttsid As Long, ByVal tablename As String) As Long
 Retrieves basic info about a table and its columns in spawned thread.
 
Public Function TentenGetTableMetaInfo (ByVal ttsid As Long, ByVal tablename As String, ByRef table As TentenTabDir) As Long
 Retrieves meta info about a table.
 
Public Function TentenGetTableMetaInfoThread (ByVal ttsid As Long, ByVal tablename As String) As Long
 Retrieves meta info about a table in a spawned thread.
 
Public Function TentenGetDirectory (ByVal ttsid As Long, ByVal dirname As String, ByVal descendants As Boolean, ByRef dir As TentenTabDir, ByRef parents() As TentenTabDir, ByRef children() As TentenTabDir) As Long
 Retrieves meta info about a directory.
 
Public Function TentenGetDirectoryThread (ByVal ttsid As Long, ByVal dirname As String, ByVal descendants As Boolean) As Long
 Retrieves meta info about a directory in a spawned thread.
 
Public Function TentenModifyDirectory (ByVal ttsid As Long, ByRef dir As TentenTabDir, ByVal flags As Long, ByRef users As Variant, ByRef uploaders As Variant) As Long
 Modifies directory metadata and its users/uploaders permissions.
 
Public Function TentenModifyDirectoryThread (ByVal ttsid As Long, ByRef dir As TentenTabDir, ByVal flags As Long, ByRef users As Variant, ByRef uploaders As Variant) As Long
 Modifies directory metadata and its users/uploaders permissions in a spawned thread.
 
Public Function TentenMakeDirectory (ByVal ttsid As Long, ByRef dir As TentenTabDir, ByVal flags As Long, ByRef users As Variant, ByRef uploaders As Variant) As Long
 Makes a new directory.
 
Public Function TentenMakeDirectoryThread (ByVal ttsid As Long, ByRef dir As TentenTabDir, ByVal flags As Long, ByRef users As Variant, ByRef uploaders As Variant) As Long
 Makes a new directory in a spawned thread.
 
Public Function TentenGetQueryOps (ByVal ttsid As Long, ByVal pathname As String, ByRef base As String, ByRef ops As String) As Long
 Get the basetable and query ops of a quick query.
 
Public Function TentenGetQueryOpsThread (ByVal ttsid As Long, ByVal pathname As String) As Long
 Get the basetable and query ops of a quick query.
 
Public Function TentenConvertSpec (ByVal ttsid As Long, ByVal filename As String, ByRef spec As String) As Long
 Converts a legacy PowerLoader spec file located in the user's 1010data FTP account into an XML spec, which can be used with TentenAddTable.
 
Public Function TentenConvertSpecThread (ByVal ttsid As Long, ByVal filename As String) As Long
 Converts a legacy PowerLoader spec file located in the user's 1010data FTP account into an XML spec, which can be used with TentenAddTable You need to call TentenCheckThread to check that the thread is finsihed.
 
Public Function TentenValidateSpec (ByVal ttsid As Long, ByVal spec As String) As Long
 Validates an XML spec that can be used to laod data from a user's FTP accoutn via TentenAddTable.
 
Public Function TentenValidateSpecThread (ByVal ttsid As Long, ByVal spec As String) As Long
 Validates an XML spec that can be used to laod data from a user's FTP accoutn via TentenAddTable You need to call TentenCheckThread to check that the thread is finsihed.
 
Public Function TentenAddTable (ByVal ttsid As Long, ByVal spec As String, ByRef pathname As String) As Long
 Loads a table into 1010data from the user's 1010data FTP account.
 
Public Function TentenAddTableThread (ByVal ttsid As Long, ByVal spec As String) As Long
 Loads a table into 1010data from the user's 1010data FTP account.
 
Public Function TentenAddTableAsync (ByVal ttsid As Long, ByVal spec As String, ByRef pathname As String) As Long
 Initiates loading a table into 1010data from the user's 1010data FTP account like TentenAddTable, except this function returns when the load has started instead of when it has finished.
 
Public Function TentenAddTableStatus (ByVal ttsid As Long, ByRef status As Long, ByRef numrecs As Double, ByRef totrecs As Double) As Long
 Checks the status of a table load started with TentenAddTableThread.
 

Variables

Public Const TENTEN_THREAD_RESULTS As String
 Specifies that you want to retrieve the data from the previous *Thread transaction executed.
 
Public Const TENTEN_ERROR_OUT_OF_MEMORY As Long
 Memory allocation failed.
 
Public Const TENTEN_ERROR_INVALID_HANDLE As Long
 Handle parameter is invalid.
 
Public Const TENTEN_ERROR_INVALID_QUERY As Long
 Query parameter is invalid.
 
Public Const TENTEN_ERROR_INVALID_ARGS As Long
 Some function argument is invalid.
 
Public Const TENTEN_ERROR_NOT_FOUND As Long
 A column name is not found in the results set of a query.
 
Public Const TENTEN_ERROR_UNSUPPORTED_TYPE As Long
 The column requested has a datatype that's not supported by the SDK.
 
Public Const TENTEN_ERROR_NO_RESULTS As Long
 There are no results to retrieve from the last THREADED transaction.
 
Public Const TENTEN_ERROR_INVALID_DATA As Long
 The data requested contains invalid values.
 
Public Const TENTEN_ERROR_THREAD_RUNNING As Long
 A Thread is already running with this handle.
 
Public Const TENTEN_ERROR_THREAD_CREATE As Long
 A system error occurred attempting to create a new thread.
 
Public Const TENTEN_ERROR_ARRAY_CREATE As Long
 An error occurred creating an array to return data in.
 
Public Const TENTEN_ERROR_ARRAY_ACCESS As Long
 An error occurred accessing an array passed to the SDK.
 
Public Const TENTEN_ERROR_ARRAY_REDIM As Long
 An error occurred re-dimensioning an array passed to the SDK.
 
Public Const TENTEN_KILL As Long
 Login kills previous session.
 
Public Const TENTEN_NO_KILL As Long
 Login fails if a session already exists.
 
Public Const TENTEN_POSSESS As Long
 Login possesses a session if one already exists.
 
Public Const TENTEN_ALL_COLUMNS As Long
 Downloads all columns in a result set.
 
Public Const TENTEN_NO_CHANGE As Long
 Keeps the current permissions when modifying an object.
 
Public Const TENTEN_INHERIT As Long
 Inherit permissions from parent directory.
 
Public Const TENTEN_PRIVATE As Long
 Private(only owner) permissions.
 
Public Const TENTEN_NO_MAXDOWN As Long
 No maximum download limit.
 
Public Const TENTEN_TITLE As Long
 Update the title of this table/directory.
 
Public Const TENTEN_SDESC As Long
 Update the short description of this table/directory.
 
Public Const TENTEN_LDESC As Long
 Update the long description of this table/directory.
 
Public Const TENTEN_SECURE As Long
 Update the security flag of this table/directory.
 
Public Const TENTEN_OWNER As Long
 Update the owner of this table/directory.
 
Public Const TENTEN_FORMATTED_STRINGS As Long
 Write data as Strings according to column format type.
 
Public Const TENTEN_RAW_DATA As Long
 Get raw column data.
 
Public Const TENTEN_ONE_INDEXED As Long
 Create one indexed array of data.
 
Public Const TENTEN_ONE_DIM As Long
 Create one-dimensioned array of data.
 
Public Const TENTEN_EXCEL_DATA As Long
 Check data for compatibility with Excel.
 
Public Const TENTEN_NO_FLAGS As Long
 Specify default data conversions.
 
Public Const TENTEN_ADDTAB_IDLE As Long
 Server is idle and has not started loading anything.
 
Public Const TENTEN_ADDTAB_FAILED As Long
 Server could not load file.
 
Public Const TENTEN_ADDTAB_INITIALIZING As Long
 Server is validating load specification.
 
Public Const TENTEN_ADDTAB_LOADING As Long
 Server is in the process of loading a table.
 
Public Const TENTEN_ADDTAB_COMPLETED As Long
 Server has completed loading the table.
 
Public Const TENTEN_ADDTAB_DIAGNOSED As Long
 Server loaded the table but there were file format issues.
 
Public Const TENTEN_THREAD_STILL_ACTIVE As Long
 The Windows STILL_ACTIVE constant that will be used by TentenCheckThread.
 

Detailed Description

1010data VBA Software Development Kit by 1010data, Inc.

This SDK provides facility to connect to, access, manipulate and download data on 1010data's servers from a client application.

Author
Curtis Henkel

Function Documentation

Public Function TentenSDKVersion ( ) As Double

Get the version number of this SDK.

Returns
Returns the SDK Version number, which is an 8 digit number representing the build date of the file plus a decimal part equal to the bitness of the library (YYYYMMDD.BB).
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenLatestVersion ( ByVal   location As String) As Long

Check the 1010data website for the date of the latest released version.

Parameters
locationLocation of the document containing the the latest version.
Examples:
include/vbasdk1010.bas.
Public Sub TentenSetUserAgent ( ByVal   useragent As String)

Set the useragent string.

This function specifies the default useragent string used when creating new tenten session handles.

Parameters
useragentnew user agent string.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetUserAgent ( ByRef   useragent As String)

Get the useragent string.

This function returns the default useragent string used when creating new tenten session handles.

Parameters
useragentGets the User Agent string.
Examples:
include/vbasdk1010.bas.
Public Sub TentenSetAPIVersion ( ByVal   apiversion As String)

Specify API version.

This function specifies the default tenten API version to use when creating new tenten session handles. The default is "3".

Parameters
apiversionstring representation of the desired API version number.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetAPIVersion ( ByRef   apiversion As String)

Get the API version.

This function returns a string representation of the API version number that is currently be used when creating new 1010 session handles.

Parameters
apiversionGets the API version.
Examples:
include/vbasdk1010.bas.
Public Function TentenNewHandle ( ) As Long

Allocates a new 1010 session handle.

Returns
Returns a handle to use to execute transactions on a given session. (ex: Login, ExecuteQuery, GetRows, etc.)
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenFreeHandle ( ByVal   ttsid As Long)

Frees client-side resources associated with a 1010 session handle.

The handle will no longer be valid after calling this function.

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenEnableLog ( ByVal   ttsid As Long,
ByVal   filename As String,
ByVal   append As Boolean 
) As Long

Opens a file which will have the session's API transactions recorded into.

Parameters
ttsid1010 session handle
filenameName of file to use for transaction logging.
appendSpecifies if the file will be overwritten(False) or appended to(True).
Returns
Returns zero on success, or the file system error number encounted when attempting to open the file for writing. Can use TentenMsg to retrieve the text description of the error.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenDisableLog ( ByVal   ttsid As Long) As Long

Disables logging on a session, and closes the file opened by TentenEnableLog.

Parameters
ttsid1010 session handle
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetSessionCredentials ( ByVal   ttsid As Long,
ByRef   sid As String,
ByRef   epw As String 
)

Returns the session credentials associated with an active 1010 session handle.

Parameters
ttsid1010 session handle
sidString to write the session id into
epwString to write the encrypted session password into.
Examples:
include/vbasdk1010.bas.
Public Sub TentenSetHandleUserAgent ( ByVal   ttsid As Long,
ByVal   useragent As String 
)

Sets the HTTP useragent string for a 1010 session handle.

Parameters
ttsid1010 session handle
useragentString to use as the useragent for the http communication to 1010.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetHandleUserAgent ( ByVal   ttsid As Long,
ByRef   useragent As String 
)

Gets the User-Agent string used for http requests on a session handle.

Parameters
ttsid1010 session handle.
useragentString to write the useragent into.
Examples:
include/vbasdk1010.bas.
Public Sub TentenSetHandleAPIVersion ( ByVal   ttsid As Long,
ByVal   apiversion As String 
)

Changes the API version to use for a 1010 session handle.

(default is "3")

Parameters
ttsid1010 session
apiversionString specifying the version of the API to use.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetHandleAPIVersion ( ByVal   ttsid As Long,
ByRef   apiversion As String 
)

Gets the API version used by a session handle.

Parameters
ttsid1010 session handle.
apiversionString to write the API version into.
Examples:
include/vbasdk1010.bas.
Public Function TentenSetExpBackoff ( ByVal   ttsid As Long,
ByVal   retryMax As Long,
ByVal   retryTimeMin As Long,
ByVal   retryTimeRange As Long,
ByVal   retryBase As Double 
) As Long

Changes the retry parameters for a session handle.

This function sets the parameters which control the retry logic on transactions to 1010. If a network error or transaction timeout occurs, the transaction will be resubmitted. Randomized exponential backoff used to sleep for increasing amounts of time between resubmissions.

Parameters
ttsid1010 session handle.
retryMaxMaximum number of retry attempts to be made (Must be positive).
retryTimeMinMinimum value of the coefficient used to compute the time to wait in randomized exponential backoff (Must be non-negative).
retryTimeRangeRange of the randomized coefficient used to compute the time to wait in randomized exponential backoff (Must be non-negative).
retryBaseBase used in the randomized exponential backoff computation. (Must be positive)
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetExpBackoff ( ByVal   ttsid As Long,
ByRef   retryMax As Long,
ByRef   retryTimeMin As Long,
ByRef   retryTimeRange As Long,
ByRef   retryBase As Double 
)

Gets the retry parameters for a session handle.

Parameters
ttsid1010 session handle.
retryMaxGets the maximum number of retry attempts to be made
retryTimeMinGets the minimum value of the coefficient used to compute the time to wait in randomized exponential backoff.
retryTimeRangeGets the range of the randomized coefficient used to compute the time to wait in randomized exponential backoff.
retryBaseGets the base used in the randomized exponential backoff computation.
Examples:
include/vbasdk1010.bas.
Public Function TentenSetTimeout ( ByVal   ttsid As Long,
ByVal   connectTimeout As Long,
ByVal   timeout As Long 
) As Long

Changes the timeout parameters.

This functions sets the timeout values for attempt to establish a connection and for how long to keep a connection open. If a connection times out it will retry immediately, disregarding the exponential backoff settings.

Parameters
ttsid1010 session handle.
connectTimeoutMaximum amount of time, in seconds, to attempt to establish a connection. A value of 0 means to disable timeouts, non-zero values less than 300 are invalid.
timeoutMaximum amount of time, in seconds, to keep a connection open before attempting to reconnect. A value of 0 means to disable timeouts, non-zero values less than 300 are invalid.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Sub TentenGetTimeout ( ByVal   ttsid As Long,
ByRef   connectTimeout As Long,
ByRef   timeout As Long 
)

Gets the timeout parameters for a session handle.

Parameters
ttsid1010 session handle.
connectTimeoutGets the maximum amount of time, in seconds, to attempt to establish a connection. A value of 0 means connection timeout is disabled.
timeoutGets the maximum amount of time, in seconds, to keep a connection open before attempting to reconnect. A value of 0 means timeouts are disabled,
Examples:
include/vbasdk1010.bas.
Public Sub TentenSetLenient ( ByVal   ttsid As Long,
ByVal   lenient As Long 
)

Sets lenient value.

In some instances a query will request an int column but the system will return a float column. Normally this will cause an error when downloading the data. When the lenient value is set to non-zero values and this happens the column will be automatically type cast to the desired type. It is not recommended that the lenient value be set by default.

Parameters
lenientThe new lenient value to be set
ttsidtenten session handle.
Examples:
include/vbasdk1010.bas.
Public Function TentenRC ( ByVal   ttsid As Long) As Long

Get the return code from the previous transaction executed on a session handle.

Parameters
ttsid1010 session handle.
Returns
Returns the previous transaction's return code.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenMsg ( ByVal   ttsid As Long,
ByRef   msg As String 
)

Get the message from the previous transaction executed on a session handle.

Parameters
ttsid1010 session handle.
msgGets the message text of the previous transaction.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenSystemVersion ( ByVal   ttsid As Long,
ByRef   sysver As String 
)

Gets the version of 1010data that is running on a session.

(i.e. prod-#.##)

Parameters
ttsid1010 session handle.
sysverGets the version name being used.
Examples:
include/vbasdk1010.bas.
Public Function TentenLogin ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   user As String,
ByVal   password As String,
ByVal   killp As Long 
) As Long

Log a tenten session handle into 1010data.

This function establishes a connection with 1010data's specified server and logs a user in, optionally killing pre existing connections.

Parameters
ttsid1010 session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
userAccount username.
passwordAccount Password.
killpZero if previous a session should not be killed, -1 if a previous session should be possessed, otherwise kill previous session.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenLoginThread ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   user As String,
ByVal   password As String,
ByVal   killp As Long 
) As Long

Log a tenten session handle into 1010data in a spawned thread.

This function establishes a connection with 1010data's specified server and logs a user in, optionally killing pre existing connections. Need to use TentenCheckThread to check when the thread has completed and retrieve the results.

Parameters
ttsid1010 session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
userAccount username.
passwordAccount Password.
killpZero if previous a session should not be killed, -1 if a previous session should be possessed, otherwise kill previous session.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenCheckThread ( ByVal   ttsid As Long,
ByRef   rc As Long 
) As Long

Checks if a threaded transaction is still active or has completed.

Parameters
ttsid1010 session handle.
rcGets the return code of threaded function if completed. If not, it will get the Windows STILL_ACTIVE(259) value or the Windows error code that occurred trying to check the status of the thread.
Returns
Returns zero if thread is not running and non-zero otherwise
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetUID ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   owner As String,
ByVal   group As String,
ByVal   password As String 
) As Long

Request a free User ID from a group.

This function requests a free User ID from a specified group.

Parameters
ttsidtenten session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
ownerThe owner of the group.
groupGroup name.
passwordGroup password.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenGetUIDThread ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   owner As String,
ByVal   group As String,
ByVal   password As String 
) As Long

Request a free User ID from a group in a spawned thread.

This function requests a free User ID from a specified group.

Parameters
ttsidtenten session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
ownerThe owner of the group.
groupGroup name.
passwordGroup password.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenLoginUID ( ByVal   ttsid As Long,
ByVal   password As String,
ByVal   killp As Long 
) As Long

Log a Group User ID into 1010data.

This function takes a User ID allocated from TentenGetUID and logs it in to the 1010data server.

Parameters
ttsidtenten session handle.
passwordAccount password.
killpZero if previous a session should not be killed, -1 if a previous session should be possessed, otherwise kill previous session
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenLoginUIDThread ( ByVal   ttsid As Long,
ByVal   password As String,
ByVal   killp As Long 
) As Long

Log a Group User ID into 1010data in a spawned thread.

This function takes a User ID allocated from TentenGetUID and logs it in to the 1010data server NOTE: Need to use TentenCheckThread to check when the thread has completed and retrieve the results.

Parameters
ttsidtenten session handle.
passwordAccount password.
killpZero if previous a session should not be killed, -1 if a previous session should be possessed, otherwise kill previous session
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenLogout ( ByVal   ttsid As Long) As Long

Close a connection to 1010data.

This function closes connection made to 1010data through TentenLogin.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenLogoutThread ( ByVal   ttsid As Long) As Long

Close a connection to 1010data in a spawned thread.

This function closes connection made to 1010data through TentenLogin.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenReleaseUID ( ByVal   ttsid As Long) As Long

Release a User ID.

This function releases a user ID that was requested through TentenGetUID.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenReleaseUIDThread ( ByVal   ttsid As Long) As Long

Release a User ID in a spawned thread.

This function releases a user ID that was requested through TentenGetUID.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenDuplicateSession ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   user As String,
ByVal   sid As String,
ByVal   epw As String 
) As Long

Constructs a tenten session handle to represent a connection established in the past.

This function takes the SID/EPW of an existing session and constructs a new tenten session handle to represent the session. This is most often used when the user wants to use a session established in a previous invocation of their application.

Parameters
ttsid1010 session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
userAccount username.
sidSession ID from earlier session (This is not the same as a tenten session ID).
epwEncrypted password from earlier session.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenDuplicateSessionThread ( ByVal   ttsid As Long,
ByVal   url As String,
ByVal   user As String,
ByVal   sid As String,
ByVal   epw As String 
) As Long

Constructs a tenten session handle to represent a connection established in the past in a spawned thread.

This function takes the SID/EPW of an existing session and constructs a new tenten session handle to represent the session. This is most often used when the user wants to use a session established in a previous invocation of their application.

Parameters
ttsid1010 session handle.
urlThe URL of the 1010data server you are attempting to login to. (Something like "https://www2.1010data.com/cgi-bin/gw.k").
userAccount username.
sidSession ID from earlier session (This is not the same as a tenten session ID).
epwEncrypted password from earlier session.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenClearCache ( ByVal   ttsid As Long) As Long

Clears server side cache.

This function frees data stored in the cache on 1010data's server. Use of this function between unrelated queries can improve query performance.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenClearCacheThread ( ByVal   ttsid As Long) As Long

Clears server side cache in a spawned thread.

This function frees data stored in the cache on 1010data's server. Use of this function between unrelated queries can improve query performance.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenCurrMem ( ByVal   ttsid As Long) As Double

Get memory allocated to workspace.

This function returns the sum of the memory high water marks on each machine that your ID has access to. This indicates how much total memory has been allocated to your session. Some of this memory is used to cache the results of previous queries, and some will be able to be reused in consequent queries. Coupled with your ID's memory limit is you can use this function can be used to decide if it's a good time to call TentenClearCache.

Parameters
ttsid1010 session handle.
Returns
If an error occurs -1.0 is returned, otherwise the amount of memory allocated to the workspace measued in bytes is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenNewQuery ( ) As Long

Allocates a new query handle.

Returns
Returns the query handle.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenFreeQuery ( ByVal   qid As Long)

Frees a query handle allocated by TentenNewHandle and any associated memory for the handle (e.g.

downloaded data)

Returns
Zero is returned if no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenSetTable ( ByVal   qid As Long,
ByVal   tablepath As String 
)

Sets the table path associated with a query id.

Parameters
qidquery handle
tablepathPath to a 1010data table.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Sub TentenSetOps ( ByVal   qid As Long,
ByRef   ops As Variant 
)

Sets the 1010 query operations associated with a query id.

Parameters
qidquery handle
ops1010data query text.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenExecuteQuery ( ByVal   ttsid As Long,
ByVal   qid As Long 
) As Long

Executes a query transaction.

Parameters
ttsid1010 session handle.
qidquery handle.
Returns
Zero is returned if no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenNumCols ( ByVal   qid As Long) As Long

Gets the number of columns in a query's result set.

Valid only after a successful TentenExecuteQuery transaction with the same 'qid'

Parameters
qidquery handle.
Returns
Number of columns in the result set of this query.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenNumRows ( ByVal   qid As Long) As Double

Gets the number of rows in a query's result set.

Valid only after a successful TentenExecuteQuery transaction with the same 'qid'

Parameters
qidquery handle.
Returns
Number of rows in the result set of this query.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetColumnInfo ( ByVal   qid As Long,
ByRef   colinfo() As TentenColumn 
) As Long

Gets information about the columns in a query's result.

Valid only after TentenExecuteQuery has successfully run on a given query.

Parameters
qidquery handle.
colinfoTentenColumn array that will be ReDim-ed to the size equal to the number of columns in the query results and populated with the column info of those results. NOTE: array must be a resizeable array, and it must have a single dimension before calling this function. The lower bound of array is maintained by the resizing this function performs. Example:
Dim colinfo() as TentenColumn
Redim colinfo(0 to 0)
TentenGetColumnInfo(qid, colinfo)
' colinfo still starts at zero index, but may have new number of elements
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenExecuteQueryThread ( ByVal   ttsid As Long,
ByVal   qid As Long 
) As Long

Executes a query transaction in a spawned thread.

Need to use TentenCheckThread to check when the thread has completed and retrieve that results.

Parameters
ttsid1010 session handle.
qidquery handle.
Returns
Zero is returned if the thread was succesfully created, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenCheckProgress ( ByVal   ttsid As Long,
ByRef   progress As TentenProgress,
ByVal   logxml As Boolean 
) As Long

Check on the progress of the currently running query.

Use to check queries launched with TentenExecuteQueryThread

Parameters
ttsid1010 session handle.
progressGets the query progress info.
numops: Total number of operations in the running query.
activeop: Number indicating which op of the query is currently being processed.
op: String representation of the op being processed.
percentage: Percentage of progress through the current op.
memory: Current memory footprint in bytes of the session.
logxmlBoolean specifying if this transaction should be logged to the active log file handle on this handle. Recommended that this be False unless debugging the network communication between the client and 1010data.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenStop ( ByVal   ttsid As Long) As Long

Sends a 'stop' transaction on a session handle.

The stop transaction will cause a 1010 session that is running a query to stop executing that query at the completion of the current op. This function provides a mechanism to stop queries launched with TentenExecuteQueryThread.

Parameters
ttsid1010 session handle.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenGetRows ( ByVal   ttsid As Long,
ByVal   qid As Long,
ByVal   compression As Boolean,
ByRef   colnames As Variant,
ByVal   firstrow As Double,
ByVal   nrowstoget As Long,
ByRef   nrowsgotten As Long 
) As Long

Executes a getdata transaction on a session current result set.

After a successful TentenExecuteQuery, can call this function to download specific subsets of the result set.

Parameters
ttsid1010 session handle.
qidquery handle that was last successfully executed on this session.
compressionSpecifies whether to download data compressed.
colnamesArray of column names to download or TENTEN_ALL_COLUMNS.
firstrowThe first row of the dataset to download.
nrowstogetThe number of rows to download.
nrowsgottenGets the number of rows actually downloaded (for the case that you ask for more rows than exist in the result set)
Returns
Zero is returned if no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetColumnData ( ByVal   qid As Long,
ByVal   colname As String,
ByRef   var As Variant,
ByVal   flags As Long 
) As Long

Pulls downloaded data of a column into a VBA Array.

Use after a call to TentenGetRows to transfer the data that was downloaded into a VBA array object.

Parameters
qidQuery handle.
colnameName of a column in the query results.
varBecomes an array containing the column data.
flagsFlag constants specifying how to pull the data into VBA types. Specify multiple flags by Or-ing the constants together.
TENTEN_NO_FLAGS : Default conversion behavior
TENTEN_RAW_DATA : Get data as the true types of the columns as stored on 1010data servers. Without this flag, columns with a date or time format will be turned into VBA Date type.
TENTEN_ONE_DIM : Put data into a VBA array with one dimension. Without this flag, 'data' will be a two-dimensioned array with size (N x 1), where N = the number of rows gotten during TentenGetRows. NOTE: the two-dim array is useful for copying the data into an Excel ranges which are two-dimensioned
TENTEN_ONE_INDEXED : Create data array that starts with index 1. Without this flag, 'data' will start with index 0 (in both dimensions if two-dim).
TENTEN_FORMATTED_STRINGS : Create data array as formatted strings according to the 1010data column format types. NOTE: ALL data is converted into String types with this flag, even if there is no column format.
TENTEN_EXCEL_DATA : Check data for compatibility with Excel. Returns TENTEN_ERROR_INVALID_DATA if the column data is not compatible. For example, if the column contains dates before 1900.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetRowsThread ( ByVal   ttsid As Long,
ByVal   qid As Long,
ByVal   compression As Boolean,
ByRef   colnames As Variant,
ByVal   firstrow As Double,
ByVal   nrowstoget As Long 
) As Long

Executes a getdata transaction on a session current result set in a spawned thread.

Need to use TentenCheckThread to check when the thread has completed and retrieve the return code. After a successful TentenExecuteQuery, can call this function to download specific subsets of the result set.

Parameters
ttsid1010 session handle.
qidquery handle that was last successfully executed on this session.
compressionSpecifies whether to download data compressed.
colnamesArray of column names to download or TENTEN_ALL_COLUMNS.
firstrowThe first row of the dataset to download.
nrowstogetThe number of rows to download.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenNumRowsGotten ( ByVal   qid As Long,
ByVal   colname As String 
) As Long

Gets the number of rows downloaded for a given column of a query.

Parameters
qidQuery handle.
colnameColumn name that exists in the result set of the query. Empty string will return the number of rows gotten if all the columns of the query with downloaded data have the same number of rows downloaded. You can use "" if you ran TentenGetRows or TentenGetRowsThread with TENTEN_ALL_COLUMNS
Returns
Returns the number of rows that were downloaded for this column in the last TentenGetRows or TentenGetRowsThread call on this query that included this column. This will be the size of the data arrays that are returned by TentenGetColumnData.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenUploadXMLTable ( ByVal   ttsid As Long,
ByVal   tablename As String,
ByRef   xml As Variant 
) As Long

Uploads an XML table to a 1010data table.

Parameters
ttsid1010 session handle.
tablenamePath to save the table in 1010data.
xmlFull xml text required by the 'upload' transaction.
Returns
Zero is returned if no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenUploadXMLTableThread ( ByVal   ttsid As Long,
ByVal   tablename As String,
ByRef   xml As Variant 
) As Long

Uploads an XML table to a 1010data table in a spawned thread.

Need to use TentenCheckThread to check when the thread has completed and retrieve the return code.

Parameters
ttsid1010 session handle.
tablenamePath to save the table in 1010data.
xmlFull xml text required by the 'upload' transaction.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenSaveToFTP ( ByVal   ttsid As Long,
ByVal   filename As String,
ByVal   namesp As Boolean,
ByVal   headersp As Boolean,
ByVal   sep As String,
ByVal   linesep As String 
) As Long

Save a query to the FTP server.

This function takes the result of the most recently completed query and saves it to the FTP server.

Parameters
ttsid1010 session handle.
filenameName the file will have on the FTP server.
namespSpecifies whether to include the column names in the saved file.
headerspSpecifies whether to include column headers in the saved file.
sepString used as a seperator between columns. (One character)
linesepString used as a seperator between rows. (Use vbCrLf for end lines)
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenSaveToFTPThread ( ByVal   ttsid As Long,
ByVal   filename As String,
ByVal   namesp As Boolean,
ByVal   headersp As Boolean,
ByVal   sep As String,
ByVal   linesep As String 
) As Long

Save a query to the FTP server in a spawned thread.

This function takes the result of the most recently completed query and saves it to the FTP server. Need to use TentenCheckThread to check when the thread has completed and retrieve the return code.

Parameters
ttsid1010 session handle.
filenameName the file will have on the FTP server.
namespSpecifies whether to include the column names in the saved file.
headerspSpecifies whether to include column headers in the saved file.
sepString used as a seperator between columns. (One character)
linesepString used as a seperator between rows. (Use vbCrLf for end lines)
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenSaveTable ( ByVal   ttsid As Long,
ByRef   table As TentenTabDir,
ByVal   replacep As Boolean,
ByVal   appendp As Boolean,
ByVal   appendablep As Boolean,
ByVal   temporaryp As Boolean,
ByRef   permissions As Variant 
) As Long

Create, replace or append to a table.

This function will create, replace or append to a table. Its particular behavior is based on the flags passed as arguments.

Parameters
ttsid1010 session handle.
tableInfo object specifying table meta data to set/change on the created table
name: Path on the 1010data servers where the table will be saved.
title: The table's title ("" for no change)
sdesc: The table's short description ("" for no change)
ldesc: The table's long description ("" for no change)
link: The table's link text. A short (one or two word) title that is used when the table is linked to another table. ("" for no change)
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
replacepSpecify if the table should be allowed to replace an existing table at this path. Otherwise, return an erro if a table with the same name already exists.
appendpSpecify if the table should be appended a pre-existing table with the same name if one exists. Otherwise return an error if a table with the same name at the same location already exists.
appendablepSpecify if the table should be merageable with other tables. Otherwise the table will not be able to be merged with other tables.
temporarypSpecify if the table should be temporary(lasting only this session). Otherwise the table will be permanent.
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : constant specifying the table should inherit its permissions from the directory that it is in.
- TENTEN_PRIVATE : only this id has access to this table.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenSaveTableThread ( ByVal   ttsid As Long,
ByRef   table As TentenTabDir,
ByVal   replacep As Boolean,
ByVal   appendp As Boolean,
ByVal   appendablep As Boolean,
ByVal   temporaryp As Boolean,
ByRef   permissions As Variant 
) As Long

Create, replace or append to a table in a spawned thread.

This function will create, replace or append to a table. Its particular behavior is based on the flags passed as arguments. Need to use TentenCheckThread to check when the thread has completed and retrieve the return code.

Parameters
ttsid1010 session handle.
tableInfo object specifying table meta data to set/change on the created table
name: Path on the 1010data servers where the table will be saved.
title: The table's title ("" for no change)
sdesc: The table's short description ("" for no change)
ldesc: The table's long description ("" for no change)
link: The table's link text. A short (one or two word) title that is used when the table is linked to another table. ("" for no change)
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
replacepSpecify if the table should be allowed to replace an existing table at this path. Otherwise, return an erro if a table with the same name already exists.
appendpSpecify if the table should be appended a pre-existing table with the same name if one exists. Otherwise return an error if a table with the same name at the same location already exists.
appendablepSpecify if the table should be merageable with other tables. Otherwise the table will not be able to be merged with other tables.
temporarypSpecify if the table should be temporary(lasting only this session). Otherwise the table will be permanent.
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : constant specifying the table should inherit its permissions from the directory that it is in.
- TENTEN_PRIVATE : only this id has access to this table.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenMergeTables ( ByVal   ttsid As Long,
ByRef   tablenames() As String,
ByRef   table As TentenTabDir,
ByVal   replacep As Boolean,
ByRef   permissions As Variant 
) As Long

Merge a list of tables.

This function takes a list of tablenames and merged them into a single table.

Parameters
ttsid1010 session handle.
tablenamesString array containing names of tables to merge into a single table.
tableInfo object specifying table meta data to set/change on the created table
name: Path on the 1010data servers where the table will be saved.
title: The table's title ("" for no change)
sdesc: The table's short description ("" for no change)
ldesc: The table's long description ("" for no change)
link: The table's link text. A short (one or two word) title that is used when the table is linked to another table. ("" for no change)
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
replacepSpecify if the table should be allowed to replace an existing table at this path. Otherwise, return an erro if a table with the same name already exists.
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : constant specifying the table should inherit its permissions from the directory that it is in.
- TENTEN_PRIVATE : only this id has access to this table.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenMergeTablesThread ( ByVal   ttsid As Long,
ByRef   tablenames() As String,
ByRef   table As TentenTabDir,
ByVal   replacep As Boolean,
ByRef   permissions As Variant 
) As Long

Merge a list of tables in a spawned thread.

This function takes a list of tablenames and merged them into a single table.

Parameters
ttsid1010 session handle.
tablenamesString array containing names of tables to merge into a single table.
tableInfo object specifying table meta data to set/change on the created table
name: Path on the 1010data servers where the table will be saved.
title: The table's title ("" for no change)
sdesc: The table's short description ("" for no change)
ldesc: The table's long description ("" for no change)
link: The table's link text. A short (one or two word) title that is used when the table is linked to another table. ("" for no change)
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
replacepSpecify if the table should be allowed to replace an existing table at this path. Otherwise, return an erro if a table with the same name already exists.
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : constant specifying the table should inherit its permissions from the directory that it is in.
- TENTEN_PRIVATE : only this id has access to this table.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenMoveTable ( ByVal   ttsid As Long,
ByVal   oldpath As String,
ByVal   newpath As String 
) As Long

Moves a table.

This function moves a table from one location to another in the 1010data system.

Parameters
ttsid1010 session handle.
oldpathThe path to the table's current location.
newpathThe path to where the table should be moved.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenMoveTableThread ( ByVal   ttsid As Long,
ByVal   oldpath As String,
ByVal   newpath As String 
) As Long

Moves a table in a spawned thread.

This function moves a table from one location to another in the 1010data system.

Parameters
ttsid1010 session handle.
oldpathThe path to the table's current location.
newpathThe path to where the table should be moved.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenDropTable ( ByVal   ttsid As Long,
ByVal   tablename As String 
) As Long

Delete a table.

This function deletes the specified table.

Parameters
ttsid1010 session handle.
tablenameThe name of the table to be deleted.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenDropTableThread ( ByVal   ttsid As Long,
ByVal   tablename As String 
) As Long

Delete a table in a spawned thread.

This function deletes the specified table.

Parameters
ttsid1010 session handle.
tablenameThe name of the table to be deleted.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenUpdateObject ( ByVal   ttsid As Long,
ByVal   pathname As String 
) As Long

Refresh this session's view of a table or folder.

This function updates the object in your session so that you see any changes made on that table/folder since you logged in (or since you last updated it). Updating a folder updates its contents (recursively down) as well.

Parameters
ttsid1010 session handle.
pathnameThe name of the table or folder to update.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenUpdateObjectThread ( ByVal   ttsid As Long,
ByVal   pathname As String 
) As Long

Refresh this session's view of a table or folder in a spawned thread.

This function updates the object in your session so that you see any changes made on that table/folder since you logged in (or since you last updated it). Updating a folder updates its contents (recursively down) as well.

Parameters
ttsid1010 session handle.
pathnameThe name of the table or folder to update.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenModifyTable ( ByVal   ttsid As Long,
ByRef   table As TentenTabDir,
ByVal   flags As Long,
ByRef   permissions As Variant 
) As Long

Modifies table metadata and permissions.

This function modifies the specified metadata and permissions

Parameters
ttsid1010 session handle.
tableInfo object specifying table meta data to set/change on the created table
name: Path of the table to modify(required).
The following info elements are updated if the appropriate flags are set
title: The table's title
sdesc: The table's short description
ldesc: The table's long description
owner: The table's owner
secure: Boolean flag specifying that this table can only be accessed through https.
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
flagsIndicates which elements of the table info object to use to update that table's metadata. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together.
Flag constants: TENTEN_TITLE, TENTEN_SDESC, TENTEN_LDESC, TENTEN_OWNER, TENTEN_SECURE
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : this table should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to this table.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenModifyTableThread ( ByVal   ttsid As Long,
ByRef   table As TentenTabDir,
ByVal   flags As Long,
ByRef   permissions As Variant 
) As Long

Modifies table metadata and permissions in a spawned thread.

This function modifies the specified metadata and permissions

Parameters
ttsid1010 session handle.
tableInfo object specifying table meta data to set/change on the created table
name: Path of the table to modify(required).
The following info elements are updated if the appropriate flags are set
title: The table's title
sdesc: The table's short description
ldesc: The table's long description
owner: The table's owner
secure: Boolean flag specifying that this table can only be accessed through https.
maxdown: The maximum number of data items that may be downloaded at once from this table. TENTEN_NOMAX should be used to remove any limit.
flagsIndicates which elements of the table info object to use to update that table's metadata. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together.
Flag constants: TENTEN_TITLE, TENTEN_SDESC, TENTEN_LDESC, TENTEN_OWNER, TENTEN_SECURE
permissionsOne of the following:
- A String array containing names of users/groups that should have permission to view the created table.
- TENTEN_INHERIT : this table should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to this table.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenGetTableInfo ( ByVal   ttsid As Long,
ByVal   tablename As String,
ByRef   table As TentenTabDir,
ByRef   colinfo() As TentenColumn 
) As Long

Retrieves basic info about a table and its columns.

The full table metadata info can be retrieved with TentenGetTableMetaInfo

Parameters
ttsid1010 session handle.
tablenameThe name of the table to retrieve info about.
tableInfo object that returns with the following table info
name: Path of the table.
title: The table's title
sdesc: The table's short description
ldesc: The table's long description
colinfoTentenColumn array that will be ReDim-ed to the size equal to the number of columns in the table and populated with info about its columns. NOTE: array must be a resizeable array, and it must have a single dimension before calling this function. The lower bound of array is maintained by the resizing this function performs. Example:
Dim colinfo() as TentenColumn
Redim colinfo(0 to 0)
TentenGetTableInfo(ttsid,tablename,tableinfo, colinfo)
' colinfo still starts at zero index, but may have new number of elements
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetTableInfoThread ( ByVal   ttsid As Long,
ByVal   tablename As String 
) As Long

Retrieves basic info about a table and its columns in spawned thread.

You need to call TentenCheckThread to check that the thread is finished. Then, call TentenGetTableInfo with the const TENTEN_THREAD_RESULTS to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle.
tablenameThe name of the table to retrieve info about.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetTableMetaInfo ( ByVal   ttsid As Long,
ByVal   tablename As String,
ByRef   table As TentenTabDir 
) As Long

Retrieves meta info about a table.

Parameters
ttsid1010 session handle.
tablenameThe name of the table to retrieve info about.
tableInfo object that returns with the following table info
name: Path of the table.
title: The table's title
sdesc: The table's short description
ldesc: The table's long description
link: The table's link text. A short (one or two word) title that is used when the table is linked to another table.
maxdown: The maximum number of data items that may be downloaded at once from this table. Zero indicates that ther is no limit.
update: Last update time of the table.
owner: Owner of the table.
secure: Indicates the table is only accessible over https.
own: Indicates this id owns the table.
access: Indicates this id can access the table
tstat: Inidcates the table can use timeseries functions
rows: Number of rows in the table.
bytes: Number of bytes uses to store the table.
segs: Number of segments in the table.
id: Table identifier number.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetTableMetaInfoThread ( ByVal   ttsid As Long,
ByVal   tablename As String 
) As Long

Retrieves meta info about a table in a spawned thread.

You need to call TentenCheckThread to check that the thread is finished. Then, call TentenGetTableMetaInfo with the const TENTEN_THREAD_RESULTS as the tablename argument to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle.
tablenameThe name of the table to retrieve info about.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetDirectory ( ByVal   ttsid As Long,
ByVal   dirname As String,
ByVal   descendants As Boolean,
ByRef   dir As TentenTabDir,
ByRef   parents() As TentenTabDir,
ByRef   children() As TentenTabDir 
) As Long

Retrieves meta info about a directory.

Parameters
ttsid1010 session handle.
dirnameThe name of the directory to retrieve info about.
descendantsSpecify if descendant tables/dirs should be included in 'children'
dirInfo object that returns with the following table info
name: Path of the directory.
title: The directory's title
sdesc: The directory's short description
ldesc: The directory's long description
update: Last update time of the directory.
owner: Owner of the directory.
secure: Indicates the directory is only accessible over https.
own: Indicates this id owns the directory.
upload: Indicates this id can upload to the directory
id: Directory identifier number.
parentsTentenTabDir array that wil be Redim-ed to the size equal the number of directory higher that this in the hierarchy and and populated with directory metadata about those directories.
childrenTentenTabDir array that will be Redim-ed and filled with metadata about the tables/directories in 'dirname' and additionally any further descandant objects if the 'descendants' argument is True. NOTE: parents,children arrays must be resizeable arrays, and must have a single dimension before calling this function. The lower bound of array is maintained by the resizing this function performs. Example:
Dim dirinfo as TentenTabDir Dim parents() as TentenTabDir, children as TentenTabDir Redim parents(0 to 0) Redim children(0 to 0) TentenGetDirectory(ttsid, dirname, False, dirinfo, parents, children) ' parents and children start at zero index, but may have new number of elements
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenGetDirectoryThread ( ByVal   ttsid As Long,
ByVal   dirname As String,
ByVal   descendants As Boolean 
) As Long

Retrieves meta info about a directory in a spawned thread.

You need to call TentenCheckThread to check that the thread is finished. Then, call TentenGetDirectory with the const TENTEN_THREAD_RESULTS as the dirname argument to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle.
dirnameThe name of the directory to retrieve info about.
descendantsSpecify if descendant tables/dirs should be included in 'children'
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Function TentenModifyDirectory ( ByVal   ttsid As Long,
ByRef   dir As TentenTabDir,
ByVal   flags As Long,
ByRef   users As Variant,
ByRef   uploaders As Variant 
) As Long

Modifies directory metadata and its users/uploaders permissions.

This function modifies the specified metadata and permissions

Parameters
ttsid1010 session handle.
dirInfo object specifying directory meta data to set/change
name: Path of the directory to modify(required).
The following info elements are updated if the appropriate flags are set
title: The directory's title
sdesc: The directory's short description
ldesc: The directory's long description
owner: The directory's owner
secure: Boolean flag specifying that this directory can only be accessed through https.
flagsIndicates which elements of the directory info object to use to update that directory's metadata. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together.
Flag constants: TENTEN_TITLE, TENTEN_SDESC, TENTEN_LDESC, TENTEN_OWNER, TENTEN_SECURE
usersOne of the following:
- A String array containing names of users/groups that should have permission to view the directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to the directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
uploadersOne of the following:
- A String array containing names of users/groups that should have permission to upload to this directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id can upload to this directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenModifyDirectoryThread ( ByVal   ttsid As Long,
ByRef   dir As TentenTabDir,
ByVal   flags As Long,
ByRef   users As Variant,
ByRef   uploaders As Variant 
) As Long

Modifies directory metadata and its users/uploaders permissions in a spawned thread.

This function modifies the specified metadata and permissions

Parameters
ttsid1010 session handle.
dirInfo object specifying directory meta data to set/change
name: Path of the directory to modify(required).
The following info elements are updated if the appropriate flags are set
title: The directory's title
sdesc: The directory's short description
ldesc: The directory's long description
owner: The directory's owner
secure: Boolean flag specifying that this directory can only be accessed through https.
flagsIndicates which elements of the directory info object to use to update that directory's metadata. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together.
Flag constants: TENTEN_TITLE, TENTEN_SDESC, TENTEN_LDESC, TENTEN_OWNER, TENTEN_SECURE
usersOne of the following:
- A String array containing names of users/groups that should have permission to view the directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to the directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
uploadersOne of the following:
- A String array containing names of users/groups that should have permission to upload to this directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id can upload to this directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenMakeDirectory ( ByVal   ttsid As Long,
ByRef   dir As TentenTabDir,
ByVal   flags As Long,
ByRef   users As Variant,
ByRef   uploaders As Variant 
) As Long

Makes a new directory.

This function makes a new directory with the given user and uploader privileges if the creator's user id has permission to create the directory.

Parameters
ttsid1010 session handle.
dirInfo object specifying directory meta data to use for creation.
name: Path of the directory to modify(required).
The following info elements are used if the appropriate flags are set
title: The directory's title
flagsIndicates which elements of the directory info object to use. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together. Currently, only TENTEN_TITLE can be used when creating a new directory.
usersOne of the following:
- A String array containing names of users/groups that should have permission to view the directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to the directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
uploadersOne of the following:
- A String array containing names of users/groups that should have permission to upload to this directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id can upload to this directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenMakeDirectoryThread ( ByVal   ttsid As Long,
ByRef   dir As TentenTabDir,
ByVal   flags As Long,
ByRef   users As Variant,
ByRef   uploaders As Variant 
) As Long

Makes a new directory in a spawned thread.

This function makes a new directory with the given user and uploader privileges if the creator's user id has permission to create the directory.

Parameters
ttsid1010 session handle.
dirInfo object specifying directory meta data to use for creation.
name: Path of the directory to modify(required).
The following info elements are used if the appropriate flags are set
title: The directory's title
flagsIndicates which elements of the directory info object to use. Use the constant flags supplied by this library. Multiple flags are specified by Or-ing together. Currently, only TENTEN_TITLE can be used when creating a new directory.
usersOne of the following:
- A String array containing names of users/groups that should have permission to view the directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id has access to the directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
uploadersOne of the following:
- A String array containing names of users/groups that should have permission to upload to this directory.
- TENTEN_INHERIT : this directory should inherit its permissions from its parent directory.
- TENTEN_PRIVATE : only this id can upload to this directory.
= TENTEN_NO_CHANGE : keep the same permissions as before.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenGetQueryOps ( ByVal   ttsid As Long,
ByVal   pathname As String,
ByRef   base As String,
ByRef   ops As String 
) As Long

Get the basetable and query ops of a quick query.

Parameters
ttsid1010 session handle
pathnamePath to the quick query.
baseBase table for the query.
opsQuery operations.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenGetQueryOpsThread ( ByVal   ttsid As Long,
ByVal   pathname As String 
) As Long

Get the basetable and query ops of a quick query.

You need to call TentenCheckThread to check that the thread is finished. Then, call TentenGetQueryOps with the const TENTEN_THREAD_RESULTS as the pathname argument to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle
pathnamePath to the quick query.
Returns
Zero is returned if there was no error spawning the thread, otherwise an error code is returned. Use TentenCheckThread to get results of the thread.
Examples:
include/vbasdk1010.bas.
Public Function TentenConvertSpec ( ByVal   ttsid As Long,
ByVal   filename As String,
ByRef   spec As String 
) As Long

Converts a legacy PowerLoader spec file located in the user's 1010data FTP account into an XML spec, which can be used with TentenAddTable.

Parameters
ttsid1010 session handle.
filenameName of the spec file in your 1010 FTP folder to convert.
specThe converted spec XML.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenConvertSpecThread ( ByVal   ttsid As Long,
ByVal   filename As String 
) As Long

Converts a legacy PowerLoader spec file located in the user's 1010data FTP account into an XML spec, which can be used with TentenAddTable You need to call TentenCheckThread to check that the thread is finsihed.

Then, call TentenConvertSpec with the const TENTEN_THREAD_RESULTS as the filename argument to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle.
filenameName of the spec file in your 1010 FTP folder to convert.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenValidateSpec ( ByVal   ttsid As Long,
ByVal   spec As String 
) As Long

Validates an XML spec that can be used to laod data from a user's FTP accoutn via TentenAddTable.

Parameters
ttsid1010 session handle.
specSpec XML text to validate.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenValidateSpecThread ( ByVal   ttsid As Long,
ByVal   spec As String 
) As Long

Validates an XML spec that can be used to laod data from a user's FTP accoutn via TentenAddTable You need to call TentenCheckThread to check that the thread is finsihed.

Parameters
ttsid1010 session handle.
specSpec XML text to validate.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenAddTable ( ByVal   ttsid As Long,
ByVal   spec As String,
ByRef   pathname As String 
) As Long

Loads a table into 1010data from the user's 1010data FTP account.

Parameters
ttsid1010 session handle.
specSpec XML text describing the table to load.
pathnameGets the pathname of the uploaded table on a successful load.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenAddTableThread ( ByVal   ttsid As Long,
ByVal   spec As String 
) As Long

Loads a table into 1010data from the user's 1010data FTP account.

You need to call TentenCheckThread to check that the thread is finsihed. Then, call TentenAddTable with the const TENTEN_THREAD_RESULTS as the filename argument to retrieve the results of the threaded call.

Parameters
ttsid1010 session handle.
specSpec XML text describing the table to load.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenAddTableAsync ( ByVal   ttsid As Long,
ByVal   spec As String,
ByRef   pathname As String 
) As Long

Initiates loading a table into 1010data from the user's 1010data FTP account like TentenAddTable, except this function returns when the load has started instead of when it has finished.

The user can use TentenAddTableStatus to check on the progress of the load initiated by this function. Only one load can be initiated at a time in a session, but other interactions (query, getdata, etc.) can be performed while an asynchronous add table is loading.

Parameters
ttsid1010 session handle.
specSpec XML Text describing the table to load.
pathnameGets the pathname where the table is being loaded.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.
Public Function TentenAddTableStatus ( ByVal   ttsid As Long,
ByRef   status As Long,
ByRef   numrecs As Double,
ByRef   totrecs As Double 
) As Long

Checks the status of a table load started with TentenAddTableThread.

Parameters
ttsid1010 session handle.
statusGets the status code of the current load job. One of TENTEN_ADDTAB_IDLE, TENTEN_ADDTAB_FAILED, TENTEN_ADDTAB_INITIALIZING, TENTEN_ADDTAB_LOADING, TENTEN_ADDTAB_COMPLETED, TENTEN_ADDTAB_DIAGNOSED.
numrecsGets the number of records loaded so far when the status is TENTEN_ADDTAB_LOADING, otherwise remains unchanged.
totrecsGets the number of total records loaded for the table when the status is TENTEN_ADDTAB_COMPLETED; or the expected number of total records when status is TENTEN_ADDTAB_LOADING; otherwise, remains unchanged.
Returns
Zero is returned if there is no error, otherwise an error code is returned.
Examples:
include/vbasdk1010.bas.

Variable Documentation

Public Const TENTEN_THREAD_RESULTS As String

Specifies that you want to retrieve the data from the previous *Thread transaction executed.

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Const TENTEN_ERROR_INVALID_HANDLE As Long

Handle parameter is invalid.

Use TentenNewHandle to allocate valid handles.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_INVALID_QUERY As Long

Query parameter is invalid.

Use TentenNewQuery to allocate valid queries.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_INVALID_ARGS As Long

Some function argument is invalid.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_NOT_FOUND As Long

A column name is not found in the results set of a query.

TentenGetColumnData TentenGetRows.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_UNSUPPORTED_TYPE As Long

The column requested has a datatype that's not supported by the SDK.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_NO_RESULTS As Long

There are no results to retrieve from the last THREADED transaction.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_INVALID_DATA As Long

The data requested contains invalid values.

Can be returned from TentenGetColumnData with certain flags.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_THREAD_RUNNING As Long

A Thread is already running with this handle.

Only TentenCheckProgress and TentenStop can be called while a Thread is running.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_THREAD_CREATE As Long

A system error occurred attempting to create a new thread.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_ARRAY_CREATE As Long

An error occurred creating an array to return data in.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_ARRAY_ACCESS As Long

An error occurred accessing an array passed to the SDK.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ERROR_ARRAY_REDIM As Long

An error occurred re-dimensioning an array passed to the SDK.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_KILL As Long

Login kills previous session.

If a session exists for this id, login will kill that session and start a new one.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_NO_KILL As Long

Login fails if a session already exists.

If a session exists for this id, login will return an error .

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_POSSESS As Long

Login possesses a session if one already exists.

If a session exists for this id, login will return the credentials to that session.

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Const TENTEN_ALL_COLUMNS As Long

Downloads all columns in a result set.

Use with TentenGetRows to get all columns in a result set instead of naming which columns to get.

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Const TENTEN_NO_CHANGE As Long

Keeps the current permissions when modifying an object.

Use to keep the same user/uploader permissions in TentenModifyTable and TentenModifyDirectory.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_INHERIT As Long

Inherit permissions from parent directory.

Use to have user/uploader permissions be inherited from the parent directory. TentenModifyTable, TentenModifyDirectory, TentenSaveTable, TentenMergeTables

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_PRIVATE As Long

Private(only owner) permissions.

Use to have user/uploader permissions be private to the user. TentenModifyTable, TentenModifyDirectory, TentenSaveTable, TentenMergeTables

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Const TENTEN_NO_MAXDOWN As Long

No maximum download limit.

Use to specify no maximum download limit on a table. TentenSaveTable, TentenModifyTable, TentenMergeTables

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_TITLE As Long

Update the title of this table/directory.

TentenModifyTable, TentenModifyDirectory

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_SDESC As Long

Update the short description of this table/directory.

TentenModifyTable, TentenModifyDirectory

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_LDESC As Long

Update the long description of this table/directory.

TentenModifyTable, TentenModifyDirectory

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_SECURE As Long

Update the security flag of this table/directory.

TentenModifyTable, TentenModifyDirectory

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_OWNER As Long

Update the owner of this table/directory.

TentenModifyTable, TentenModifyDirectory

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_FORMATTED_STRINGS As Long

Write data as Strings according to column format type.

Flag to use in TentenGetColumnData to transfer downloaded data into VBA as string formatted according to column format type.

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_RAW_DATA As Long

Get raw column data.

Flag to use in TentenGetColumnData to transfer downloaded data into VBA as the data type of the column as stored on 1010data

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ONE_INDEXED As Long

Create one indexed array of data.

Flag to use in TentenGetColumnData to have the VBA array containing the data start at index 1 (0 by default).

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ONE_DIM As Long

Create one-dimensioned array of data.

Flag to use in TentenGetColumnData to have the VBA array containing the data have 1 dimension (2 dim by default to match the dimensions of Excel Ranges).

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_EXCEL_DATA As Long

Check data for compatibility with Excel.

Flag to use in TentenGetColumnData to specify that you want the data checked for compatibility with Excel. For example, Excel doesn't allow date values before 1900

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_NO_FLAGS As Long

Specify default data conversions.

Flag to use in TentenGetColumnData to have the VBA array transferred using all default behavior.

Examples:
examples/vbasdk1010_examples.bas, and include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_IDLE As Long

Server is idle and has not started loading anything.

TentenAddTableStatus

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_FAILED As Long

Server could not load file.

TentenAddTableStatus

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_INITIALIZING As Long

Server is validating load specification.

TentenAddTableStatus

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_LOADING As Long

Server is in the process of loading a table.

TentenAddTableStatus

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_COMPLETED As Long

Server has completed loading the table.

TentenAddTableStatus

Examples:
include/vbasdk1010.bas.
Public Const TENTEN_ADDTAB_DIAGNOSED As Long

Server loaded the table but there were file format issues.

The server attempted to automatically correct the issues. TentenAddTableStatus

Examples:
include/vbasdk1010.bas.