I am trying to import a text file using dbimport() I am first trying to load the deldbe as follows.
DBELOAD( "DELDBE" )
What in the heck am doing wrong. The deldbe.dll file is in the same directory so I know it can find it.
I have include statements for dll.ch, deldbe.ch along with every other .ch I can find.
I get the following error.
ERROR OBJECT:
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: C VALUE: DELDBE
oError:canDefault : Y
oError:canRetry : N
oError:canSubstitute: N
oError:cargo : NIL
oError:description : Invalid DLL name for DBE
oError:filename :
oError:genCode : 52
oError:operation : DbeLoad
oError:osCode : 0
oError:severity : 2
oError:subCode : 8009
oError:subSystem : BASE
oError:thread : 4
oError:tries : 0
Any help would be appreciated.
Bob Volz
Loading deldbe
Re: Loading deldbe
Hi Bob,
Look at Roger's example in Samples\Csv. I used this as a jump off point for my import routines and it works very well.
If there is anything specifically which I can assist you with, please let me know.
Best regards,
Rick
Look at Roger's example in Samples\Csv. I used this as a jump off point for my import routines and it works very well.
If there is anything specifically which I can assist you with, please let me know.
Best regards,
Rick
Re: Loading deldbe
Thanks Rick
I will try it out.
I will try it out.
Re: Loading deldbe
Bob -
You may find that the DELDBE is already loaded if you are linking in DCLIP1.LIB to your app because this loads all the Dbes in an INIT PROC. Xbase++ gives an error if you try to load a DBE more than once.
You may also try DbeLoad("DELDBE',.F.)
I always use the 2nd parameter.
Roger
You may find that the DELDBE is already loaded if you are linking in DCLIP1.LIB to your app because this loads all the Dbes in an INIT PROC. Xbase++ gives an error if you try to load a DBE more than once.
You may also try DbeLoad("DELDBE',.F.)
I always use the 2nd parameter.
Roger
The eXpress train is coming - and it has more cars.
Re: Loading deldbe
Thanks Roger and Rick;
I took Rick's advice and tried the csvimp program from the samples\csv directory. It works great with one exception. It will not import the csv file I am getting directly from the internet. I first have to go into excel and save the csv file as a 'dos csv' file for the cdvimp program to read it. I don't know why. The files look identical. I put some tracer code in the import function and it does open the file and get a handle but it does not import the records from a file directly downloaded. Have you ever encountered that.?
The csvimp program is going to be a big help. Thank you Roger and Rick.
I took Rick's advice and tried the csvimp program from the samples\csv directory. It works great with one exception. It will not import the csv file I am getting directly from the internet. I first have to go into excel and save the csv file as a 'dos csv' file for the cdvimp program to read it. I don't know why. The files look identical. I put some tracer code in the import function and it does open the file and get a handle but it does not import the records from a file directly downloaded. Have you ever encountered that.?
The csvimp program is going to be a big help. Thank you Roger and Rick.
Re: Loading deldbe
Hi Bob,
If Rick is correct (yes, can happen
), maybe the following can help.
If Rick is correct (yes, can happen

Code: Select all
...
abomemowrite("filename.csv",memoread("filename.csv"))
...
function abomemowrite(cTargetFile,cBuffer)
******************************************
Local nTarget := FCreate( cTargetFile, FC_NORMAL )
if nTarget == -1
return .F.
else
FWrite( nTarget, cBuffer)
FClose(ntarget)
endif
return .T.
Re: Loading deldbe
Thanks Chris, I will try that. Roger was right as well. I took out the dbeload and the dbimport works fine.
Thank you all. The beers on me next time we meet. Hopefully soon.
Bob Volz
Thank you all. The beers on me next time we meet. Hopefully soon.
Bob Volz