Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters from VB to VFP ActiveX server
Message
From
20/11/1997 15:47:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Passing parameters from VB to VFP ActiveX server
Miscellaneous
Thread ID:
00061455
Message ID:
00061455
Views:
72
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
Map
View

Click here to load this message in the networking platform