General information
Title:
Passing parameters from VB to VFP ActiveX server
I am currently building a Visual Basic 5.0 application that needs to access (and load data into) a runtime VFP 5.0 database. I had this running with no problem against VFP application. Since moving it to the runtime module I've been unable to get the server to accept the parameters I'm passing it. I'm sure I'm overlooking something simple, but any pointers would be appreciated.
My current code looks something like this:
Code from VFP 5.0 that creates class
DEFINE CLASS WeaponData AS CUSTOM OLEPUBLIC
PROCEDURE LoadData (cSourceFile, cDataPath, cTableName)
PARAMETERS cSourceFile, cDataPath, cTableName
Set Path To cDataPath
Use cTableName
APPEND FROM cSourceFile TYPE DELIMITED
ENDPROC
ENDDEFINE
// Code from form module of VB 5.0 application that calls server
Option Explicit
Dim sDataPath As String
Dim oFox As Object
Dim sSourcePath As String
Private Sub cmdImport_Click()
Dim strOpen As String
Dim sSourceFile As String, sTableName As String, sParams As String
Screen.MousePointer = vbHourglass
With oFox
sSourceFile = sSourcePath + "\MODE2.DAT"
sTableName = "mode2"
sParams = "Do LoadData With " + sSourceFile + ", " + sDataPath + ", " + sTableName
.DoCmd (sParams)
sSourceFile = sSourcePath + "\MODE3.DAT"
sTableName = "mode3"
.DoCmd (sParams)
sSourceFile = sSourcePath + "\MODE4.DAT"
sTableName = "mode4"
.DoCmd (sParams)
End With
Set oFox = Nothing
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Load()
Dim strOpen As String
Set oFox = CreateObject("weapondata.WeaponData")
End Sub
This needs to run unattended as the live data files will be large (about 400M) and the import process will require several hours.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only