X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO%2FMicrosoft_SQL_Server.pm;h=7e08098f499410fb5615d4fff144a2787c682759;hb=726c8f65ef37b47aad62e29a306f64528a00f65d;hp=efe32b66ead011f1c45117093fc110b96c555e0e;hpb=6f7a118e7728040e015699975dafde1a1fb81538;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm index efe32b6..7e08098 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm @@ -66,17 +66,16 @@ sub _rebless { $self->_identity_method('@@identity'); } -sub source_bind_attributes { - my $self = shift; - my ($source) = @_; - - my $bind_attributes = $self->next::method(@_); +# work around a bug in the ADO driver - use the max VARCHAR size for all +# binds that do not specify one via bind_attributes_by_data_type() +sub _dbi_attrs_for_bind { + my $attrs = shift->next::method(@_); - foreach my $column ($source->columns) { - $bind_attributes->{$column}{ado_size} ||= 8000; # max VARCHAR + for (@$attrs) { + $_->{ado_size} ||= 8000 if $_; } - return $bind_attributes; + $attrs; } sub bind_attribute_by_data_type {