Cygwin 1.7.1-1: problem with pipe to windows programs

Andy Koppe andy.koppe@gmail.com
Thu Jan 7 09:05:00 GMT 2010


2010/1/6 RH:
> echo "select * from mytable" | unix2dos | sqlcmd -S server -U sa -P mypassword
> -d myDatabase
>
> As you can see I'm trying to force the data hitting sqlcmd to be in dos mode but
> somehow I suspect it is getting put into linux-mode line endings before hitting
> sqlcmd.  The error response is "Error: Internal error at ReadTextLine (Reason:
> Not Specified)"
>
> This command from an NT command shell works:
>
> echo "select * from mytable" | sqlcmd -S server -U sa -P mypassword -d myDatabase
>
> My mount in /etc/fstab is text, I tried binary, that seems to not help.
>
> any ideas?

Another thing to try might be the locale setting. Windows uses
codepage numbers where Unix uses charset names, so perhaps sqlcmd is
stumbling over those. In particular, try unsetting LANG.

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list