Startbeitrag von Jorge am 08.11.2013 15:08
Hello everyone,
I need help with MSSQLServer + HExecuteSQLQuery(). The problem occurs when I run a stored procedure with "INSERT"
I have a project with SQL Server 2008 R2 with oledb connection.
IF NOT HDescribeConnection ("cnn_SqlServer" , , , , hOledbSQLServer, hOReadWrite, "", hClientCursor + hCurseurForwardOnly)
Error (HErrorInfo ())
RESULT False
END
IF NOT HOpenConnection ("cnn_SqlServer" ) THEN
Error (HErrorInfo ())
RESULT False
END
HChangeConnection ("*", "cnn_SqlServer" ) THEN
s_CmdSql is string
s_CmdSql = "EXEC ,
IF NOT HExecuteSQLQuery(dS,"cnn_SqlServer",hQueryWithoutCorrection,s_CmdSql) THEN
Error (HErrorInfo ())
HFreeQuery(dS)
RESULT False
END
HFreeQuery(dS)
The stored procedure is executed twice and two lines appear in the table instead of one as planned.
In some case the insert is made 5 times.
Thanks.
I need help with MSSQLServer + HExecuteSQLQuery(). The problem occurs when I run a stored procedure with "INSERT"
I have a project with SQL Server 2008 R2 with oledb connection.
IF NOT HDescribeConnection ("cnn_SqlServer" , , , , hOledbSQLServer, hOReadWrite, "", hClientCursor + hCurseurForwardOnly)
Error (HErrorInfo ())
RESULT False
END
IF NOT HOpenConnection ("cnn_SqlServer" ) THEN
Error (HErrorInfo ())
RESULT False
END
HChangeConnection ("*", "cnn_SqlServer" ) THEN
s_CmdSql is string
s_CmdSql = "EXEC ,
IF NOT HExecuteSQLQuery(dS,"cnn_SqlServer",hQueryWithoutCorrection,s_CmdSql) THEN
Error (HErrorInfo ())
HFreeQuery(dS)
RESULT False
END
HFreeQuery(dS)
The stored procedure is executed twice and two lines appear in the table instead of one as planned.
In some case the insert is made 5 times.
Thanks.
Antworten: