Stored Procedure Problem

Dim wrk As New NotesUiWorkspace Set ses= New NotesSession

Dim sess As New LCSession

Dim conn As New LCConnection ("Oracle")

Dim db As NotesDatabase

Dim uidoc As notesuidocument



Set db=ses.currentdatabase

Set uidoc=wrk.currentdocument

Hno= uidoc.fieldgettext("A_Hesap_No")

AKod=uidoc.fieldgettext("A_Adres_Kod") 

IlceKod= uidoc.fieldgettext("A_Ilce_Kod")

IlKod=uidoc.fieldgettext("A_Il_Kod")

Adr1=uidoc.fieldgettext("A_Adres1")

Adr2=uidoc.fieldgettext("A_Adres2")

Pk=	uidoc.fieldgettext("A_Posta_Kod")

Uk=uidoc.fieldgettext("A_Ulke_Kod")



conn.Server = "Service Name"

conn.Userid = "Username"

conn.Password = "pass"

Call conn.Connect

If conn.isconnected Then

	Msgbox "a"

End If

stored procedure name…

conn.owner="...."

conn.Procedure = "Proc Name"

output parameters declared in the stored procedure…

conn.Fieldnames = "p_hata_kod, p_hata_aciklama"

input/output data…

Dim input_fieldlist As New LCFieldList

Dim output_parms As New LCFieldlist



Dim p_hesap_no As New LCField (1, LCTYPE_INT)

Dim p_adres_kod As New LCField (1, LCTYPE_Text)

Dim p_adres1 As New LCField (1, LCTYPE_TEXT)

Dim p_adres2 As New LCField (1, LCTYPE_TEXT)	

Dim p_ilce_kod As New LCField (1, LCTYPE_INT)

Dim p_il_kod As New LCField (1, LCTYPE_INT)

Dim p_posta_kod As New LCField (1, LCTYPE_INT)

Dim p_adres_ulke_kod As New LCField (1, LCTYPE_INT)

Dim p_hata_kod As New LCField (1, LCTYPE_TEXT)

Dim p_hata_aciklama As New LCField (1, LCTYPE_TEXT)

Dim out As Double



Set p_hesap_no = input_fieldlist.Append ("p_hesap_no", LCTYPE_INT)

p_hesap_no.Value = Hno

Set p_adres_kod = input_fieldlist.Append ("p_adres_kod", LCTYPE_TEXT)

p_adres_kod.Value = AKod

Set p_adres1 = input_fieldlist.Append ("p_adres1", LCTYPE_TEXT)

p_adres1.Value = Adr1

Set p_adres2 = input_fieldlist.Append ("p_adres2", LCTYPE_TEXT)

p_adres2.Value = Adr2

Set p_ilce_kod = input_fieldlist.Append ("p_ilce_kod", LCTYPE_INT)

p_ilce_kod.Value = IlceKod

Set p_il_kod = input_fieldlist.Append ("p_il_kod", LCTYPE_INT)

p_il_kod.Value = IlKod

Set p_posta_kod = input_fieldlist.Append ("p_posta_kod", LCTYPE_INT)

p_posta_kod.Value = Pk

Set p_adres_ulke_kod = input_fieldlist.Append ("p_adres_ulke_kod", LCTYPE_INT)

p_adres_ulke_kod.Value = Uk

out = conn.Call (input_fieldlist, 1 , output_parms)

'fetch parameter(s) into the output_parms fieldlist...	

(Problem is here)

out = conn.Fetch (output_parms)

Set p_hata_kod = output_parms.GetField (1)

Set p_hata_aciklama = output_parms.GetField (2)

'use the output parameter value(s) in your script...

If 	p_hata_kod.Value(0)<>"0000" Then

   ' Not Success => rollback yapıyorum	

	Call conn.Action(LCACTION_ROLLBACK)	

Else

    ' Success => Save ediyorum	

	Call conn.Action(LCACTION_COMMIT)	

End If

Msgbox "Your new sales order number is " & p_hata_kod.Value(0) +p_hata_aciklama.Value(0)

conn.Disconnect





 It is random problem when code is progress until (Problem is here)line. Developer is locked. Is there any body to see this problem before. Thank you.

Subject: Stored Procedure Problem

It sounds like you’re saying that the code hangs at some point, but the line you flagged is not an executable statement. Does it hang on the Call or the Fetch?

If on the Call, bear in mind you’re calling a procedure. Perhaps the procedure is in an infinite loop.

By the way, the Enterprise Integration forum is the best place to ask LC LSX questions.