My Woes worsen....
Posted: Mon Jun 17, 2019 7:08 am
by BiggyRat
Really? I don't see how. This is the ENTIRE app code.
METHOD Start() CLASS App
/* LOCAL oServer as DbServer
local aDBF as array
Local cDir
cDir := WorkDir() + "Invoices"
DirMake(cDir)
cDir := WorkDir() + "Filters"
DirMake(cDir)
cDir := WorkDir() + "Original Reports"
DirMake(cDir)
request dbfcdx
RddSetDefault("DBFCDX")
Set Decimals to 2
// Create Client Database and Indexes
aDBF := {}
AAdd(aDBF, {"ClCode", "C", 10, 0})
AAdd(aDBF, {"ClName", "C", 100, 0})
AAdd(aDBF, {"ClAdd1", "C", 100, 0})
AAdd(aDBF, {"ClAdd2", "C", 100, 0})
AAdd(aDBF, {"ClState", "C", 3, 0})
AAdd(aDBF, {"ClSuburb", "C", 50, 0})
AAdd(aDBF, {"ClPhone", "C", 10, 0})
AAdd(aDBF, {"ClPcode", "C", 4, 0})
AAdd(aDBF, {"ClABN", "C", 20, 0})
AAdd(aDBF, {"ClEmail", "C", 100, 0})
AAdd(aDBF, {"ClComments", "M", 10, 0})
DBCREATE("CLIENT", aDBF, "DBFCDX")
oServer := DbServer{"Client"}
oServer:CreateOrder("CLCode", "Client","CLCode",,.T.)
oServer:CreateOrder("CLName", "Client", "ClName")
oServer:CreateOrder("ClState", "Client", "ClState")
oServer:CreateOrder("CLPcode", "Client", "ClPCode")
oServer:Commit()
oServer:Close()
//Create Details Database and Indexes
aDBF := {}
AAdd(aDBF, {"ClCode", "C", 10, 0})
AAdd(aDBF, {"ClName", "C", 100, 0})
AAdd(aDBF, {"JobDate", "D", 10, 0})
AAdd(aDBF, {"JobFin", "L", 1, 0})
AAdd(aDBF, {"JobTime", "C", 10, 0})
AAdd(aDBF, {"JobDetails", "M", 10, 0})
AAdd(aDBF, {"NPC", "M", 10, 0})
AAdd(aDBF, {"JobNumber", "C", 5, 0})
AAdd(aDBF, {"PONumber", "C", 15, 0})
AAdd(aDBF, {"Rate", "N", 10, 2})
AAdd(aDBF, {"Units", "N", 10, 2})
AAdd(aDBF, {"RateType", "C", 15, 0})
AAdd(aDBF, {"Subby", "C", 50, 0})
AAdd(aDBF, {"Rego", "C", 50, 0})
AAdd(aDBF, {"Invoiced", "L", 1, 0})
AAdd(aDBF, {"InvFile", "C", 250, 0})
AAdd(aDBF, {"MapFile", "C", 250, 0})
DBCREATE("Details", aDBF, "DBFCDX")
oServer := DbServer{"DETAILS"}
oServer:CreateOrder("CLCode", "Details", "CLCode" )
oServer:CreateOrder("CLNTrim", "Details", "Alltrim(CLCode) + ' ' + Alltrim(CLNAME)" )
oServer:CreateOrder("JobDate", "Details", "JobDate")
oServer:CreateOrder("JobFin", "Details", "JobFin")
oServer:CreateOrder("JobNumber", "Details", "JobNumber")
oServer:CreateOrder("PONumber", "Details", "PONumber",, .T.)
oServer:CreateOrder("Subby", "Details", "Subby",, .T.)
oServer:CreateOrder("Rego", "Details", "Rego")
oServer:CreateOrder("Invoiced", "Details", "Invoiced")
oServer:CreateOrder("InvFile", "Details", "InvFile")
oServer:CreateOrder("MapFile", "Details", "MapFile")
oServer:Commit()
oServer:Close()
//Create JobNumber Database
aDBF := {}
AAdd(aDBF, {"JobNumber", "N", 5, 0})
DBCREATE("JobNo", aDBF, "dbfcdx")
oServer := DbServer{"JobNo"}
oServer:CreateOrder("JobNumber", "JobNo","JobNumber")
oServer:APPEND()
oServer:FIELDPUT(#JobNumber, 0)
oServer:Commit()
oServer:Close()
// Create Rates Database and Indexes
aDBF := {}
AAdd(aDBF, {"RateType", "C", 10, 0})
DBCREATE("Rates", aDBF, "DBFCDX")
oServer := DbServer{"RATES"}
oServer:APPEND()
oServer:FIELDPUT(#RateType, "Each")
oServer:APPEND()
oServer:FIELDPUT(#RateType, "Hourly")
oServer:APPEND()
oServer:FIELDPUT(#RateType, "Quoted")
oServer:APPEND()
oServer:FIELDPUT(#RateType, "Zone")
oServer:Commit()
oServer:Close()
// Create Trucks Database and Indexes
aDBF := {}
AAdd(aDBF, {"TruckType", "C", 15, 0})
DBCREATE("Trucks", aDBF, "DBFCDX")
oServer := DbServer{"TRUCKS"}
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "HIAB")
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "FT")
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "DD")
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "DDE")
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "TILT")
oServer:APPEND()
oServer:FIELDPUT(#TruckType, "DDH")
oServer:Commit()
oServer:Close()
// Create Configuration File Database
aDBF := {}
AAdd(aDBF, {"FromEmail", "C", 100, 0})
AAdd(aDBF, {"TermDays", "N", 3, 0})
AAdd(aDBF, {"EOM", "N", 3, 0})
AAdd(aDBF, {"CLName", "C", 100, 0})
AAdd(aDBF, {"ABN", "C", 15, 0})
AAdd(aDBF, {"Add1", "C", 100, 0})
AAdd(aDBF, {"Add2", "C", 100, 0})
AAdd(aDBF, {"Suburb", "C", 50, 0})
AAdd(aDBF, {"State", "C", 3, 0})
AAdd(aDBF, {"Pcode", "C", 4, 0})
AAdd(aDBF, {"Phone1", "C", 20, 0})
AAdd(aDBF, {"Email", "C", 100, 0})
AAdd(aDBF, {"TandC", "M", 10, 0})
DBCREATE("BMConfig", aDBF, "DBFCDX")
// Create Costings Database and Indexes
aDBF := {}
AAdd(aDBF, {"JobNumber", "C", 5, 0})
AAdd(aDBF, {"JobDate", "D", 10, 0})
AAdd(aDBF, {"ClCode", "C", 10, 0})
AAdd(aDBF, {"ClName", "C", 100, 0})
AAdd(aDBF, {"JobTime", "C", 10, 0})
AAdd(aDBF, {"Rate", "N", 10, 2})
AAdd(aDBF, {"Units", "N", 10, 2})
AAdd(aDBF, {"S1", "C", 10, 0})
AAdd(aDBF, {"S2", "C", 10, 0})
AAdd(aDBF, {"S3", "C", 10, 0})
AAdd(aDBF, {"S4", "C", 10, 0})
AAdd(aDBF, {"S5", "C", 10, 0})
AAdd(aDBF, {"S6", "C", 10, 0})
AAdd(aDBF, {"S7", "C", 10, 0})
AAdd(aDBF, {"S8", "C", 10, 0})
AAdd(aDBF, {"S9", "C", 10, 0})
AAdd(aDBF, {"S10", "C", 10, 2})
AAdd(aDBF, {"SV1", 'N', 10, 2})
AAdd(aDBF, {"SV2", 'N', 10, 2})
AAdd(aDBF, {"SV3", 'N', 10, 2})
AAdd(aDBF, {"SV4", 'N', 10, 2})
AAdd(aDBF, {"SV5", 'N', 10, 2})
AAdd(aDBF, {"SV6", 'N', 10, 2})
AAdd(aDBF, {"SV7", 'N', 10, 2})
AAdd(aDBF, {"SV8", 'N', 10, 2})
AAdd(aDBF, {"SV9", 'N', 10, 2})
AAdd(aDBF, {"SV10", 'N', 10, 2})
AAdd(aDBF, {"R1", "C", 10, 0})
AAdd(aDBF, {"R2", "C", 10, 0})
AAdd(aDBF, {"R3", "C", 10, 0})
AAdd(aDBF, {"R4", "C", 10, 0})
AAdd(aDBF, {"R5", "C", 10, 0})
AAdd(aDBF, {"R6", "C", 10, 0})
AAdd(aDBF, {"R7", "C", 10, 0})
AAdd(aDBF, {"R8", "C", 10, 0})
AAdd(aDBF, {"R9", "C", 10, 0})
AAdd(aDBF, {"R10", "C", 10, 0})
AAdd(aDBF, {"RV1", "N", 10, 2})
AAdd(aDBF, {"RV2", "N", 10, 2})
AAdd(aDBF, {"RV3", "N", 10, 2})
AAdd(aDBF, {"RV4", "N", 10, 2})
AAdd(aDBF, {"RV5", "N", 10, 2})
AAdd(aDBF, {"RV6", "N", 10, 2})
AAdd(aDBF, {"RV7", "N", 10, 2})
AAdd(aDBF, {"RV8", "N", 10, 2})
AAdd(aDBF, {"RV9", "N", 10, 2})
AAdd(aDBF, {"RV10", "N", 10, 2})
AAdd(aDBF, {"T1", "C", 10, 0})
AAdd(aDBF, {"T2", "C", 10, 0})
AAdd(aDBF, {"T3", "C", 10, 0})
AAdd(aDBF, {"T4", "C", 10, 0})
AAdd(aDBF, {"T5", "C", 10, 0})
AAdd(aDBF, {"T6", "C", 10, 0})
AAdd(aDBF, {"T7", "C", 10, 0})
AAdd(aDBF, {"T8", "C", 10, 0})
AAdd(aDBF, {"T9", "C", 10, 0})
AAdd(aDBF, {"T10", "C", 10, 2})
AAdd(aDBF, {"TV1", 'N', 10, 2})
AAdd(aDBF, {"TV2", 'N', 10, 2})
AAdd(aDBF, {"TV3", 'N', 10, 2})
AAdd(aDBF, {"TV4", 'N', 10, 2})
AAdd(aDBF, {"TV5", 'N', 10, 2})
AAdd(aDBF, {"TV6", 'N', 10, 2})
AAdd(aDBF, {"TV7", 'N', 10, 2})
AAdd(aDBF, {"TV8", 'N', 10, 2})
AAdd(aDBF, {"TV9", 'N', 10, 2})
AAdd(aDBF, {"TV10", 'N', 10, 2})
AAdd(aDBF, {"TotalS", "N", 10, 2})
AAdd(aDBF, {"TotalR", "N", 10, 2})
AAdd(aDBF, {"TotalT", "N", 10, 2})
DBCREATE("Costings", aDBF, "DBFCDX")
oServer := DbServer{"COSTINGS"}
oServer:CreateOrder("JobNumber", "Costings", "JobNumber")
oServer:CreateOrder("CLCode", "Costings", "CLCode" )
oServer:CreateOrder("JobDate", "Costings", "JobDate")
oServer:Commit()
oServer:Close()
FCopy("BMInvoice.rpt", cDir + "BMInvoice.rpt")
FCopy("Blank Invoice.rpt", cDir + "Blank Invoice.rpt")
FCopy("JobNumber.rpt", cDir + "JobNumber.rpt")
FCopy("JobList.rpt", cDir + "JobList.rpt")
FCopy("WorkSheet.rpt", cDir + "WorkSheet.rpt")
FCopy("Client Details.rpt", cDir + "Client Details.rpt")
*/
self:Quit()
Return self
So I did as you suggested Johan, and I got this rather helpful error... see attached...
btw, THE entire ERROR LOG FILE CONTAINS THE FOLLOWING....
******************************************************************************
Date/Time: 2019-06-17 16:19:43
Version : Visual Objects 2.8 SP4b build 2838
Error : An unhandled exception (0xC0000005) occurred inside module:
: C:cavo28BinCAVOPP.DLL at 0x074BF2CC
Registers: EAX = 0x00000000 EBX = 0x0000002C ECX = 0x00000D90 EDX = 0x00000000
: ESI = 0x00000006 EDI = 0x074D5540 ESP = 0x013DC0E8 EBP = 0x013DC0E8
******************************************************************************
Date/Time: 2019-06-17 17:10:12
Version : Visual Objects 2.8 SP4b build 2838
Error : An unhandled exception (0xC0000005) occurred inside module:
: C:cavo28Bincavo28.exe at 0x00000000
Registers: EAX = 0x015DBA8C EBX = 0x0E359C6C ECX = 0x775A1CBC EDX = 0x015DBAA0
: ESI = 0x0E351384 EDI = 0x00000740 ESP = 0x015DBA54 EBP = 0x096B0DA0