Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can not use schema when checking database entries on MS SQL #4542
What are you trying to achieve?
I want to check data from table in different schema instead of default [dbo] using
What do you get instead?
Error during executing SQL query.
If I use as table name:
[PDOException] SQLSTATE[HY000]: General error: 208 Invalid object name 'account.Note'.  (severity 16) [(null)]
And when I provide table name with schema in this way: [account]. [Note]:
[PDOException] SQLSTATE[HY000]: General error: 102 Incorrect syntax near '='.  (severity 15) [(null)]
$I->seeInDatabase('[account].[Note]', ['ID' => 1]);
class_name: ApiTester modules: enabled: - Asserts - \ApiHelper - REST: url: http://localhost:8074 depends: PhpBrowser - Db: dsn: "dblib:host=xxx.xxx.xxx.xxx;dbname=xxxxxx;charset=utf8" user: xxxxxxx password: xxxxxxxxx dump: 'tests/resources/db/db-schema.sql' populate: true # run populator before all tests
getQuotedName method adds quotes around all identifiers, so you could try to use
You are the first person to use Codeception with MSSQL in years, so you are welcome to improve it.