Sql Server+Delphi hata vermeme

Yapmak istediğiniz işle ilgili doğru bileşeni bulmak için burayı kullanabilirsiniz. Sadece bulmak için, diğer sorular Programlama forumuna lütfen.
Forum kuralları
Bu forum sadece yapacağınız işle alakalı doğru bileşeni bulmak içindir. Şöyle bir şey yapmam lazım, hangi bileşeni kullanıyım diyorsanız, doğru yerdesiniz.
Cevapla
fen3ix
Üye
Mesajlar: 5
Kayıt: 15 Eki 2010 03:32

Sql Server+Delphi hata vermeme

Mesaj gönderen fen3ix »

Arkadaşlar merhaba,

Benim şöyle enteresan bir problemim var karşılaşan oldu mu fikirlerinizi bekliyorum.

ADO kullanıyorum sorgu yazıyorum exec ettiğimde delphi tarafında hiç bir sorun yok normal çalışmış gibi gösteriyor hiç bir hata ya da uyarı yok ama aslında sql server tarafında hata almış gerekli insert,update ve delete işlemlerini yapmamış bunun ayarı felan mı var benmi yanlış yapılandırdım acaba bişeyleri. Sorgu aşağıdaki gibi. Bu sorgu delphi de hata vermezken except e düşmezken. Sql server da "Msg 8144, Level 16, State 2, Procedure UspD_Sevk, Line 0
UspD_Sevk yordamı veya işlevi için çok fazla bağımsız değişken belirtilmiş." hatası veriyor. Hatayı vermesi normal çünkü procedure de @uretimKodu parametresini eklemedim ama bunu delphi neden göz ardı ediyor ve hata vermiyor.

EXEC UspD_Sevk @SevkNo=N'SVK033',
@UretimKodu=N'URT0000109'
Kullanıcı avatarı
SamerAssil
Üye
Mesajlar: 3
Kayıt: 22 Ağu 2018 10:29

Re: Sql Server+Delphi hata vermeme

Mesaj gönderen SamerAssil »

Sorry my turkish not so good. ( my answer is depend on what I did understand from your Question )

I think the sql server send DONE_IN_PROC with the stored Procedure results . and that what makes Delphi think ( everything ok . no problems . and I got the result )

actually the stored procedure send the ( affected rows count ) and according to this :
https://docs.microsoft.com/en-us/sql/t- ... erver-2017
SET NOCOUNT ON prevents the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure
If you put

Kod: Tümünü seç

SET NOCOUNT ON; 
in first line in your stored procedure . this will stop ( DONE_IN_PROC ) and ( effected Rows count ) from sending to Delphi leave it with error messages only .

Try that .. I am not sure about my answer . but this is what in my mind now.

I hope my answer is helpfull . Have a good day
Cevapla