I'm encountering a "strange" problem and I have no idea of what is happening (I'm new to SQL Server).
I'm doing a database backup to a backup device which I created in SQL Server Management Studio. I'm running a simple query
BACKUP DATABASE abc TO abcBackupDevice
and this works fine, but any following SQLExecDirect returns "Invalid cursor state" error.
I'm running a C++ app in Visual Studio 2012 and SQL Server 2012 Express as well.
Any ideas?