Topic Options
#7650 - 10/03/06 09:39 AM Re: oledb access to QI Data
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hello Steve,

There are examples of using OLEDB to connect to Adagio data using Excel, Access, Word, HTML and SQL installed with the application in SOFTRAK\OLWIN\SAMPLES. One of the Excel samples demonstrates how to construct a query to display all the tables, and all the fields in a table in a given application.

Do these help?
_________________________
Andrew Bates

Top
#7652 - 10/10/06 06:40 PM Re: oledb access to QI Data
Michael Mulrooney Offline
Adagio Virtuoso

Registered: 02/07/02
Posts: 839
Loc: Vancouver, BC
There is no additional documentation. Adagio OLEDB is a level 1 implementation and does not support a lot of "dynamic" interchanges between itself and the calling application.

The GenInformation tab of the GeneralSample.xls prtty much says it all, which I copied below.

Other than using the GeneralSample.xls itself to extract the "Dictionary Names", "Table Names" and "Field Names" you can use GridView to view the data within a specific "Table". Softrak's developers also have access to the Dictionary Manager which can be used to examine the Dictionaries.

***** Info below is from the GeneralSample.xls *****

DataPath = "C:\Softrak\OLWIN\SAMDATA"
DataSelector = "SAM"
AdagioUserID = "SYS"
AdagioPassword = "SYS"

' You must make the changes in the VBA Macro that correspond to the 4 lines above
' Making them in rows 34 to 37 will not work

Private Sub zMakeConnection()
Set Connection = CreateObject("adodb.connection")
Connection.Provider = "ADSDB.Provider"
Connection.ConnectionString = "Password= " & AdagioPassword & "; User ID = " & AdagioUserID & "; Data Source = " & DataPath$ & "\" & "DATA." & DataSelector$
Connection.Open
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Connection.Execute Parameters

"Function [|Info:] [|Mask: Mask string] [|Range: Range string]"

Function can be: "SysTables" or "8 character TableName"

SysTables is used in a connection string to get a list of available dictionaries or tables and their descriptions.

Info: (optional) used with SysTables for a list of Dictionaries or with TableName for a list of masks.

Mask: (optional) is used in a connection string to select one file from a number of files that match on wildcard characters defined in the Table

Mask string is a character string corresponding to one of the strings provided by Info:

Range: (optional) is used in a connection string with SysTables or TableName to select one or more Dictionaries or Tables or to limit the number of records returned in a RecordSet

Range string is a character string seperated by commas. A range is seperated by a colon. If Range: is not specified then Range:* is presumed and all records are returned.

Info:
1) When used with a TableName, creates a RecordSet containing one field with characters that match the wild card mask in the table.

Example: Set WildCards = Connection.Execute("@R65ACSH|Info:" )
would return a RecordSet containing 4 character numbers that correspond to Cash Batches found for this data set.

Example: Set WildCards = Connection.Execute("@L65APST|Info:" )
would return a recordset containing a single record with PST

2) When used with SysTables, creates a RecordSet containing two fields that contain the DictionaryName and DictionaryDescription

Example: Set DictionaryList = Connection.Execute("SysTables|Info:" )
would return a RecordSet containing DictionaryName and DictionaryDescription for all Dictonaries

Example: Set DictionaryList = Connection.Execute("SysTables|Info:|Range:@R65A,@P65A" )
would return a RecordSet containing DictionaryName and DictionaryDescription for Adagio Receivables and Adagio Payables


Mask:
Used with the information returned from Info: to access a data file which has Wildcards in the name.

Example: Set GLTrans = Connection.Execute("@L65APST|Mask:PST" )
would return a recordset containing all the records in the GLPST transaction file.


Note: You should be familiar with Softrak's Dictionary tables before using Info and Mask


Other Examples:

Set TableList = Connection.Execute("SysTables")
would return a RecordSet containing TableName and TableDescription for all the tables from all Dictionaries that exist in \Softrak\Dict

Set TableList = Connection.Execute("SysTables|Range:@?65A")
would return a RecordSet containing TableName and TableDescription for all the tables that exist in the Dictionaries in \Softrak\Dict that match the range Wildcard.

Set TableList = Connection.Execute("SysTables|Range:@A65A:@D65A,@N???")
would return a RecordSet containing TableName and TableDescription for all the tables that exist in the Dictionaries in \Softrak\Dict that fall between @A65A and @D65A any all tables from Dictionaries that match the @N??? Wildcard.

Set CustList = Connection.Execute("@R65ACST|Range:AAAAAA:AZZZZZ, MC1000, DC????")
would return a RecordSet containing all records where the Customer Code fell between AAAAAA and AZZZZZ (all A's) and MC1000 and everyone that match DC????


Edited by Michael Mulrooney (10/10/06 06:41 PM)

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 147 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1872 Members
5 Forums
14527 Topics
70937 Posts

Max Online: 432 @ 01/20/25 10:17 PM
August
Su M Tu W Th F Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31