STORE PROC de SQL y Visual
Publicado por PAblo (3 intervenciones) el 25/07/2002 21:33:26
A ver si saben qué pasa
Este es mi store en SQL......
CREATE PROCEDURE P_CUITDuplicado
@cuit char(13)
AS
declare @ok bit
set @ok=0
if(select count(cuit) from clientes where cuit=@cuit)>0
set @ok=1
return @ok
GO
y lo llamo desde visual de esta forma.......
Dim pro As New ADODB.Command
Dim aux As Boolean
pro.ActiveConnection = cnn
pro.CommandType = adCmdStoredProc
pro.CommandText = "P_CuitDuplicado"
pro.CommandTimeout = 15
If pro.Execute(, TxtDatos(0).Text) Then
MsgBox "Cuit Existente"
End If
Pero me tira este error
Este es mi store en SQL......
CREATE PROCEDURE P_CUITDuplicado
@cuit char(13)
AS
declare @ok bit
set @ok=0
if(select count(cuit) from clientes where cuit=@cuit)>0
set @ok=1
return @ok
GO
y lo llamo desde visual de esta forma.......
Dim pro As New ADODB.Command
Dim aux As Boolean
pro.ActiveConnection = cnn
pro.CommandType = adCmdStoredProc
pro.CommandText = "P_CuitDuplicado"
pro.CommandTimeout = 15
If pro.Execute(, TxtDatos(0).Text) Then
MsgBox "Cuit Existente"
End If
Pero me tira este error
Valora esta pregunta


0