Author |
Topic |
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 03:49:38
|
hello , I have the following problem.I want to insert images in a table .That I can do with the following code .INSERT INTO Employees (Id, Photo) SELECT 11,, BulkColumn FROM Openrowset( Bulk 'c:\image1.jpg', Single_Blob) as EmployeePictureI have the id and the images path in an excell file. How I can open the excell file and combine the functionality for (i=1;i<2000;i++) for every id you read insert the photo i++;Thanks in advance!! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 04:26:34
|
thanks a lot !!! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-28 : 05:00:55
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 06:31:00
|
when I am trying to runnit I receive the following error ===================================Package Validation Error (Package Validation Error)===================================Error at Data Flow Task [Flat File Source [9]]: The component locale ID has not been set. Flat file adapters need to have the locale ID on the flat file connection manager set.Error at Data Flow Task [DTS.Pipeline]: "component "Flat File Source" (9)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".Error at Data Flow Task [DTS.Pipeline]: One or more component failed validation.Error at Data Flow Task: There were errors during task validation. (Microsoft.DataTransformationServices.VsIntegration)------------------------------Program Location: at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, DataWarehouseProjectManager manager, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-28 : 06:40:41
|
seems like connection manager issue. are you trying to generate connection string through an expression?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 06:54:03
|
the test connection is succeded . |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-28 : 06:55:45
|
nope...my question is at runtime are you trying to generate connection string using an expression?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 07:02:05
|
Data Source=LISTENER;User ID=sr;Initial Catalog=LOCALPRD;Provider=SQLNCLI.1;Auto Translate=False; this is the connection string |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 07:41:46
|
does it help ? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-28 : 08:36:30
|
quote: Originally posted by nek does it help ?
I was asking whether its the same always?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-28 : 08:42:16
|
yes , it is the same always . |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-29 : 03:42:54
|
all ok finally .I updated my sql with sp4 and all play. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-29 : 03:47:54
|
is path a unicode datatype?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
nek
Starting Member
10 Posts |
Posted - 2013-01-30 : 01:23:49
|
I have another problem to solve. my paths are containing the symbol "_". error receiving DTS_E_INDUCEDTRANSFORMFAILUREONERRORIs there any way to overcome this problem ? |
|
|
|