INF: ISQL Does Not Send Carriage Returns to SQL Server

Last reviewed: April 25, 1997
Article ID: Q70246

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2
  - Microsoft SQL Server version 4.2

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("123 456") 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")

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 : kbtool SSrvISQL SSrvProg SSrvTran_SQL SSrvWinNT
Version : 4.2 | 4.2 | 4.2
Platform : MS-DOS OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.