Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a couple of ways to connect to access database. One is to use odbc and another one is to use oledb. I have two access database files inside the same folder which has qlikview report accessing these access db file
What I would like to do is create a connection that points to the access files in the same directory and if I move the whole folder to another machine, I don't need to create a manual connection to the database files. I want the same connection string to pickup data form the access database files because I had already create a connection inside qlikview script.
Can someone please guide me what will the best way to do this. Creating an odbc connection will need me to create the same name connection on the other machine
Regards
Arif
you can use an include file to reduce maintenance when you move access database; in bold the statement you have to change when you move the db
in the script
DIRECTORY;
$(Must_Include=accessconn.inc);
OLEDB CONNECT32 TO $(vAccessConn);
in the include (accessconn.inc)
trace *****START INCLUDE;
set vAccessFolder='C:\Users\mgrossi\Desktop\@ QV WRK';
let vAccessConn = '[Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;' &
'Data Source=$(vAccessFolder)\access test.mdb;Mode=Share Deny None;Extended Properties="";' &
'Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;' &
'Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;' &
'Jet OLEDB:New Database Password=""; Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;' &
'Jet OLEDB:Don''t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False];';
trace $(vAccessFolder);
trace $(vAccessConn);
trace *****END INCLUDE;