Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

How can i read from a qvd the fields and store the data into an oracle table

Hello.

A few days ago i found the solution how to insert data from an input box into an oracle table with the vbscript module below.

sub oracle

set myStore = ActiveDocument.Variables("STORE")

insStore = myStore.GetContent.String

set mySales = ActiveDocument.Variables("SALES")

insSales = mySales.GetContent.String

set db = CreateObject("ADODB.Connection")

db.open "DSN=xxx;UID=xxx;PWD=xxx"

set Orderfile = db.execute("INSERT INTO QLIKVIEW3 (STORE, SALES) VALUES (' " & insStore & " ', ' " & insSales & " ');")

set Orderfile = db.execute("COMMIT;")

db.Close

end sub

Now i'm trying to find how can i store the data that the fields of a qvd have into an oracle table with the script below but does not pass.

sub oracle

set myStoreid = ActiveDocument.Fields("STORE_ID")

set mySalesid = ActiveDocument.Fields("SALES_ID")

set db = CreateObject("ADODB.Connection")

db.open "DSN=xxx;UID=xxx;PWD=xxx"

set Orderfile = db.execute("INSERT INTO QLIKVIEW4 (STORE, SALES) VALUES (' " & myStoreid & " ', ' " & mySalesid & " ');")

set Orderfile = db.execute("COMMIT;")

db.Close

end sub

Has anyone any idea how this can be done ?

Thank you in advance.

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Please don't post the same question more than once: How can i read from a qvd the fields and store the data into an oracle table


talk is cheap, supply exceeds demand