Ask a Question related to ASP.NET General, Design and Development.
-
Jon Cosby #1
Calling a procedure
How do you call an existing procedure? My database has a procedure called
"StudentSchedule" with one parameter, @StudentID. I'm trying to fill the
results in a datagrid with a StoredProcedure command. The grid is not even
showing on the page.
SqlCommand cmdSchedule = new SqlCommand("StudentSchedule", this.cnBCC);
cmdSchedule.CommandType = CommandType.StoredProcedure;
SqlParameter studID = cmdSchedule.Parameters.Add("@StudentID",
SqlDbType.NChar, 9);
studID.Value = this.tbSID.Text.Trim();
SqlDataAdapter daSchedule = new SqlDataAdapter(cmdSchedule);
DataSet ds = new DataSet();
daSchedule.Fill(ds);
this.dgStudents.DataSource = ds;
Jon Cosby
Jon Cosby Guest
-
#39136 [NEW]: Calling a stored procedure that creates temp table
From: aspen dot olmsted at alliance dot biz Operating system: Windows XP SP2 PHP version: 5CVS-2006-10-12 (snap) PHP Bug Type: ... -
oracle stored procedure calling
I have two procedures test1 and test2. Resultset is returned by test2. My coldfusion code calls test1. PROCEDURE test1 (in_eid IN NUMBER,... -
Calling stored procedure from MysQL 5.0
I am trying to call stored procedures using <cfquery> in Coldfusion MX 7.0, but I am getting this error: Error Executing Database Query. General... -
ASP page calling a stored procedure
Im trying to call a stored procedure in SQL Server 2000 in ASP.. Heres my code.. ... -
Calling stored procedure on connection
Hello all, I'm having a dickens of a time calling a stored procedure on a connection. Every time I do, it generates an error "Arguments are of the... -
James J. Foster #2
Re: Calling a procedure
Add this line at the end:
this.dgStudents.DataBind();
--
James J. Foster, DotNetCoders
[url]http://www.dotnetcoders.com[/url]
"Jon Cosby" <jcosby@mindspring.com> wrote in message
news:bh8f1d$kf$1@slb2.atl.mindspring.net...this.cnBCC);> How do you call an existing procedure? My database has a procedure called
> "StudentSchedule" with one parameter, @StudentID. I'm trying to fill the
> results in a datagrid with a StoredProcedure command. The grid is not even
> showing on the page.
>
> SqlCommand cmdSchedule = new SqlCommand("StudentSchedule",> cmdSchedule.CommandType = CommandType.StoredProcedure;
>
> SqlParameter studID = cmdSchedule.Parameters.Add("@StudentID",
> SqlDbType.NChar, 9);
> studID.Value = this.tbSID.Text.Trim();
>
> SqlDataAdapter daSchedule = new SqlDataAdapter(cmdSchedule);
> DataSet ds = new DataSet();
>
> daSchedule.Fill(ds);
> this.dgStudents.DataSource = ds;
>
>
> Jon Cosby
>
>
James J. Foster Guest



Reply With Quote

