[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:
USE [Maintenance]
GO
/****** Object: StoredProcedure [WANSERN\wansern].[sp_WoBreakDownNotif] Script Date: 12/18/2007 11:50:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [WANSERN\wansern].[sp_WoBreakDownNotif]
-- Add the parameters for the stored procedure here
@myStatus varchar(50)
AS
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
FROM dbo.WOList INNER JOIN
dbo.Machine_Desc ON dbo.WOList.Mac_Code = dbo.Machine_Desc.Mac_Code INNER JOIN
dbo.Notif_WO ON dbo.WOList.Ref_No = dbo.Notif_WO.Ref_No
WHERE dbo.Notif_WO.Status = @myStatus
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
END
Another Question : How to call Store procedure from SQL Express via VB6 ?
Thanks for help ....
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. :)
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