Snippet of the code that is giving me a syntax error message
if(SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_STMT,sqlConnH, &hStmt))
cout << "failed to alloc stmt handle" << endl;
if(SQL_SUCCESS != SQLExecDirect(hStmt,(SQLWCHAR*)"SELECT TOP 10 [CaseId]
from YSeriesData" , SQL_NTS))
{
cout << "Fail on sql query" << endl;
showError(SQL_HANDLE_STMT, hStmt);
}
}
到目前为止,检查了许多资源,所有资源似乎都与我实现的语法一致。有关解决问题的建议吗?调试为我提供了以下内容; [Microsoft] [SQL Server Native Client 11.0] [SQL Server] 0附近的语法不正确。