0

As the title says, I'm trying to save a PDF converted to base64 in SQL varchar(MAX) column. When my example PDF is converted to base64, is a 111305 characters length string. I copy and paste that string to SQL varchar(MAX) column, but when I do a select * from table, and copy the data, it's only a 43120 characters string.

So it's looks like SQL cut by half my string

So the question is: "How can i save a 111305 characters length string or more in SQL?" "Is varchar(MAX) correct for this?"

POSTDATA: I cannot save the PDF to binary because to save it to the database in the webapp it uses a web service, and if I send binary data to the web service it doesn't not acept it. Help please.

GalloPinto
  • 667
  • 2
  • 11
  • 25
  • 1
    Do you do the `select *` in ManageMent Studio? In that case it would explain the truncated data. Do a `select len(field)` to check how much data there is in the field. – Guffa Nov 05 '13 at 14:54
  • Is there anyway that i can get the data without using select *? – GalloPinto Nov 05 '13 at 15:06
  • If you get the data from the application, there is no problem using `select` to fetch it. If you want to do it in Management Studio, you would need to split it up in chunks small enough for the result grid to handle. – Guffa Nov 05 '13 at 15:55

0 Answers0