Ai galera,
VB6 + Oracle
A rotina funciona em alguns registros e outros não.
Segue rotina:
Me.grdClientes.Col = 1
vChave = Me.grdClientes.Text
Me.cmdAlterar.Enabled = True
Screen.MousePointer = 11
' Limpar parametros anteriores
RemoverParametros gOraDB
' Adicionar parametros
gOraDB.Parameters.Add "PeCO_CLIE", vChave, 1
gOraDB.Parameters.Add "P_Cursor", "", 2
' Montar String de Conexão
gsSQL = "Begin :cCursor := " & cgUsuarioOra & ".PKG_BK_DOC_GARAN.F_SEL_SEGM"
gsSQL = gsSQL & "(:PeCO_CLIE); end; "
' Executar Procedure
Set godyGeral = gOraDB.CreatePLSQLDynaset(gsSQL, "cCursor", 0&)
'Limpar Paramentros
RemoverParametros gOraDB
Me.grdClientes.Col = 2
Me.fraDados.Caption = Me.grdClientes.Text
If godyGeral.EOF Then
Me.txtDocto = ""
Me.cboSegmento.ListIndex = -1
Me.txtOfficer = ""
Me.txtComent = ""
Me.cheIrregular.Value = 0
vGrava = 1
Else
Me.txtDocto = godyGeral!NU_CNPJ_CPFS
ValidarTexto
Me.cboSegmento = godyGeral!DE_SEGM
If Not IsNull(godyGeral!DE_OFFI) Then Me.txtOfficer = godyGeral!DE_OFFI
If Not IsNull(godyGeral!DE_COME) Then Me.txtComent = godyGeral!DE_COME
Me.cheIrregular.Value = godyGeral!TP_SITU
vGrava = 2
End If
Screen.MousePointer = 0
Valeu !!!
