trouble with uniqueidentifier

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alecarnero

    #1

    trouble with uniqueidentifier

    I have write this procedure
    ALTER PROCEDURE dbo.proba (@ident uniqueidentifie r)

    AS SELECT ident, nome FROM dbo.nomes WHERE (ident = @ident)


    Private Sub Form_Open(Cance l As Integer)
    Dim rsn As ADODB.Recordset
    Dim identi As Variant
    identi = "{3AB65B0A-60ED-4708-B492-85C56E880946}"
    Set rsn = New ADODB.Recordset
    rsn.Open "exec proba @iden='" & identi & "'", cn, adOpenKeyset,
    adLockOptimisti c
    Set Forms!auxpro.Re cordset = rsn
    End Sub

    when i try to execute this code in VB returns error of argument, what is
    wrong with the code , if the procedure works fine







  • PlatinumBay

    #2
    Re: trouble with uniqueidentifie r

    alecarnero,

    Try removing the '{' and '}' characters from the identi initialization code.

    Hope this helps,


    Steve

    "alecarnero " <alecarnero@uol .com.brwrote in message
    news:OQT9TLgqHH A.4180@TK2MSFTN GP04.phx.gbl...
    >I have write this procedure
    ALTER PROCEDURE dbo.proba (@ident uniqueidentifie r)
    >
    AS SELECT ident, nome FROM dbo.nomes WHERE (ident = @ident)
    >
    >
    Private Sub Form_Open(Cance l As Integer)
    Dim rsn As ADODB.Recordset
    Dim identi As Variant
    identi = "{3AB65B0A-60ED-4708-B492-85C56E880946}"
    Set rsn = New ADODB.Recordset
    rsn.Open "exec proba @iden='" & identi & "'", cn, adOpenKeyset,
    adLockOptimisti c
    Set Forms!auxpro.Re cordset = rsn
    End Sub
    >
    when i try to execute this code in VB returns error of argument, what is
    wrong with the code , if the procedure works fine
    >
    >
    >
    >
    >
    >
    >

    Comment

    Working...