You need to read the values from the controls on the page and pass
them as parameters to the stored procedure. The stored procedure
cannot read the controls on the page.
Stored Procedure should look something like...
CREATE PROCEDURE dbo.proc_selDesc2
@Classname nvarchar(50)
AS
Select * From dbo.ClassDescription d, dbo.Classes c
Where d.classid=c.classid
and c.clname= @ClassName
GO
Your code should look something like
Dim myCommand As New SqlCommand("proc_selDesc2", myConnection)
myCommand.CommandType = CommandType.StoredProcedure
Dim myParm As SqlParameter = myCommand.Parameters.Add("@ClassName",
SqlDbType.NVarChar, 50)
myParm.Value = ddl1.SelectedItem.Value
Then you call your execute reader.
Here's a full example...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingstoredprocedureswithcommand.asp
HTH
--
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/