Skip to main content
Solved

Error message using FILESTREAM to save documents

  • June 21, 2019
  • 4 replies
  • 120 views

John Sangers
Apprentice
Forum|alt.badge.img+1
I am trying to use FILESTREAM for saving documents in the database. I have a table containing these columns:


The domains are defined as folows:


When I insert a document using T-SQL in SQL Mangement Studio in the GUI I see the documents as expected and can also open them using the lookup button. When I try to upload a new document I get the folowing error message:


This makes sense because the filestream_id is inserted with a null value, running the same command in SQL management studio without the field filestream_id and the null value works because the field has a default value (newsequentialid()).

What should I change to make the GUI surpress the filestream_id field?

Best answer by Jasper

Hi John,

Can you check the definition of the FILESTREAM_ID data type? I believe it has been updated (and renamed) in more recent versions. It should look something like this (note the 'Calculated' property):

This topic has been closed for replies.

4 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • July 4, 2019
Hi John,

Can you try adding an extra identity column as primary key instead of using the filestream_id as primary key?

John Sangers
Apprentice
Forum|alt.badge.img+1
  • Author
  • Apprentice
  • July 4, 2019
Hi Anne,

This doesn't work, I now get the following error:



Can you send a table definition that works?

Jasper
Superhero
  • Answer
  • July 5, 2019
Hi John,

Can you check the definition of the FILESTREAM_ID data type? I believe it has been updated (and renamed) in more recent versions. It should look something like this (note the 'Calculated' property):


John Sangers
Apprentice
Forum|alt.badge.img+1
  • Author
  • Apprentice
  • July 5, 2019
Hi Jasper, the calculated property wasn't checked in our SF. Changing this worked for us!