unit testing - Can I use osql with Sql server Compact Edition -
I have a file that has many inserted statements to populate my compact version database with test data. I run a unit test (I'm using NUnit), so I'm running a file from SQL Server Management Studio. Now I want to automate the database script for every test run. I am trying to use the OSQL as described in this article: The problem is that I do not know how to use OSQL from the SSF file. I have 2 problems, I do not have a user id for the database first, only one password I have seen it at the command line prompt:
osql -P Manager -s 192.168.1.117 -i "C: \ ... \ InsertTestData.sqlce" -D "C: \ ... \ Test.sdf" Error: None of the users is selected - try with U or A switches
Second, I do not know how to specify a database. I have tried to:
osql-P manager -s 192.168.1.117 -i "C: \ ... \ InsertTestData.sqlce" -D "C: \ ... \ Test sdf "- u [odbc driver manager] does not have the name of the data source and no default driver is specified
then can I add a user ID on the SQL server? How do I specify the database / file path? Or is there another way that I can connect?
check out
It appears that for OSQL and SQLCMD compact versions Do not work.
Comments
Post a Comment