Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Updating data in an oracle database

I am trying to update(write) data back to our oracle database through a macro in qlikview. ActiveX is highly regulated in our enviroment and the ADO approach cannot be used. This is the code I am trying to use is

sub connectDB
Dim db
Dim ws,rs,strConnection
Set ws=DBEngine.Workspaces(0)
set strConnection="ODBC;DATABASE=Databasename ;UID=UserId ;PWD=Password ;DSN=DSNName "
set db=OpenDatabase("DSNName ",False,False,strConnection)
'strSQLQuery="SELECT * FROM tablename where fieldname=filter "
'set rs=db.openrecordset(strSQLQuery)
'str=rs("NAME")
'ActiveDocument.GetVariable("vdeleteAC").setContent str,false
end sub

Using DAO to make the connection throws the following errors..

1. Type mistmatch at the opendatabase line in the code.

2. Object required - 'DBEngine' at the createworkspace line in the code.

I don't know much about VBScript and would appreciate any suggestion to help connect to the database.

Thanks

2 Replies
Not applicable
Author

In my experience, when the costumer needs to do something in the BD enviroment, and the costumer has Publisher, i suggest start using DbCommand supporting task to do that kind of things.

Not applicable
Author

Thanks Fabian for your prompt response. I'll look into the Publisher and DBCommand suggestion to solve my issue.