I created a directory in File Table. Now I need to insert files inside that directory. As parent_path_locator can not be set, I can't think of how to achieve this. I am doing all these in code.
This is how i created directory;
Dim insertDir = "insert into dbo.DocumentStore(name,is_directory,is_archive) output INSERTED.path_locator values(@name,1,0)"
Using sqlCommand As New SqlCommand(insertDir, con)
sqlCommand.Parameters.Add("@name", SqlDbType.VarChar).Value = Me.txtGroupName.Text
parentPathLocator = sqlCommand.ExecuteScalar()
End Using
Note: I saw we can use dbo.GetNewPathLocator(path) to get a sub directory path based on the path locator. But I'm not sure how to use this in my case to insert a file.
Update: I found how to do it in TSQL TSQL but how to do this in code?