>>>You stated you used the following syntax:
>>>
>>>sParams = "Do LoadData With " + sSourceFile + ", " + sDataPath + ", " + sTableName
>>>.DoCmd (sParams)
>>>
>>>I don't see how the above code ever worked since LoadData is a method. Try the following syntax from VB:
>>> oFox.LoadData(sSourceFile,sDataPath,sTableName)
>>>
>>>Murray
>>
>>
>>
>>If you have additional suggestions I'll be appreciative.
>>
>>Thanks
>>
>>Jim
>
>Personally I find Auto Syntax checking quite annoying.
>If you want to you can turn it off. From the "Tools: pulldown menu select "Options", then from the editor tab of the options dialog turn off auto syntax check.
>
>As for the error, sorry my oversight, Try
> oFox.LoadData sSourceFile,sDataPath,sTableName
>since LoadData doesn't return a value and also make sure sDataPath is initialized to something.
>
>Murray
'Got around the syntax checking by using the following:
sSourceFile = sSourcePath + "\MODE2.DAT"
sTableName = "mode2"
sParams = sSourceFile + ", " + sDataPath + ", " + sTableName
.LoadData sParams
Compiles and loads the object then fails with the following message:
"f:\temp\pave\foxprofi\ctablename.dbf does not exist"
The path indicated is correct; however, in this case it is also the default
path for my current FoxPro runtime. The "ctablename" shown is the literal name of the parameter I was trying to pass. Setting watches in VB all the variables on that side of the operation are initalizing correctly. It was because of this that I added the "PARAMETERS" command (and that was after I had tried "LPARAMETERS").
Have gone through the ON-LINE docs and have not found a direct corelation to this situation; but it can't be that rare a situation.
BTW This project is the first time I've used VFP for a commercial project. If I can get past the syntax learning curve I believe I'm going to like it. Speed has been great. I'm curious about how it would hold up as the server end of a mid-sized client server system. The price is certainly right.
Again, I appreciate the time. I'm going to battle with this another hour or so, then I'm goin to kick back and relax for an hour or two before declaring it to be "tomorrow".
Jim
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement