SQLTeam.com | Weblogs | Forums

Problem with code from article on Storing files in SQL Database Using FILESTREAM

I am trying to teach myself the basics of FileStream in SQL. I have been using articles published by Nisarg Upadhyay titled Storing files in SQL Database Using FILESTREAM Parts 1 and 2.
I have successfully completed Part 1. Enabled the FireStream feature, created and configured FileStream file groups and containers, and created a Firestream Database and a table.
In working on part 2, ‘Inserting multiple files using SQL script’, I created a temporary table for storing the details of the files to be added to the database but when I tried to create a second table to physically store the files in the table, I ran into an error stating:
Msg 1921, Level 16, State 3, Line 5
Invalid filegroup 'Dummy Documents' specified.
--Moreover, create a table to store the Files in the table. Execute the following query to create a physical table:

USE [FileStream-Demo]
GO
CREATE TABLE [dbo].[Document_Content ](
[ID] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[RootDirectory] varchar NULL,
[FileName] varchar NULL,
[FileAttribute] varchar NULL,
[FileCreateDate] [datetime] NULL,
[FileSize] [numeric](10, 5) NULL,
[FileStreamCol] varbinary FILESTREAM NULL,
UNIQUE NONCLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] FILESTREAM_ON [Dummy Documents]
GO

Msg 1921, Level 16, State 3, Line 5
Invalid filegroup 'I:\Dummy Documents' specified.

When I ran a query to show the Database file and location of the containers, I get the correct Filegroup name 'Dummy Documents'. I am stumped to say the least. The code looks right, the FileGroup is ‘Dummy Documents’, there is something I’m missing, and I cannot find it.