Status: Need More Info
Priority: P3: Somewhat important
Affects Version/s: 5.9.7, 5.14.1
Fix Version/s: None
Component/s: SQL Support
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.
query.prepare("RESTORE HEADERONLY FROM DISK = :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.