freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] Please help with my script
- Date: Fri, 23 May 2003 17:37:16 +0200
>
> Hello,
>
> I am trying (unsuccessfully) to extract data from a mssql7
> database to a mysql database. The database is over 10,000
> records and each record contains a OLE .jpg blob.
>
Currently FreeTDS support all mssql2k except sql_variant.
I don't know where ou store a "OLE .jpg blob"...
> Basically, I am having problems importing the data. My script
> is below...
>
>
> #!/usr/bin/perl
>
> use DBI;
> $ENV{'SYBASE'} = '/usr/';
> $dbh = DBI->connect('dbi:Sybase:server=XXX', 'XXX', 'XXX')
> or die 'connect';
>
> $dbh->do("use mlsnhsql");
>
> $sth = $dbh->prepare('select * from idxmls1') or die
> 'prepare'; $sth->execute or die 'execute';
>
> while (@data = $sth->fetchrow_array) {
> print "$data[0] $data[1] $data[2] $data[3] $data[4]
> $data[5] $data[6] $data[7] $data[8] $data[9] $data[10]
> $data[11] $data[12] $data[13] $data[14] $data[15] $data[16]
> $data[17] $data[18] $data[19] $data[20] $data[21] $data[22]
> $data[23] $data[24] $data[25] $data[26] $data[27] $data[28]
> $data[29] $data[30] $data[31] $data[32] $data[33] $data[34]
> $data[35] $data[36] $data[37] $data[38] $data[39] $data[40]
> $data[41] $data[42] $data[43] $data[44] $data[45] $data[46]
> $data[47] $data[48] $data[49] $data[50] $data[51] $data[52]
> $data[53] $data[54]\n"; # the first few fields }
>
Perhaps problem is textsize too small..
freddy77
-
[freetds] Please help with my script,
Scott Antonivich, 05/23/2003
- Re: [freetds] Please help with my script, Stuart Coupe, 05/23/2003
- <Possible follow-up(s)>
- RE: [freetds] Please help with my script, ZIGLIO Frediano, 05/23/2003
Archive powered by MHonArc 2.6.24.