in reply to Re: dbd odbc sql big file blues
in thread dbd odbc sql big file blues
This works fine for me with the Easysoft SQL Server ODBC Driver:
use strict; use warnings; use DBI; use Data::Dumper; my $h = DBI->connect(); eval { $h->do(q/drop table mje/); }; $h->do(q/create table mje (a varbinary(max))/); my $t = $h->column_info(undef, undef, 'mje', 'a'); DBI::dump_results($t); my $x = 'a' x 1000; my $s = $h->prepare(q/insert into mje values(?)/); foreach (1..15) { $s->execute($x); print "Inserted ", length($x), "\n"; $x = $x x 2; } $Data::Dumper::Indent = 0; my $r = $h->selectall_arrayref(q/select len(a) from mje/); print Dumper($r);
outputs:
'master', 'dbo', 'mje', 'a', '-3', 'varbinary', 0, 0, undef, undef, '1 +', undef, undef, '-3', undef, 0, 1, 'YES', '0', '0', '0', '0', undef, + undef, undef, undef, undef, undef, '37' 1 rows Inserted 1000 Inserted 2000 Inserted 4000 Inserted 8000 Inserted 16000 Inserted 32000 Inserted 64000 Inserted 128000 Inserted 256000 Inserted 512000 Inserted 1024000 Inserted 2048000 Inserted 4096000 Inserted 8192000 Inserted 16384000 $VAR1 = [['1000'],['2000'],['4000'],['16000'],['32000'],['64000'],['12 +8000'],['256000'],['512000'],['1024000'],['2048000'],['4096000'],['81 +92000'],['16384000'],['8000']];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: dbd odbc sql big file blues
by CaptainDaddy (Initiate) on Mar 20, 2013 at 18:37 UTC | |
by CaptainDaddy (Initiate) on Mar 21, 2013 at 13:35 UTC | |
by CaptainDaddy (Initiate) on May 10, 2013 at 19:23 UTC |