DBF Index Files and Dialect Core
Posted: Fri Aug 31, 2018 2:27 pm
Hi All,
I'm testing Vulcan DBF RDD trying using it in a WinForm Application.
I've created a simple test class in a DLL x86 only Dialect Vulcan (VulcanTest.dll):
If i use it from a Dialect Vulcan (both console and winform) application (x86) work fine, but in a Dialect Core application (x86) it's seem impossible open the index file (DBF file opens and is readable)
Reference:
VulcanRT
VulcanRTFuncs
VulcanVORDDClasses
VulcanVOSystemClasses
Anyone have a suggestion?
Regards
Gianluca
**********************************************************************************************************************
PRIVATE METHOD button1_Click(sender AS OBJECT, e AS System.EventArgs) AS VOID STRICT
local oClass AS ClassDBF
local sRet as string
oClass := ClassDBF{}
sRet :=oClass:GetDescrizione("0001009")
Messagebox.Show( sRet )
return
**********************************************************************************************************************
*********************************************************************************************
// ClassDBF.prg
// Created by : Gianluca
// Creation Date : 8/31/2018 3:19:01 PM
// Created for :
// WorkStation : NB-GIANLUCA
USING System
USING System.Collections.Generic
USING System.Text
BEGIN NAMESPACE VulcanTest
/// <summary>
/// The ClassDBF class.
/// </summary>
CLASS ClassDBF
CONSTRUCTOR()
RETURN
method GetDescrizione(sCodice as string) as STRING
local sRet := "" as string
LOCAL oDB as DBServer
local oFSIndex as FileSpec
oDB := DBServer{"C:GDOSHOPARCHIVI9ARTICOK.DBF",FALSE,TRUE,"DBFCDX"}
oFSIndex := FileSpec{ "ARTICOK.CDX" }
oFSIndex:Path := "C:GDOSHOPARCHIVI9"
if !oFSIndex:Find()
oDB:Close()
Return "File Indice non trovato"
endif
if !oDB:SetIndex(oFSIndex)
oDB:Close()
Return "Indice non Applicato"
endif
oDB:GoTop()
if !oDB:Seek("0001009")
oDB:Close()
Return "Articolo non trovato"
endif
sRet := (STRING)oDB:FIELDGET("CODICE") + " "+ (STRING)oDB:FIELDGET("DESCRIZIO")
oDB:Close()
return sRet
END CLASS
END NAMESPACE // VulcanTest
*********************************************************************************************
I'm testing Vulcan DBF RDD trying using it in a WinForm Application.
I've created a simple test class in a DLL x86 only Dialect Vulcan (VulcanTest.dll):
If i use it from a Dialect Vulcan (both console and winform) application (x86) work fine, but in a Dialect Core application (x86) it's seem impossible open the index file (DBF file opens and is readable)
Reference:
VulcanRT
VulcanRTFuncs
VulcanVORDDClasses
VulcanVOSystemClasses
Anyone have a suggestion?
Regards
Gianluca
**********************************************************************************************************************
PRIVATE METHOD button1_Click(sender AS OBJECT, e AS System.EventArgs) AS VOID STRICT
local oClass AS ClassDBF
local sRet as string
oClass := ClassDBF{}
sRet :=oClass:GetDescrizione("0001009")
Messagebox.Show( sRet )
return
**********************************************************************************************************************
*********************************************************************************************
// ClassDBF.prg
// Created by : Gianluca
// Creation Date : 8/31/2018 3:19:01 PM
// Created for :
// WorkStation : NB-GIANLUCA
USING System
USING System.Collections.Generic
USING System.Text
BEGIN NAMESPACE VulcanTest
/// <summary>
/// The ClassDBF class.
/// </summary>
CLASS ClassDBF
CONSTRUCTOR()
RETURN
method GetDescrizione(sCodice as string) as STRING
local sRet := "" as string
LOCAL oDB as DBServer
local oFSIndex as FileSpec
oDB := DBServer{"C:GDOSHOPARCHIVI9ARTICOK.DBF",FALSE,TRUE,"DBFCDX"}
oFSIndex := FileSpec{ "ARTICOK.CDX" }
oFSIndex:Path := "C:GDOSHOPARCHIVI9"
if !oFSIndex:Find()
oDB:Close()
Return "File Indice non trovato"
endif
if !oDB:SetIndex(oFSIndex)
oDB:Close()
Return "Indice non Applicato"
endif
oDB:GoTop()
if !oDB:Seek("0001009")
oDB:Close()
Return "Articolo non trovato"
endif
sRet := (STRING)oDB:FIELDGET("CODICE") + " "+ (STRING)oDB:FIELDGET("DESCRIZIO")
oDB:Close()
return sRet
END CLASS
END NAMESPACE // VulcanTest
*********************************************************************************************