If you find that your stored procedure is perfectly alright then :
1.)check what parametrs value that are going to stored procedure from your code
2.)what is the type and length of the parameters you have specified in your procedure and whatr is the length of the parameter that is going to the procedure from your code.
not same name and type for the arguments then you should check the length of the arguments like if you have given a parameter VARCHAR(5) in stored procedure and you are sending "HIITHEREIMPROGRAMMER"(this string length is more than 5) from your code as string
then in that case your stored procedure will not give any error niether it will return any result i mean you should check like this for every parameter in your stored procedure.......
mr.crazy
Member
34 Points
79 Posts
Re: There is no row at position 0
May 05, 2012 05:32 AM|LINK
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="edit0" CommandArgument='<%# Eval("Emp_ID") %>'>edit</asp:LinkButton>and here compiler give me null
Rohit Binjol...
Member
84 Points
32 Posts
Re: There is no row at position 0
May 05, 2012 05:54 AM|LINK
Hi there,
If you find that your stored procedure is perfectly alright then :
1.)check what parametrs value that are going to stored procedure from your code
2.)what is the type and length of the parameters you have specified in your procedure and whatr is the length of the parameter that is going to the procedure from your code.
Hope this helps.................
mr.crazy
Member
34 Points
79 Posts
Re: There is no row at position 0
May 05, 2012 06:13 AM|LINK
parameter i commandargument i added above it has the same
name and same type
Rohit Binjol...
Member
84 Points
32 Posts
Re: There is no row at position 0
May 05, 2012 06:55 AM|LINK
not same name and type for the arguments then you should check the length of the arguments like if you have given a parameter VARCHAR(5) in stored procedure and you are sending "HIITHEREIMPROGRAMMER"(this string length is more than 5) from your code as string then in that case your stored procedure will not give any error niether it will return any result i mean you should check like this for every parameter in your stored procedure.......
Please let me know if this is not the problem.
PLEASE mARK THIS AS ANSWER IF IT HELPS.
Hope this helps......
mr.crazy
Member
34 Points
79 Posts
Re: There is no row at position 0
May 05, 2012 08:38 AM|LINK
friend this is not a problem because the arguments found in database
Rohit Binjol...
Member
84 Points
32 Posts
Re: There is no row at position 0
May 05, 2012 09:50 AM|LINK
can you please specify what you are saying because i didnt get it .......
sriramabi
Contributor
4351 Points
1277 Posts
Re: There is no row at position 0
May 05, 2012 10:31 AM|LINK
hai
change this line
and pls check this
http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Get-DataTable-using-open-connection.html