I had developed an application based on WIN API that interact with MS SQL Server.
The connection is established through ODBC.
Anyway, I need to know how to execute a stored procedure or Database built-in function.
I had searched the web, I just found that I have to create SQL CLR project. However, I am wondering if there is another way supplied by ODBC just like executing select, insert or update statements that were successful in my application.
Thanks in advance for your advises and help.
Regards,
Ahmad
Essentially, you will do an ODBC "PrepareStatement" and then submit it to the
Execute function.
BTW: To execute a stored procedure, ODBC will not give the same level of detail for modification, etc. as the SQL Workbench. However, you can access and execute a store procedure.
Thanks for your info.
I am already using SQLExecute and SQLExecDirect functions while executing SELECT, INSERT and UPDATE statements.
Briefly, the problem I'm facing is:
Any database stored function or user defined function has a return value that must be passed back to the Application level. I am passing the function into the database and executing it successfully. However, I am not able to retrieve its returned value just as we do upon running any SELECT statement. Upon running SELECT statement, we bind each column to the proper variable on application level. Then upon fetching data, the retrieved columns are then returned into those variables.