Passing a adGuid parameters to a SP... 
Author Message
 Passing a adGuid parameters to a SP...

Does anyone know why I get this error and what should be changed?
The error is : Syntax error converting from a character string to
uniqueidentifier.

        Dim cmdADO as ADODB.Command
        Dim strUserId as string

        strUserId = "{B69AE88F-9B92-11D4-B02F-00508BD6A189}"
        Set cmdADO = New ADODB.Command

        With cmdADO
                .ActiveConnection = ActiveConnection
                .CommandType = adCmdStoredProc
                .CommandText = "SD_TEST"
        End With

        Set parADOUserId = New ADODB.Parameter

adParamInput, 72, Trim$(strUserId))
        cmdADO.Parameters.Append parADOUserId

        With cmdADO
            .Execute
        End With

        Set parADOUserId = Nothing
        Set cmdADO = Nothing

Tx,
Kurt

--
__________
Kurt Lefevre
Tech Data NV/SA Belgium


http://www.*-*-*.com/



Sun, 25 Jan 2004 19:32:05 GMT  
 Passing a adGuid parameters to a SP...
Kurt,

I get no error when I set up your code. What version of SQL server and MDAc
do you have installed?

Scot

--------------------

Quote:


>Newsgroups: microsoft.public.vb.database
>Subject: Passing a adGuid parameters to a SP...
>Date: Wed, 8 Aug 2001 13:32:05 +0200
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
>Lines: 46

>NNTP-Posting-Host: gateway.c2000.be
>X-Trace: 997270327 news.be.uu.net 24505 194.7.183.94

>Path:

cppssbbsa01.microsoft.com!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!skynet.be!bnewspeer01.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.
uu.net!news.be.uu.net!not-for-mail
Quote:
>Xref: cppssbbsa01.microsoft.com microsoft.public.vb.database:74332
>X-Tomcat-NG: microsoft.public.vb.database

>Does anyone know why I get this error and what should be changed?
>The error is : Syntax error converting from a character string to
>uniqueidentifier.

>        Dim cmdADO as ADODB.Command
>        Dim strUserId as string

>        strUserId = "{B69AE88F-9B92-11D4-B02F-00508BD6A189}"
>        Set cmdADO = New ADODB.Command

>        With cmdADO
>                .ActiveConnection = ActiveConnection
>                .CommandType = adCmdStoredProc
>                .CommandText = "SD_TEST"
>        End With

>        Set parADOUserId = New ADODB.Parameter

>adParamInput, 72, Trim$(strUserId))
>        cmdADO.Parameters.Append parADOUserId

>        With cmdADO
>            .Execute
>        End With

>        Set parADOUserId = Nothing
>        Set cmdADO = Nothing

>Tx,
>Kurt

>--
>__________
>Kurt Lefevre
>Tech Data NV/SA Belgium


>http://www.techdata.be



Sun, 25 Jan 2004 22:56:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing a adGuid parameter to a SP...

2. pass parameter to SQL SP from VB and return recordset

3. Passing parameters to IF-Statement SP

4. Problem passing the default parameters in sp

5. Passing Parameters to IF-Statement SP

6. Don't pass a parameter to SP

7. Trouble with SP output parameter

8. I can't call Oracle SP from VB5 with over 10 parameters

9. Active X control for collecting SP parameters

10. SP Parameters

11. Performing query past trough a parameter in a SP

12. Creating a table via SP where the table name is a parameter

 

 
Powered by phpBB® Forum Software