OSQL -D parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richardF
    New Member
    • Apr 2008
    • 1

    #1

    OSQL -D parameter

    I need an example of showing how to use OSQL' s -D parameter.

    I have defined a system DSN (DCA_Test) using the SQL Server driver. It "tests" successfully.

    When I try something like this at the command line, it still asks for user info

    osql -D DCA_Test -Q "exec getVM_HostName 'lod123' " -n

    Shouldn't it pick up the SQL server, database, user and pswd from the DSN ?
    The same command works perfectly with the -U and -P parameters

    What am I doing wrong?
Working...