Discussion Board for collaboration related to QlikView App Development.
Currently I have this issue where I need to put an ODBC connection like the following:
ODBC CONNECT32 TO [Excel Files;DBQ=C:\Users\Documents\Proyect\File.xlsx];
I constantly need to change the location of the file so I have to change the absolute path to relative to work. So far relative paths seem not to work with ODBC connections.
Does anybody know any way to make an ODBC connection work with relative path?
I would use a variable and then change the variable and use $-sign expansion:
// - 1 means up one level .... -2 would mean up two levels:
vPath = Left( DocumentPath() , FindOneOf( DocumentPath() , '\' , SubStringCount( DocumentPath() , '\' ) -1 ) );
LEFT vFile = file1.xlsx';
ODBC CONNECT32 TO [Excel Files;DBQ=$(vPath)$(vFile)];
you can push the file path to a text file and you the same in variable so that it will be easy to maintain and update