The following DTS DDQ code results in a string length = 319 bytes.
The target column in SQL Server 7.0 is varchar(2000) and the parameter variable in the stored procedure is also varchar(2000).
When I run the package it fails at the EXECUTE line because the string is too long (greater than 128). The exact error is:
Error Source = Micorosoft OLE DB Provider for SQL Server
Error description: The identifier that starts with '000000463 PO BOX 278 LUIS..... 'is too long. Maximum length is 128.
Again, I am using SQL Server 7.0 throughout.
'***************************************************************************************************
Sub InsertExceptionParent(DataSourceName,TransactionID)
cTransactionStr = CHR(34) _
& cStr(DTSSource("Col001")) & cStr(DTSSource("Col002")) & cStr(DTSSource("Col003")) & cStr(DTSSource("Col004")) _
& cStr(DTSSource("Col005")) & cStr(DTSSource("Col006")) & cStr(DTSSource("Col007")) & cStr(DTSSource("Col008")) _
& cStr(DTSSource("Col009")) & cStr(DTSSource("Col010")) & cStr(DTSSource("Col011")) & cStr(DTSSource("Col012")) _
& cStr(DTSSource("Col013")) & cStr(DTSSource("Col014")) & cStr(DTSSource("Col015")) & cStr(DTSSource("Col016")) _
& cStr(DTSSource("Col017")) & cStr(DTSSource("Col018")) & cStr(DTSSource("Col019")) & cStr(DTSSource("Col020")) _
& cStr(DTSSource("Col021")) & cStr(DTSSource("Col022")) & cStr(DTSSource("Col023")) & cStr(DTSSource("Col024")) _
& cStr(DTSSource("Col025")) & cStr(DTSSource("Col026")) & cStr(DTSSource("Col027")) & cStr(DTSSource("Col028")) _
& cStr(DTSSource("Col029")) & cStr(DTSSource("Col030")) & cStr(DTSSource("Col031")) & cStr(DTSSource("Col032")) _
& cStr(DTSSource("Col033")) & cStr(DTSSource("Col034")) _
& CHR(34)
cmd.ActiveConnection = cn
cmd.CommandText = "sp_InsertExceptionsParent " & _
cLng(TransactionID) & "," & _
DataSourceName & "," & _
cTransactionStr & "," & _
"Stage1"
cmd.Execute
End Sub
'***************************************************************************************************
Any clues as to where the bottleneck is?
Best regards,
Bob
Database Development Team