Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

SQL-Server Stored Procedure

I call a stored procedure in MS SQL-SERVER.
Everything worked fine. I Installed SQL-Server Service Pack last week. Now the SP works fine from ISQL and aborts when it is called from Delphi. I get no error in Delphi.
What can I do to ensure proper execution of the SP?
0
ASchindler
Asked:
ASchindler
1 Solution
 
JaccoCommented:
Do you use the TStoredProc component?
Are there any parameters of the stored proc necessary?
Do you fill the parameters correctly?
Are the types of the parameters specified correctly in the component?
With the correct type?
Try renewing the TStoredProc component.
Do you use the same parameters from ISQL and Delphi. Maybe your storedproc generates a server exception with the parameters from Delphi.

More info is needed to give an answer to your question.

Regards
Jacco
0
 
ASchindlerAuthor Commented:
I use a TQuery
There is one Parameter (INteger)
I assign the SQL Statment in Delphi
"EXPORT_ZNS_NENNUNGEN 97177"
I tried TStoredProc, TQuery, ODBCExpress Thstmt, Odbcexpress Query,... . I made a new Form in Delphi -
The Result was the same.
The Procedure Call is transfered to the SQL-Server (ich checked it by SQL Trace) but the Server canceles the Procedure without any Error Message.
I Evaluated the SQL Message (SQL_SUCCESS_WITH_INFO) but there was no hint why the procedure was aborted.
A week ago the Code works fine.
0
 
AndreasSchindlerCommented:
The Procedure in MS-SQL Server transfers the Count of Each Select Statement to the Client. The installed ODBC Driver has a Problem with the count data from Sql Server SP2.
With SET NOCOUNT=ON in the procedure the Problm was solved.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now