Microsoft KB Archive/70246

= INF: ISQL Does Not Send Carriage Returns to SQL Server =

Article ID: 70246

Article Last Modified on 2/14/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition
 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 7.0 Service Pack 1

-



This article was previously published under Q70246



SUMMARY
When ISQL is used to insert text or varchar data into Microsoft SQL Server, the data length of the resulting column entry might not be as expected.



MORE INFORMATION
ISQL appends a linefeed character at the end of each line of input when sending the data to SQL server. If the input file contained a carriage return-linefeed combination the length of the data stored may appear to be wrong because the carriage return characters are never inserted into the database.

For example if we create a file input.sql as follows:

INPUT.SQL:
INSERT INTO MYTABLE VALUES(&quot;123 456&quot;) go

And run it by executing the following from a command prompt:

>isql /Usa /iINPUT.SQL

SQL Server will insert into table MYTABLE 7 bytes: 123 followed by a linefeed, followed by 456&quot;)

NOTE: When ISQL is used to select the data that was just entered, and is told to write the data to an output file, the linefeed character that it receives from SQL Server is translated back to a carriage return-linefeed combination.

Additional query words: isql Windows NT

Keywords: KB70246

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.