Thanks for the help, but still fail.
To avoid errors in typing I copied/paste the connection string from:
[dbisqlc.exe -q -c "uid=DBA;pwd=XXXX;DSN=SymantecEndpointSecurityDSN"]
to:
$conn1 = New-Object System.Data.Odbc.OdbcConnection("Driver=SQL Anywhere 11;uid=DBA;pwd=XXXX;DSN=SymantecEndpointSecurityDSN")
$conn1 = New-Object System.Data.OleDb.OleDbConnection("Provider = SAOLEDB;uid=DBA;pwd=XXXX;DSN=SymantecEndpointSecurityDSN");
Whatever option I try always get the error message that the username or password is wrong:
-------------------------------------------------------------------------------------------------------------------------------
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0" argum
ent(s): "ERROR [28000] [Sybase][ODBC Driver][SQL Anywhere]Invalid user ID or password
ERROR [28000] [Sybase][ODBC Driver][SQL Anywhere]Invalid user ID or password" ---> System.Data.
Odbc.OdbcException: ERROR [28000] [Sybase][ODBC Driver][SQL Anywhere]Invalid user ID or password
-------------------------------------------------------------------------------------------------------------------------------
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0" argum
ent(s): "Invalid user ID or password" ---> System.Data.OleDb.OleDbException: Invalid user ID or password
-------------------------------------------------------------------------------------------------------------------------------
I even installed a new test virtual server from scratch but result is same.
What confuses me is the fact that these two examples work even though I use the same username and password (in all examples).
If in the ODBC panel I enter username and password I get a successful test message. If I enter wrong username or password I get error message (as expected).
If I run this command:
dbisqlc.exe -q -c "uid = DBA; pwd = XXXX, DSN = SymantecEndpointSecurityDSN" "foobar.sql"
from CLI a file is generates with all relevant information. If I change username or password I get error message (as expected).
Is there any additional settings witch I need to set on embedded database for access from PS?