TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mayur Gujrathi
409
3.9k
1m
table 0 not found
Apr 29 2011 1:30 AM
i am calling stored procedure but getting error of table 0 not found
pr_ins_upd_reqdtls is stored procedure name
Dim rowcount As Integer
Dim ds As DataSet = New DataSet
Dim cmd As SqlCommand = New SqlCommand
Dim constr As String = ConfigurationManager.AppSettings("PooledConnectionString")
Dim sqlcon As SqlConnection = New SqlConnection(constr)
cmd.Connection = sqlcon
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "pr_ins_upd_reqdtls"
Dim da As SqlDataAdapter = New SqlDataAdapter("pr_ins_upd_reqdtls", sqlcon)
da.SelectCommand = cmd
Dim Var_StrLoginame As String = Session("LoginName")
cmd.Parameters.AddWithValue("@pa_action", "SEARCHCHK")
cmd.Parameters.AddWithValue("@pa_tholder", ddlselect.Value)
If (filter.Value = "I") Then
cmd.Parameters.AddWithValue("@pa_boid", hdfilter.Value)
cmd.Parameters.AddWithValue("@pa_req_slip_no", "")
cmd.Parameters.AddWithValue("@pa_req_date", "")
ElseIf (filter.Value = "S") Then
cmd.Parameters.AddWithValue("@pa_boid", "")
cmd.Parameters.AddWithValue("@pa_req_slip_no", hdfilter.Value)
cmd.Parameters.AddWithValue("@pa_req_date", "")
ElseIf (filter.Value = "D") Then
cmd.Parameters.AddWithValue("@pa_boid", "")
cmd.Parameters.AddWithValue("@pa_req_slip_no", "")
Dim pdate As Date
pdate = ClsDate.GetFormatedDate(hdfilter.Value, "DD/MM/YYYY")
cmd.Parameters.AddWithValue("@pa_req_date", pdate)
End If
cmd.Parameters.AddWithValue("@pa_login_name", Var_StrLoginame)
'parameters not in use
cmd.Parameters.AddWithValue("@pa_id", 0)
cmd.Parameters.AddWithValue("@pa_boname", "")
cmd.Parameters.AddWithValue("@pa_sholder", "")
cmd.Parameters.AddWithValue("@pa_chk_yn", 0)
cmd.Parameters.AddWithValue("@pa_rmks", "")
cmd.Parameters.Add("@pa_error", SqlDbType.VarChar, 8000)
cmd.Parameters("@pa_error").DbType = DbType.AnsiString
cmd.Parameters("@pa_error").Direction = ParameterDirection.Output
da.Fill(ds, "pr_ins_upd_reqdtls")
If (Not (ds.Tables(0).Rows.Count > 0)) Then
rowcount = ds.Tables(0).Rows.Count
'GridView1.Visible = False
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
lblsubheader.Text = "Records Found, " & rowcount & " "
ElseIf ds.Tables(0).Rows.Count > 0 Then
Reply
Answers (
25
)
About calling of stored procedure
Executing Several SqlCommands in a Single OracleConnection