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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inserting data into a database

Hy!

I would like to know, if there is a possibility to insert a new record (data) into existing database through some kind of a form in Qlikview Sheet (I am connected to the Access DB)?

So, I would like to create a form in Qlikview Sheet (with data fields in which I could enter desired values) and then when I would click on button insert, this record would be inserted into my database that I'm connected to through Qlickview...

Please help me, thanks!

11 Replies
Not applicable
Author

So, I have a project named 'Music'. I want to add new musician ('mname') into a table 'Musician' through the input box... Can You please help me? Do You need any other data? Thanks!!

baratiram
Contributor
Contributor

hi,

I am trying to insert a record into database on click of a button. 

I tried to do using the macro inside the Button- actions with vb script. But I couldn't connect to the database. If you have any sample files please share.


sub writeback ()
dim sServer, sConn, oConn,oRS
sServer="servername"
Set oConn = CreateObject("ADODB.Connection")
oConn.open("provider=SQLOLEDB.1; Data Source='xxxxxx'; Initial catalog=xxxxxx; User ID='xxxxxxx'; password='xxxxxx'")
'Set oConn = CreateObject("ADODB.Connection")
'oConn.Open sConn, "xxxxxxxxxxx", "xxxx"
'Set oRS =CreateObject("ADODB.Recordset")
'sSQL="SELECT * FROM [xxxxx].[dbo].[table]"
'oRS.open sSQL, oConn
'Set oRS = oConn.Execute(sSQL)
end sub

 

but getting access denied or Login failed for user.

 

If you any other way to do so please let me know