ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

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

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.

Environment

Release : 4.9.1

Component : CA Agile Requirements Designer - TMX Script Generator

Resolution

TDMWeb-4.9.310.0.zip resolves this issue.