Results 1 to 3 of 3

Thread: [RESOLVED] How to use Store Procedure of SQL Express in VB6

  1. #1

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Resolved [RESOLVED] How to use Store Procedure of SQL Express in VB6

    Hi,

    I'm Newbie of Store Procedure.

    Below is my Store Procedure code :
    I need to count if notified message found inside database > 0 then pop up message.

    sql Code:
    1. USE [Maintenance]
    2. GO
    3. /****** Object:  StoredProcedure [WANSERN\wansern].[sp_WoBreakDownNotif]    Script Date: 12/18/2007 11:50:11 ******/
    4. SET ANSI_NULLS ON
    5. GO
    6. SET QUOTED_IDENTIFIER ON
    7. GO
    8.  
    9. ALTER PROCEDURE [WANSERN\wansern].[sp_WoBreakDownNotif]
    10.     -- Add the parameters for the stored procedure here
    11.     @myStatus varchar(50)
    12. AS
    13. SELECT    dbo.Notif_WO.Ref_No, dbo.Notif_WO.MsgLoc, dbo.Machine_Desc.Mac_Code, dbo.WOList.Date_WO, dbo.WOList.Dept, dbo.WOList.Ref_To
    14. FROM      dbo.WOList INNER JOIN
    15.           dbo.Machine_Desc ON dbo.WOList.Mac_Code = dbo.Machine_Desc.Mac_Code INNER JOIN
    16.           dbo.Notif_WO ON dbo.WOList.Ref_No = dbo.Notif_WO.Ref_No
    17. WHERE  dbo.Notif_WO.Status = @myStatus
    18. BEGIN
    19.     -- SET NOCOUNT ON added to prevent extra result sets from
    20.     -- interfering with SELECT statements.
    21.     SET NOCOUNT ON;
    22.    
    23.     -- Insert statements for procedure here
    24.    
    25. END

    Another Question : How to call Store procedure from SQL Express via VB6 ?

    Thanks for help ....
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [RESOLVED] How to use Store Procedure of SQL Express in VB6

    Moved

    This thread is marked resolved? Is it? If so, please post your resolution.

    Thanks.

  3. #3

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Re: [RESOLVED] How to use Store Procedure of SQL Express in VB6

    Sorry Hack, I'll post my resolution now :-)

    My Stored Procedure do not have any problem just i can't modify it after created. I found the solution that before generate script must executes your stored procedure once.


    2nd. I read the article from codeproject to find out the method to call stored procedure by ado.net. I post the link to share with all of you.

    http://www.codeproject.com/KB/vbscri...spx?print=true
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

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