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: 
quad4x
Contributor II
Contributor II

tDBOutput generates the correct SQL but data is not in DB

I'm trying to insert data into an MSSQL database using a delimited file to tDBOUtput.

Using a tJava, I'm printing the SQl generated using

   System.out.println(((String)globalMap.get("tDBOutput_1_QUERY")));

Generated statement:

INSERT INTO [system] ([inactive],[name],[description],[risktracksystemid],[addeddate],[fusionid]) VALUES ('0','New Test App','testing','','06-02-2022','b001Y00000qOtst')

However, the data isn't getting inserted.

When I run the same SQL in MS SQL Server Management Studio, the insert works.

0695b00000RjJGuAAN.png

0695b00000RjJHdAAN.png0695b00000RjJHEAA3.png

Labels (3)
1 Solution

Accepted Solutions
quad4x
Contributor II
Contributor II
Author

Found that this works when I add 'tDBCommit' after the output. Not use to needing to commit changes to MSSQL database

View solution in original post

2 Replies
quad4x
Contributor II
Contributor II
Author

Found that this works when I add 'tDBCommit' after the output. Not use to needing to commit changes to MSSQL database

gjeremy1617088143

yes you have to use a tDBCommit component on subjob ok link and tDBRollBack component on subjob error link, or you can set auto commit in advance option of the tDBConnection component.