Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
would it be possible to load data into msaccess tables by using Qlikview.
so, my requirement is every day morning the access tables data should delete the previous day data and refresh with current day data. would it be possible with any macro/ with out macro.
Please can anyone suggest me.
Thanks in advance.
Hi Amelia
As far as I am aware it is not possible to write to a database from Qlikview although there may be an extension that can manage it.
You can write back to databases in a couple of ways.
1. The script may issue SQL INSERT or UPDATE statements.
2. You can use a macro that uses and ADO or other database interface to write back using VBScript.
3. An extension -- I think there are some on the QlikMarket -- can write back from the UI using Javascript interfaces.
-Rob
Hi, There are some "tricks" like this one: Dynamic Update - Simple Database
that allow you to modify data after loading to QV. Also you may want to check a solution called KliqPlan, that basically is a set of tools within an extension that allow you to enter data directly in QlikView and then reload and integrate with your current model
www.ktlabs.com/
regards
What I do is export to Excel, data from a straight table or Pivot table, in a Macro I issue a command to open MSACCESS which I set to AutoExec and import the excel data.
Works like a charm (Even in a WorkGroup anviornment)
If you need more specific Macros etc please let me know and I will post.
Thanks. could you let me know what is the process you follow step by step please. If it works for me again as usual Qlikview will be a charm in my organisation.
Amelia here is how I do it;
(All is done in the VB Edit module (Macro) which can be activated in various ways from QlikView )
'EXPORT THE LIST/TABLE/CHART TO EXCEL
SaveToExcel "ChartOrTableNumberName", "\\Folder\Directory\Where\You\Want\To\Save.xls"
In Access I have previously created a link to the Excel sheet and created an append query which is automatically activated when the Access File Opens (I've set a default form to open and then I set OnOpen Method of the form to start the query) It then reads the Excel sheet and imports data to the database table(s)
To start Access after the export to Excel has been done I have a line calling a sub which I call StartAccess
Sub StartAccess
' *** Credits are to Daniel Pineault / CARDA Consultants Inc. who wrote the code for that
Dim sAcc
Dim sFrontEnd
Dim sSec
Dim sUser
Dim objShellDb
Dim sComTxt
Dim sPwd
' Specify the full Path of the MSACCESS executable
sAcc = "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" ' Your location may be different
' Specify the location of the filename you want to open
sFronEnd = "\\Your\File\Location\Path.accdb"
' If your database is secured by an mdw specify it, otherwise leave it blank
sSec = "\\Full\Path\To\System.mdw"
' If it is secured provide your name and password otherwise leave them blank
sUser = "UserName"
sPwd = "UsersPassword"
' ****************************
'You should not need to edit anything below this point
' ******************************
' Launch the database
Set ObjShellDB = CreateObject("WScript.shell")
' Build the command
sComTxt = chr(34) & sAcc & chr(34) &_
" " & chr(34) & sFronEnd & chr(34)
if isnull(sUser)=false and sSec<>"" then
sComTxt = sComTxt & " /user " & sUser & " /pwd " & sPwd
end if
objShellDb.run sComTxt ' This will launch the database
End sub
I also have set the database to Quit once the query was ran because I am interested only with the data being appended but you may want to keep it open. Your choice.
Regards
Josh
Thanks. when I used this it is showing 'syntax error'
can help me please?
Hi,
have you done this...
see attached picture...
Hope it helps.
André Gomes