Prev: Help build query
Next: Creating Views with Indexes for entire Database Excluding UniqueIdentifier field
From: David Olsen on 26 Apr 2010 13:28 This code works fine if the picture image is on the server but I want to use the local machine or drives outside the server because those drives contain the images. How do I specify a local drive in this code as opposed to a server drive? CREATE TABLE Employees ( Id int, Name varchar(50) not null, Photo varbinary(max) not null ) INSERT INTO Employees (Id, Name, Photo) SELECT 10, 'John', BulkColumn from Openrowset( Bulk 'C:\photo.bmp', Single_Blob) as EmployeePicture
From: Uri Dimant on 27 Apr 2010 02:24
INSERT INTO Employees (Id, Name, Photo) SELECT 10, 'John', BulkColumn from Openrowset( Bulk '\\server\sharedfolder\photo.bmp', Single_Blob) as EmployeePicture "David Olsen" <david.olsen(a)usu.edu> wrote in message news:DEF5C395-56FC-493D-8C05-35FC1B23206E(a)microsoft.com... > This code works fine if the picture image is on the server but I want to > use the local machine or drives outside the server because those drives > contain the images. How do I specify a local drive in this code as > opposed to a server drive? > > > > > > CREATE TABLE Employees > > ( > > Id int, > > Name varchar(50) not null, > > Photo varbinary(max) not null > > ) > > > > > > INSERT INTO Employees (Id, Name, Photo) SELECT 10, 'John', BulkColumn from > Openrowset( Bulk 'C:\photo.bmp', Single_Blob) as EmployeePicture > > > |