TDM adds apostrophes to the value of the fields of type VARBINARY
search cancel

TDM adds apostrophes to the value of the fields of type VARBINARY

book

Article ID: 214242

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

I need to generate data in a VARBINARY field.
When I publishto directly into the table (TGT) everything works well.
When I publishto a SQL file, TDM puts the value between quotes. It should not.

Tested on the TDM portal with version 4.9.291. 

Attached files:
1- the create table
2- the generator (I put the value 1 in the field)
3- the submitted request of the TGT publishto
4- the submitted request of the SQL publishto (DBMS SQL Server)
5- The SQL file produced
6- The content of the generated SQL file indicating the apostrophes
7- The result of the execution of the inserts with and without apostrophes

Environment

Release : 4.9.1

Component : CA Agile Requirements Designer - TMX Script Generator

Cause

I am able to reproduce this issue.  This is basically related to type conversion of the value

INSERT INTO JFB_TEST_VARBINARY ([CipherKey]) VALUES ('1') --   This is not a valid SQL because we need to type cast this string value to varbinary before executing this query.

INSERT INTO JFB_TEST_VARBINARY ([CipherKey]) VALUES (1). -- This is valid SQL because the value is number format and internally it will gets converted into varbinary. That is why this query is working while another is giving SQL error.

Resolution

This has been addressed in later versions of 4.9 releases.

Download and install the latest patch from TDM patches link given below to fix this issue.

https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/release-announcements/Test-Data-Manager-TDM-Patches/16649