Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.9.7, 5.14.1
-
None
Description
The following query executes successfully, but returns 0 records on Linux (openSUSE) using unixODBC with FreeTDS, while it works fine with "ODBC Driver 17 for SQL Server" proprietary driver on the same machine.
{{QSqlQuery query(db);
query.prepare("RESTORE HEADERONLY FROM DISK = :bakfile");
query.bindValue(":bakfile", bakfile);}}
bakfile is a QString that points to the Windows path on the server.
query.exec() succeeds. But query.record().count() is 0 and of course query.next() returns false. query.lastError().text() is empty (no errors).
Doing the same query with an non-existent file returns the normal operating system cannot find file.
The same SQL query works fine using tsql (freeTDS diagnostic tool).
The server is MSSQL 2017 Express on a Windows 10 PC.
I've also tried query without using bindvalue with the same result.
Tracing packets using wireshark shows the result back from the server.