We want to upload pdf files into a SQL Server table.
Let's assume the size is about 256K.
This is the table DDL:
CREATE TABLE [dbo].[tblFiles]
(
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
[ContentType] [nvarchar](200) NOT NULL,
[Data] [varbinary](max) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
We want to call these files from an SSAS Tabular cube (outside the scope of this question for now), so we are working on a POC.
I don't need to use code to store the file in the database. We just need to prove the POC would work, so how do I upload the file directly into the table?
I know with C# for example, binary reader is used to parse the content and whatnot, but uploading the file directly, how do I even get this info? Do I turn the pdf file into a zip file or something?