Storing Base64 String in SSMS

Hello. I’m encountering an issue with storing base64 strings in Microsoft SSMS. I need to store them temporarily and then write them to a .txt file later on. The string is 163,180 characters long, but after it gets stored in SSMS, the result is truncated and cut down to 65,543 characters only which expectedly results in a cropped image when being decoded. The column data type is varchar(MAX). Tried mingling with some settings to increase the limit but nothing worked. I know I can store as assets in orchestrator or simply write them to .txt files but I prefer inserting them in SSMS instead. Not sure if I should store in binary format or something else.

@private_matter

That is because of the varchar limit…

Did you happen to try with text?

Cheers

Yes I saw that already. I figured a new solution. No need to store them in ssms. Simply after sending an HTTP response and downloading the image, rename each one as such: BLOB_1, BLOB_2, BLOB_3, then finally convert each to base64 and directly replace them with the same corresponding text in the .csv template. Problem solved. :grin:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.