CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    India
    Posts
    32

    How to call a Parametrised Stored procedure from VB

    hi
    i want to call a stored procedure with 3 in parameters and one out parameter of SQL Server 7.

    i have called a procedure with out parameters.

    if any one can help try out this....

    Thanks,
    AbhiDesh


  2. #2
    Join Date
    Oct 2001
    Location
    Karachi
    Posts
    91

    Re: How to call a Parametrised Stored procedure from VB

    hi.. here it is ....


    Dim cmdAddProperty as new ADODB.Command
    Dim Params(1 to 3) as Variant
    With cmdAddProperty
    .CommandType = adCmdStoredProc
    .CommandText = "SPAddProperty"
    .ActiveConnection = Con
    End With
    Params(1) = "abc"
    Params(2) = "bcd"
    Params(3) = "def"
    cmdAddProperty.Execute , Params




    here you go....
    happy programming...

    Faults are thick where love is thin

  3. #3
    Join Date
    Oct 2001
    Location
    Karachi
    Posts
    91

    forgot something..

    try this article too to get a clear idea
    http://www.vbworld.com/databases/sql...l4/index6.html

    Faults are thick where love is thin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured