# How to upload pdf file to sql sever

**URL:** <https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886>\
**Category:** General\
**Tags:** database\
**Created:** [23 February 2022 15:30 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886 "2022-02-23T15:30:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chawana](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chawana](https://discourse.nodered.org/u/chawana)\
**Post date:** [23 February 2022 15:30 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886/1 "2022-02-23T15:30:38Z")

</div>

Some one can guild line me for uplaod or insert pdf file to sql database

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 February 2022 17:16 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886/2 "2022-02-23T17:16:48Z")

</div>

1. do you know how do insert data into an sql database? If you don't do a google search using 'node-red mysql example' and you find a tutorial.

2. does your database have a column defined as 'blob'? If you don't, do a google search using 'sql blob' and read about what you need to define in the database to store a large file. Then check the schema of your database and make sure to add one. depending on if this is afor a business, you may have to talk to your DBA. If not, you'll need to create the table with that data type.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 February 2022 21:01 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886/3 "2022-02-23T21:01:32Z")

</div>

Hi. That is a fairly loaded question.

Before we can assist, you really need to share more info.

for example...

- Where are you stuck?
  - Do you have the "Upload" part working?
  - Do you have the SQL Server `INSERT` part working?
  - Do you have the Database and its Tables created already?
  - Are you expecting to use SQL Stored Procedures or INSERT queries?
  - Are you wanting to upload the text from the PDF (into a text field) OR the actual file (as a blob?)

- what SQL Server version are you using?
  - is the SQL Server local or remote
  - are you using built-in security or SQL Server logins?

- Are you using `node-red-contrib-mssql-plus` (this is the most capable / most supported node)

---

<div class="post-metadata">

**Author:** ![chawana](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chawana](https://discourse.nodered.org/u/chawana)\
**Post date:** [24 February 2022 03:20 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886/4 "2022-02-24T03:20:28Z")

</div>

[quote="Steve-Mcl, post:3, topic:58886"]

- Do you have the "Upload" part working?  
ํYes,
- Do you have the SQL Server `INSERT` part working?  
Yes, using node red.
- Do you have the Database and its Tables created already?  
No, please recommend data type.
- Are you expecting to use SQL Stored Procedures or INSERT queries?  
Just INSERT queries.
- Are you wanting to upload the text from the PDF (into a text field) OR the actual file (as a blob?)actual file .pdf  
what SQL Server version are you using?ver 2014 express.
- is the SQL Server local or remote: Local
- are you using built-in security or SQL Server logins? No need
- Are you using `node-red-contrib-mssql-plus` (this is the most capable / most supported node)  
Yes using node mssql-plus.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 April 2022 03:21 UTC](https://discourse.nodered.org/t/how-to-upload-pdf-file-to-sql-sever/58886/5 "2022-04-25T03:21:09Z")

</div>

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