PDA

View Full Version : [SOLVED:] Stored Procedure



mud2
12-18-2007, 09:52 PM
Why do i get so involved?
Can somebody give me a WORKING example of a stored procedure?...And, how to execute it?

Create Procedure MyMsg() -> error, wants an end.

BUT
Create ProcedureMyMsg() MsgBox("Hello") does NOT -> error, but still does not work! Does not like the proc!!

Thanks

XLGibbs
12-22-2007, 09:42 AM
This isn't for access is it?

In access macros it would be


Sub MyMsg()

Msgbox "Hello"

End SUb


to pass the text as a varable:



Sub mymsg (strMsg as string)
MsgBox strMsg
End sub

Sub Test()

Call MyMsg "hello"

End sub




You can create procedures in SQL Server, but can't do a msgbox from them exactly.