This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 1.7.1-1: problem with pipe to windows programs
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