<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>2 Apr 2015 10:32:00 Z</lastBuildDate><pubDate>1 Apr 2015 09:17:00 Z</pubDate><description>Hi All,&#13;
&#13;
When I try to call a stored procedure on an MSSQL database (v 2012) I get a weird error.&#13;
Access is via OLEdb driver.&#13;
&#13;
Connection is:&#13;
DB_Connection..Caption = "MyConnection"&#13;
DB_Connection..User = DB_UserName&#13;
DB_Connection..Password = DB_Password&#13;
DB_Connection..Server = DB_Server&#13;
DB_Connection..Database = DB_Name&#13;
DB_Connection..Provider = hOledbSQLServer&#13;
DB_Connection..Access = hOReadWrite&#13;
&#13;
The piece of code that is called to run the stored procedure:&#13;
&#13;
// Clear all error messages in the list previously set by this function pErrLst:ClearListForCaller(dbgInfo(dbgElement,dbgCurrentProcess)) // For testing m_SQLCommand = "EXEC spTest" // also tried "EXEC dbo.spTest" //// IF NOT HExecuteSQLQuery(m_dsResults,pCon,hQueryWithoutCorrection+hNoBind,m_SQLCommand) THEN ErrMsg:AddToList(pErrLst,soErrorMessage::EM_ERROR,"DB","Database error. Executing: "+m_SQLCommand,HErrorInfo(hErrMessage)) MyApp:LogError(pErrLst,HErrorInfo(hErrFullDetails)) bResult = False ELSE m_NumberOfRecords = HNbRec(m_dsResults) ...&#13;
Tried with or without the hNoBind option, no difference.&#13;
Tried with hQueryDefault and hQueryWithoutCorrection; no effect&#13;
&#13;
The error is:&#13;
&#13;
What happened?&#13;
Error in the SQL code of query. Unable to initialize the query.&#13;
Unexpected word: spTest&#13;
&#13;
Error code: 70208&#13;
Level: non-fatal error (EL_ONRETURN)&#13;
WD55 error code: 208&#13;
&#13;
Dump of the error of 'WD190SQL.DLL' module (19.0.60.2).&#13;
Debugging information:&#13;
IEWD190SQL=1.7&#13;
Module=&#13;
Version=&lt;19.0.60.2&gt;&#13;
Additional Information:&#13;
EIT_LOGICALTABLENAME :&#13;
&#13;
When I use as the m_SQLCommand = "Select * from users" to test this, the query runs fine !&#13;
&#13;
When I run the "EXEC spTest" from the SQL Mangement Studio, its runs fine !&#13;
&#13;
When I use the Hxxxx commands or a Query with the same connection, this all works perfectly.&#13;
&#13;
What would be the problem that I cannot call a stored procedure via the EXEC ... syntax ? This must be something stupid or a little thing a forgot :confused:, on the forum I have found different posts using the same syntax to execute a stored procedure.&#13;
&#13;
So what could be wrong ? :hot:&#13;
&#13;
Thanks&#13;
Danny</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery/read.awp</link><title>[WB19] Weird problem running stored procedure via HExecuteSQLQuery</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51318/read.awp</comments><pubDate>2 Apr 2015 10:32:00 Z</pubDate><description>Hi Danny,&#13;
&#13;
Thanks for the heads up!&#13;
&#13;
Interesting... I'll have a check...&#13;
There's probably a similar reason why I passed the…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51318/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51318/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery/read.awp">[WB19] Weird problem running stored procedure via HExecuteSQLQuery</source><title>Re: [WB19] Weird problem running stored procedure via HExecuteSQLQuery [SOLVED]</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51299/read.awp</comments><pubDate>1 Apr 2015 14:50:00 Z</pubDate><description>Peter,&#13;
&#13;
I tried this code in a windev Window, just to test things, This code worked.&#13;
&#13;
Myconnection..Caption = "MyConnection"…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51299/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51299/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery/read.awp">[WB19] Weird problem running stored procedure via HExecuteSQLQuery</source><title>Re: [WB19] Weird problem running stored procedure via HExecuteSQLQuery [SOLVED]</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51296/read.awp</comments><pubDate>1 Apr 2015 12:47:00 Z</pubDate><description>Hi Peter,&#13;
&#13;
Yes I am using your WXFramework, and it is great working with it !&#13;
&#13;
Thanks for the tips, I have checked them:&#13;
&#13;
…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51296/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51296/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery/read.awp">[WB19] Weird problem running stored procedure via HExecuteSQLQuery</source><title>Re: [WB19] Weird problem running stored procedure via HExecuteSQLQuery</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51295/read.awp</comments><pubDate>1 Apr 2015 10:43:00 Z</pubDate><description>Hi Danny,&#13;
&#13;
I'm happy to see some of my classes and best practice concepts make it to good use...&#13;
&#13;
Some thoughts on your ques…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51295/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery-51295/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51293-wb19-weird-problem-running-stored-procedure-via-hexecutesqlquery/read.awp">[WB19] Weird problem running stored procedure via HExecuteSQLQuery</source><title>Re: [WB19] Weird problem running stored procedure via HExecuteSQLQuery</title></item></channel></rss>
