PdbWizardDev.Converter 

 

Prepare

 
Sub Prepare Prepares the Activex for first use
Parameters None     
Use Only once for each instance of the activex,  better in form load
EXAMPLE
myactivex.Prepare 
 

DataToSF_Pdb

 
Function DataToSF_Pdb Converts Pc data files to SF pdb's
Parameters Data_Base_Name  String Input Data File Name
Table_Query_Name String Input Table or query
PdbFileName String Exact name and place of the output file
CreatorID String Creator ID of the PDB
SfVersion  Number Version of the output pdb file

SF_31_Standart = 30
SF_31_Enterprise = 31
SF_35_Standart = 34
SF_35_Enterprise = 35
SF_40_Enterprise = 40
SF_50_Enterprise = 40

INK_FIELD_NAME String If there is an Ink field that will be converted back to Pdb the neame of the field, if not empty
EXAMPLE
For MDB

Dim A
A = Converter1.DataToSF_Pdb("C:\0\DEMO.MDB", "SFTable", "C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_50_Enterprise, "BUD_AUTO") ' !!!! with inkfield

A = Converter1.DataToSF_Pdb("C:\0\DEMO.MDB", "SFTable", "C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_50_Enterprise, "")

For DBF Tables

Important : with the path and name of the table

IF the dbf table is

C:\DATA\USERS.DBF

THEN

A = Converter1.DataToSF_Pdb("C:\DATA\USERS.DBF", "USERS", "C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_50_Enterprise, "BUD_AUTO") ' !!!! with inkfield

A = Converter1.DataToSF_Pdb("C:\DATA\USERS.DBF", "USERS", "C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_50_Enterprise, "")

 

For ODBC

A =Converter1.DataToSF_Pdb("ODBC;Driver=Microsoft SQL Server;Server=PENT;UID=palmuser;PWD=pdatec;Database=PALM_DATA;", "SELECT * FROM USERS","C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_40_Enterprise,"BUD_AUTO") ' !!!! with inkfield

A =Converter1.DataToSF_Pdb("ODBC;Driver=Microsoft SQL Server;Server=PENT;UID=palmuser;PWD=pdatec;Database=PALM_DATA;", "SELECT * FROM USERS", "C:\A\ESMSF0000_TDEMO.PDB", "SMSF", SF_40_Enterprise)

 

 

PdbToFile

 
Function PdbToFile COnverts Pdb Files to Pc Files
parameters PdbFile String input - Filename of the pdb 
PcFile  String Output filename( can be .mdb,.dbf,.txt)
ReadDeleted  Boolean IF true then Reads also the deleted records
CreateStatusField  Boolean IF true Then creates an extra field with Record State
EXAMPLE
A = Converter1.PdbToFile("C:\A\ESMSF0000_TDEMO.PDB","C:\0\TDEMO.mdb")

 

PcDataFileToAFPdb 

 
Function PcDataFileToAFPdb  Converts Pc data files to Appforge pdb's
Parameters Data_Base_Name  String Input Data File Name
Table_Query_Name String Input Table or query
PdbFileName String Exact name and place of the output file
CreatorID String Creator ID of the PDB
EXAMPLE
Dim A
A = Converter1.PcDataFileToAFPdb ("C:\0\DEMO.MDB", "SFTable", "C:\A\DEMO.pdb", "SMSF")
 

ForgePdbToFile

 
Function ForgePdbToFile Converts Appforge Pdb Files to Pc Files
parameters PdbFile String input - Filename of the pdb 
PcFile  String Output filename( can be .mdb,.dbf,.txt)
EXAMPLE
A = Converter1.PdbToFile("C:\A\DEMO.pdb","C:\0\BDEMO.mdb")

 

 

ZipPalmFile

 
Function ZipPalmFile Zips Pdb Files
parameters PdbFile String input - Filename of the pdb 
Destination Path  String Output filen destination,if not given then the same Path
EXAMPLE
A = Converter1.PdbToFile("C:\0\DEMO.pdb")
 

Error List

 
NoError = 0
NoPath = 1
PathIsRootFolder = 2
PathNotFound = 3
FileNotFound = 4
FileNameNotGiven = 5
FileNameNotAllowed = 6
WrongFileType = 7
FileTypeNotSupportedYet = 8
PdbFilenameMustBeGiven = 9
ClientNotConnected = 10
ClientWinSockError = 11
ClientClosingConnection = 12
FileDeleteConfirmationError = 15
NoMessage = 16
ConfirmationError = 17
InkFieldNameMisses = 18
CannotCreateTmpDatabase = 19
InputFilenameProblem = 20
CannotOpenODbcDatabase = 21
SfWrongCreatorID = 100
DatabaseError = 200
Pdb_FileTypnot_table = 201
PdbFileCorrupt = 202
CannotCreateDatabase = 203
CannotCreateTabledef = 204
CannotCreatePdbFile = 205
Pdb_FileTypnot_SF = 206
NotSFMdbTable = 208
ZipError = 209
DbfErr = 1000
DbfErrMemo = 1001
DbfErrRecordNotAllowed = 1002
DbfErrSystem = 1003
CommandListFull = 2002
CannotCreateAppForgeLibrary = 4001
SystemLe = 9154
UndefinedSystemErr = 9999
 

 

 

PdbWizardDev.PdbData

 

OpenPdbDatabase

 
Function OpenPdbDatabase Opens a pdb as a recordset
Parameters PdbFilename  String Input Pdb File Name (only Sat forms )
Returns   Error if can not open database
EXAMPLE
Dim A
A = OpenPdbDatabase("C:\A\ESMSF0000_TDEMO.PDB") 
 

ClosePdbDatabase

 
Function ClosePdbDatabase Closes pdb recordset and Updates the pdb file
Parameters SaveChanges  Bool If true then saves the changes to pdb file
  InkField (optional) String If there is an inkfield then will be converted back to palm formaT
  ChangePdbType (optional) Integer if set then will change the format of the SF version of the pdb file
  ChangeCreatorID(optional)  String if set then will change the Creator ID of the pdb file
  ChangePdbFilename(optional) String if set then will change the name of the pdb file
Returns   Error if can not save the recordset
EXAMPLE
Dim A
A = ClosePdbDatabase(true) 
 

PdbRs

 
Property PdbRs Recordset object
after opening the pdb file can be used to retrieve data,move ,save addnew etc
nearly all the possibilities of a dao.recordset
EXAMPLE  
PdbRs.movefirst

PdbRs.edit

PdbRs("NAME")="AAA"

PdbRs.update

PdbRs.addnew

etc..

 

PdbWizardDev.InkToBitmap

 

INKpicture 

 
Propety INKpicture  Shows INK as bitmap
Type String     
     
EXAMPLE
Dim A

A=myPdbdata.PdbRs("PICTURE")
mypicture.INKpicture =A

Att: will only show INK data that is converted using the PdbToFile function

 

SaveToBmp

 
Function SaveToBmp Saves INK as bitmap file
Parameters Bmpfilename  String  
     
EXAMPLE
mypicture.SavetoBmp "C:\AA\Mypicture.bmp"

 

Zoom 

 
Propety Zoom   Zooms the INK picture
Type integer    1,2,3 X 100-200-300 %
     
EXAMPLE

mypicture.Zoom =2

 

Prepare

 
Sub Prepare Prepares the Activex for first use
Parameters None   
Use Only once for each instance of the activex,  better in form load
EXAMPLE
mypicture.Prepare