Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting file names from binary data
Message
 
 
To
All
General information
Forum:
C#
Category:
Coding, syntax and commands
Title:
Extracting file names from binary data
Miscellaneous
Thread ID:
01667968
Message ID:
01667968
Views:
41
UPDATE. I think I got it although in both C# and in SQL Server I don't really see the rest of the string after the GRAPHIC1 part.

I also made an assumption that we only have up to 9 graphic files. I think I may also need to restrict that number on the File Upload as well.

Hi everybody,

I have SQL Server varbinary(max) column which I read in C# code as byte[] array. If I run the following query in SQL Server:

select *, cast(graphics as varchar(max)) as pic from dbo.Layouts I can see the following format (showing just beginning of the string)
<GRNAME1>"gcaplogo2015.jpg"</GRNAME1><GRAPHIC1>ÿØÿà
So, the varbinary column saves picture files and it saves it in the format of
<grName1>fileName1</grName1><Graphic1>actual graphic</Graphic1>...
I'm going to worry about saving the files in this format a bit later, but for now I need to figure out how to get all the file names.

Do you have some suggestions for me?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform