Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Script error help

Hi all,

i am getting a script error which i am having trouble resolving. i dont get this error on server A but we have just moved to a brand new server and i am now getting this error.

08/03/2016 14:52:55: 0090      CONCATENATE(SCADAFile)

08/03/2016 14:52:55: 0091       LOAD 'E:\VeoliaData\SCADA Data\MacDuff\DLGLOG\bankhead ps\2016 01 01 0000 (Wide).DBF' as [SCADA File Loaded],

08/03/2016 14:52:55: 0092       num(Date)+num(Time) as DateTime_Raw,

08/03/2016 14:52:55: 0093       num(Date)+num(Time) as DateTime_Raw1,

08/03/2016 14:52:55: 0094       [0] as [1]

08/03/2016 14:52:55: 0095      SQL SELECT Date,Time,`0`

08/03/2016 14:52:55: 0096       FROM `..\..\..\VeoliaData\SCADA Data\MacDuff\DLGLOG\bankhead ps`\`2016 01 01 0000 (Wide).DBF`

08/03/2016 14:52:56:           Error: SQL##f - SqlState: S0002, ErrorCode: 4294965991, ErrorMsg: [Microsoft][ODBC dBASE Driver] The Microsoft Access database engine could not find the object '2016 01 01 0000 [Wide].DBF'. Make sure the object exists and that you spell its name and the path name correctly. If '2016 01 01 0000 [Wide].DBF' is not a local object, check your network connection or contact the server administrator.

08/03/2016 14:52:56: 0098      DISCONNECT

08/03/2016 14:52:56: 0099    NEXT file

it says that the file doesnt exist but when looking in the folder i can see the file. what i have noticed is that on line 0091 the file is loaded in and the file itself is 2016 01 01 0000 (Wide).DBF but the error message has the file name as 2016 01 01 0000 [Wide].DBF - it has square brackets, so i assume this is the problem. i just dont understand why its correct when loaded in (0091) but incorrect in the error.

can anyone help?

my script is.

LET Data = chr(96) & '$(vDirectory)' & chr(96) & '\' & chr(96) & Subfield(GetShortName('$(file)'),'\',-1) & chr(96);// use short name to get around ODBC driver issue

ODBC CONNECT32 TO [DBF Driver];

  // Load required fields from DBF file

  CONCATENATE(SCADAFile)

  LOAD '$(file)' as [SCADA File Loaded],

  num(Date)+num(Time) as DateTime_Raw,

  num(Date)+num(Time) as DateTime_Raw1,

  $(vFieldAlias);

  SQL SELECT $(vSQLFields)

  FROM $(Data);

  DISCONNECT;

  NEXT file

11 Replies
swuehl
MVP
MVP

Well, I would definitely look into this direction next, i.e. check why the macro is not returning the short name.

Maybe someone followed

Server 2012: Best Practice – Disable short file name creation | IT-Notes

I would suggest that you get together with the server admin to see how you can resolve the issue.

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

oh ok, i didnt realize you could disable that.

thats my next step then

Thanks very much