jet engine substitutes "#" instead of "." ???

Happy YN

Registered User.
Local time
Today, 20:47
Joined
Jan 27, 2002
Messages
425
I am doing a transfertext
I am using a variable TempNow to specify a path ending in ".csv"
tempNow = appPath & "config\cdms" & tempNow & Chr(46) & "csv"
In the immediate screen I see the fullpath correctly i.e ends with .csv
However when running it I receive an error to check valid path etc of "#csv"
i.e it is substituting a hash instead of a full stop. How can I cure this?
The strangest thing is that I have tested identical code in previous version and it runs fine , putting in the full stop, so why does it now put in a #?? I repeat in the immediate window everything looks fine?
Thanks
 
try...

tempNow = appPath & "config\cdms" & tempNow & ".csv"
 
Have already tried it -idntical error thanks
Have now decided maybe my export specification may be invalid since some fildnames have changed
So although I can easily make a new spec, how can I set it to always include the right fieldnames?
I am reading about creating a schema.ini on the fly anyone had any success in this?
Thanks
 
After looking at your string cocatenation,

appPath & "config\cdms" & tempNow & Chr(46) & "csv"

I see where you are getting your error.

A string signifying a filepath must be created very carefully. A missing slash will cause an error such as the one you have.

Let's say tempNow is called "MyData", and the app path is "C:\Program Files".

Your string would cocatenate to

C:\Program Filesconfig\cdmsMydata.csv

Try this:

Iif(right(appPath,1) = "\", appPath, appPath & "\") & _
"config\cdms\" & tempNow & chr(46) & "csv"

That will cocatenate to:

C:\Program Files\config\cdms\MyData.csv

That should give you the correct filepath syntax.
 
Transfertext using schema

Thanks but that does not seem to be the problem.
as I wrote the problem is that another field had been added which was not included in the export specification used.
I have now got a create schema function which runs just prior to the transfertext. however I don't seem able to use this schema as a spec?
Anyone know the correct syntax for including a schema in a transfertext?
Thanks
 

Users who are viewing this thread

Back
Top Bottom