Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 495
  • Last Modified:

How to transfer binary data using Import/Export Wizard [SQL Server 2005]

I am trying to transfer populated tables from one database to another of exactly the same schema in the same SQL instance using the Import/Export wizard. I have done this before using the same method I am trying to use now, but this time two of the columns in the table (bitmap, thumbnail) are of the type IMAGE, and I'm getting the following error exactly twice:

ERROR : errorCode=0 description=Input string was not in a correct format. helpFile=TableTransferGenerator Task helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}

I am assuming this is because of the two image columns. I am using a script to do the data transfer, which looks like this:
SELECT
[name]
,[filespec]
,[height]
,[width]
,[DPI]
,[bitmap]
,[bitmap_size]
,[thumbnail]
,[thumbnail_size]
,[modified]
,[default_pers]
FROM [gpctest].[dbo].[garment_bmp]

The transfer is between two tables of exactly the same construct, basically the same database schema, just two different databases. What do I have to do to get the binary data to export from the one database to the other? Thanks.
0
tcianflone
Asked:
tcianflone
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
try using tsql

insert into urTargettable ([name]
,[filespec]
,[height]
,[width]
,[DPI]
,[bitmap]
,[bitmap_size]
,[thumbnail]
,[thumbnail_size]
,[modified]
,[default_pers] )
SELECT
[name]
,[filespec]
,[height]
,[width]
,[DPI]
,[bitmap]
,[bitmap_size]
,[thumbnail]
,[thumbnail_size]
,[modified]
,[default_pers]
FROM [gpctest].[dbo].[garment_bmp]
0
 
tcianfloneAuthor Commented:
Doh! Just skip the transfer wizard altogether! Sweet... thanks!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now