Update database with null value

Hi,

I have a requirement that if I find some values in incoming data from SAP, I need to update database (SQL Server) with NULL value.

I’m using Dynamic SQL since there are other parameters that need to set at run time.

Please advice.

regards,

Karan

When you invoke Dynamic AS in the service pass null value ie (by initialize with setValue to the adapter service input param) this should pass null in your dynamic update as long as your input param exists in the pipeline.

HTH,
RMG

Hi,

Thanks for the reply, but in my case I can’t intialize input params for AS.

Below is my situation.

Mapping — > Prepare DB Signature document, processing and logic
Invoke adapter service using DB Signature document.

Now my question how I should but null value in that DB Signature document to be updated in database.

Simply putting value “null” in the DB Document doesn’t help since adapter service take it as input string not database null value.

regards,

Karan

I mean when you prepare DB signature document in the pipeline initialize the field (that inserts null value) and you obviously mapping above signature document (with values) to your adapter service right??

HTH,
RMG

Hi RMG,

Thanks for the reply…

Sorry for the typo, situation was like…

Mapping service --> In this sevice if field1 is “OB” then set to blank.; creating DB Signature document
Adapter Service – > Update blank as null in database using the DB signature document

regards,
Karan

Karan,

If so the above suggestion should work with update value null.Did you tried the same?

HTH,
RMG

Thanks RMG,

I used littel different approach…I used conditional mapping… (checking value on mapping link)

regards,
Karan