From: DBA.9999 on 3 May 2010 10:38 we are copying a sqlserver 2005 data to mysql using perl dbd (freetds for sql server and standard dbd/dbi for perl). We are having problems with image column of a sql server table. this contains jpeg data and the application can not view it on mysql side. We also used bcp of sqlserver and same problem there too. is there anything that needs to be done on perl or sqlserver or mysql. thanks
From: Uri Guttman on 3 May 2010 13:18 >>>>> "D9" == DBA 9999 <dba.9999(a)gmail.com> writes: D9> we are copying a sqlserver 2005 data to mysql using perl dbd D9> (freetds for sql server and standard dbd/dbi for perl). We are D9> having problems with image column of a sql server table. this D9> contains jpeg data and the application can not view it on mysql D9> side. We also used bcp of sqlserver and same problem there too. D9> is there anything that needs to be done on perl or sqlserver or D9> mysql. i dunno freetds but why can't you use DBI for sqlserver too? also if you are writng the jpegs to/from flat files during this process, make sure you enable binmode on them. otherwise on winblows a newline char (sure to be found in images somewhere) will be converted to cr/lf and that will ruin the image data. without seeing code or your design i can't tell where you need to do this but it is a good guess. uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
From: DBA 9999 on 3 May 2010 13:53 In article <87hbmoewfq.fsf(a)quad.sysarch.com>, Uri Guttman says... > >>>>>> "D9" == DBA 9999 <dba.9999(a)gmail.com> writes: > > D9> we are copying a sqlserver 2005 data to mysql using perl dbd > D9> (freetds for sql server and standard dbd/dbi for perl). We are > D9> having problems with image column of a sql server table. this > D9> contains jpeg data and the application can not view it on mysql > D9> side. We also used bcp of sqlserver and same problem there too. > D9> is there anything that needs to be done on perl or sqlserver or > D9> mysql. > >i dunno freetds but why can't you use DBI for sqlserver too? Yes I am using perl DBI for sqlserver too (freetds is the DBD driver which makes possible to use it on unix). Basically it is fetchrow_array from sqlserver and pass that array to mysql. >also if you >are writng the jpegs to/from flat files during this process, make sure >you enable binmode on them. otherwise on winblows a newline char (sure >to be found in images somewhere) will be converted to cr/lf and that >will ruin the image data. without seeing code or your design i can't >tell where you need to do this but it is a good guess. > >uri >
|
Pages: 1 Prev: Statistics on SQL 2005 Next: SQL Job sending a file to a network directory? |