problem in check box [modified]
-
Hi am a beginner in dotnet .Am creating a web application in asp vb.net .First i will tell what i want to accomplish First i have a page when the user logins in to that site the page will display what all the tasks allocated to him in a datagrid The datagrid has a check box for each of the rows being displayed. and outside the datagrid there is a send button.When the user clicks the check box and then clicks the send button these datas must get displayed in the another datagrid which is present in another page. What i have done in back end for this is: When i check the check box and click the save button all the details will get inserted into the temp table and inside the temp table i have set a flag when the user checks the check box the flag will turn into "y" and the another datagrid which i want to display all the records will choose only the records where the flag is set to "y" and the codes for it is as follows: the SP on button click is as follows: CREATE PROCEDURE USP_VIEW_TASK_UPDATE ( @TASK_ID VARCHAR(5), @TASK_ALLOC_DATE DATETIME, @PROJ_ID VARCHAR(15), @SUBMOD_ID VARCHAR(15), @ACTIVITY VARCHAR(15), @TASK_CREATE_BY VARCHAR(15), @TASK_DETAILS VARCHAR(100), @ASSOC_ID VARCHAR(15), @SEND CHAR(1) ) AS BEGIN CREATE TABLE UST_VIEW_TASK_TEMP ( TASK_ID VARCHAR(5), TASK_ALLOC_DATE DATETIME, PROJ_ID VARCHAR(15), SUBMOD_ID VARCHAR(15), ACTIVITY VARCHAR(20), TASK_CREATE_BY VARCHAR(15), TASK_DETAILS VARCHAR(100), SEND CHAR(1) ) INSERT INTO UST_VIEW_TASK_TEMP VALUES ( @TASK_ID, @TASK_ALLOC_DATE, @PROJ_ID, @SUBMOD_ID, @ACTIVITY, @TASK_CREATE_BY, @TASK_DETAILS, @SEND ) SELECT ALLO.TASK_ID, ALLO.TASK_ALLOC_DATE, HIST.PROJ_ID, HIST.SUBMOD_ID, HIST.ACTIVITY, HIST.TASK_CREATE_BY, ALLO.TASK_DETAILS, 'N' FROM UST_TASK_ALLOCATION ALLO, UST_TASK_HISTORY HIST WHERE ASSOC_ID =@ASSOC_ID AND convert(varchar,ALLO.TASK_ALLOC_DATE,112) =convert(varchar,getdate(),112) AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID UPDATE UST_VIEW_TASK_TEMP SET SEND='Y' WHERE ASSOC_ID =@ASSOC_ID AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID END and the front end which i havedone on selecting a check box and the button click is: Dim bsl As New BSL Dim item As DataGridItem Dim chkBox As CheckBox Dim AllocatedDate As String Dim taskid As String Dim ProjID As String Dim Subm
-
Hi am a beginner in dotnet .Am creating a web application in asp vb.net .First i will tell what i want to accomplish First i have a page when the user logins in to that site the page will display what all the tasks allocated to him in a datagrid The datagrid has a check box for each of the rows being displayed. and outside the datagrid there is a send button.When the user clicks the check box and then clicks the send button these datas must get displayed in the another datagrid which is present in another page. What i have done in back end for this is: When i check the check box and click the save button all the details will get inserted into the temp table and inside the temp table i have set a flag when the user checks the check box the flag will turn into "y" and the another datagrid which i want to display all the records will choose only the records where the flag is set to "y" and the codes for it is as follows: the SP on button click is as follows: CREATE PROCEDURE USP_VIEW_TASK_UPDATE ( @TASK_ID VARCHAR(5), @TASK_ALLOC_DATE DATETIME, @PROJ_ID VARCHAR(15), @SUBMOD_ID VARCHAR(15), @ACTIVITY VARCHAR(15), @TASK_CREATE_BY VARCHAR(15), @TASK_DETAILS VARCHAR(100), @ASSOC_ID VARCHAR(15), @SEND CHAR(1) ) AS BEGIN CREATE TABLE UST_VIEW_TASK_TEMP ( TASK_ID VARCHAR(5), TASK_ALLOC_DATE DATETIME, PROJ_ID VARCHAR(15), SUBMOD_ID VARCHAR(15), ACTIVITY VARCHAR(20), TASK_CREATE_BY VARCHAR(15), TASK_DETAILS VARCHAR(100), SEND CHAR(1) ) INSERT INTO UST_VIEW_TASK_TEMP VALUES ( @TASK_ID, @TASK_ALLOC_DATE, @PROJ_ID, @SUBMOD_ID, @ACTIVITY, @TASK_CREATE_BY, @TASK_DETAILS, @SEND ) SELECT ALLO.TASK_ID, ALLO.TASK_ALLOC_DATE, HIST.PROJ_ID, HIST.SUBMOD_ID, HIST.ACTIVITY, HIST.TASK_CREATE_BY, ALLO.TASK_DETAILS, 'N' FROM UST_TASK_ALLOCATION ALLO, UST_TASK_HISTORY HIST WHERE ASSOC_ID =@ASSOC_ID AND convert(varchar,ALLO.TASK_ALLOC_DATE,112) =convert(varchar,getdate(),112) AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID UPDATE UST_VIEW_TASK_TEMP SET SEND='Y' WHERE ASSOC_ID =@ASSOC_ID AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID END and the front end which i havedone on selecting a check box and the button click is: Dim bsl As New BSL Dim item As DataGridItem Dim chkBox As CheckBox Dim AllocatedDate As String Dim taskid As String Dim ProjID As String Dim Subm
Sounds like a complex task for a beginner - choose something easier, like working through a book.
Christian Graus Driven to the arms of OSX by Vista. "Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
-
Sounds like a complex task for a beginner - choose something easier, like working through a book.
Christian Graus Driven to the arms of OSX by Vista. "Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
Hi graus, I have to do this and i want a help and not skipping from difficult things if u can help me
-
Hi am a beginner in dotnet .Am creating a web application in asp vb.net .First i will tell what i want to accomplish First i have a page when the user logins in to that site the page will display what all the tasks allocated to him in a datagrid The datagrid has a check box for each of the rows being displayed. and outside the datagrid there is a send button.When the user clicks the check box and then clicks the send button these datas must get displayed in the another datagrid which is present in another page. What i have done in back end for this is: When i check the check box and click the save button all the details will get inserted into the temp table and inside the temp table i have set a flag when the user checks the check box the flag will turn into "y" and the another datagrid which i want to display all the records will choose only the records where the flag is set to "y" and the codes for it is as follows: the SP on button click is as follows: CREATE PROCEDURE USP_VIEW_TASK_UPDATE ( @TASK_ID VARCHAR(5), @TASK_ALLOC_DATE DATETIME, @PROJ_ID VARCHAR(15), @SUBMOD_ID VARCHAR(15), @ACTIVITY VARCHAR(15), @TASK_CREATE_BY VARCHAR(15), @TASK_DETAILS VARCHAR(100), @ASSOC_ID VARCHAR(15), @SEND CHAR(1) ) AS BEGIN CREATE TABLE UST_VIEW_TASK_TEMP ( TASK_ID VARCHAR(5), TASK_ALLOC_DATE DATETIME, PROJ_ID VARCHAR(15), SUBMOD_ID VARCHAR(15), ACTIVITY VARCHAR(20), TASK_CREATE_BY VARCHAR(15), TASK_DETAILS VARCHAR(100), SEND CHAR(1) ) INSERT INTO UST_VIEW_TASK_TEMP VALUES ( @TASK_ID, @TASK_ALLOC_DATE, @PROJ_ID, @SUBMOD_ID, @ACTIVITY, @TASK_CREATE_BY, @TASK_DETAILS, @SEND ) SELECT ALLO.TASK_ID, ALLO.TASK_ALLOC_DATE, HIST.PROJ_ID, HIST.SUBMOD_ID, HIST.ACTIVITY, HIST.TASK_CREATE_BY, ALLO.TASK_DETAILS, 'N' FROM UST_TASK_ALLOCATION ALLO, UST_TASK_HISTORY HIST WHERE ASSOC_ID =@ASSOC_ID AND convert(varchar,ALLO.TASK_ALLOC_DATE,112) =convert(varchar,getdate(),112) AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID UPDATE UST_VIEW_TASK_TEMP SET SEND='Y' WHERE ASSOC_ID =@ASSOC_ID AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID END and the front end which i havedone on selecting a check box and the button click is: Dim bsl As New BSL Dim item As DataGridItem Dim chkBox As CheckBox Dim AllocatedDate As String Dim taskid As String Dim ProjID As String Dim Subm
susan_151615 wrote:
Catch ex As Exception End Try
Don't just catch the exception and ignore it. If there is a problem, you won't get any notification about it, and you have no information about what it could be. Comment out the Try..Catch code until you have got the code working. After that you can reintroduce it, with the addition of actually handling the exception in some way, e.g. displaying a message to the user.
Despite everything, the person most likely to be fooling you next is yourself.
-
susan_151615 wrote:
Catch ex As Exception End Try
Don't just catch the exception and ignore it. If there is a problem, you won't get any notification about it, and you have no information about what it could be. Comment out the Try..Catch code until you have got the code working. After that you can reintroduce it, with the addition of actually handling the exception in some way, e.g. displaying a message to the user.
Despite everything, the person most likely to be fooling you next is yourself.
Hi thank You, after u mentioned it i wrote in catch System.Diagnostics.Trace.WriteLine("[] Exception " & ex.Message) after that i debugged it its throwing an error like this "Object reference not set to an instance of an object." in the same line which i entined before
-
Hi am a beginner in dotnet .Am creating a web application in asp vb.net .First i will tell what i want to accomplish First i have a page when the user logins in to that site the page will display what all the tasks allocated to him in a datagrid The datagrid has a check box for each of the rows being displayed. and outside the datagrid there is a send button.When the user clicks the check box and then clicks the send button these datas must get displayed in the another datagrid which is present in another page. What i have done in back end for this is: When i check the check box and click the save button all the details will get inserted into the temp table and inside the temp table i have set a flag when the user checks the check box the flag will turn into "y" and the another datagrid which i want to display all the records will choose only the records where the flag is set to "y" and the codes for it is as follows: the SP on button click is as follows: CREATE PROCEDURE USP_VIEW_TASK_UPDATE ( @TASK_ID VARCHAR(5), @TASK_ALLOC_DATE DATETIME, @PROJ_ID VARCHAR(15), @SUBMOD_ID VARCHAR(15), @ACTIVITY VARCHAR(15), @TASK_CREATE_BY VARCHAR(15), @TASK_DETAILS VARCHAR(100), @ASSOC_ID VARCHAR(15), @SEND CHAR(1) ) AS BEGIN CREATE TABLE UST_VIEW_TASK_TEMP ( TASK_ID VARCHAR(5), TASK_ALLOC_DATE DATETIME, PROJ_ID VARCHAR(15), SUBMOD_ID VARCHAR(15), ACTIVITY VARCHAR(20), TASK_CREATE_BY VARCHAR(15), TASK_DETAILS VARCHAR(100), SEND CHAR(1) ) INSERT INTO UST_VIEW_TASK_TEMP VALUES ( @TASK_ID, @TASK_ALLOC_DATE, @PROJ_ID, @SUBMOD_ID, @ACTIVITY, @TASK_CREATE_BY, @TASK_DETAILS, @SEND ) SELECT ALLO.TASK_ID, ALLO.TASK_ALLOC_DATE, HIST.PROJ_ID, HIST.SUBMOD_ID, HIST.ACTIVITY, HIST.TASK_CREATE_BY, ALLO.TASK_DETAILS, 'N' FROM UST_TASK_ALLOCATION ALLO, UST_TASK_HISTORY HIST WHERE ASSOC_ID =@ASSOC_ID AND convert(varchar,ALLO.TASK_ALLOC_DATE,112) =convert(varchar,getdate(),112) AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID UPDATE UST_VIEW_TASK_TEMP SET SEND='Y' WHERE ASSOC_ID =@ASSOC_ID AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID END and the front end which i havedone on selecting a check box and the button click is: Dim bsl As New BSL Dim item As DataGridItem Dim chkBox As CheckBox Dim AllocatedDate As String Dim taskid As String Dim ProjID As String Dim Subm
-
Hi am a beginner in dotnet .Am creating a web application in asp vb.net .First i will tell what i want to accomplish First i have a page when the user logins in to that site the page will display what all the tasks allocated to him in a datagrid The datagrid has a check box for each of the rows being displayed. and outside the datagrid there is a send button.When the user clicks the check box and then clicks the send button these datas must get displayed in the another datagrid which is present in another page. What i have done in back end for this is: When i check the check box and click the save button all the details will get inserted into the temp table and inside the temp table i have set a flag when the user checks the check box the flag will turn into "y" and the another datagrid which i want to display all the records will choose only the records where the flag is set to "y" and the codes for it is as follows: the SP on button click is as follows: CREATE PROCEDURE USP_VIEW_TASK_UPDATE ( @TASK_ID VARCHAR(5), @TASK_ALLOC_DATE DATETIME, @PROJ_ID VARCHAR(15), @SUBMOD_ID VARCHAR(15), @ACTIVITY VARCHAR(15), @TASK_CREATE_BY VARCHAR(15), @TASK_DETAILS VARCHAR(100), @ASSOC_ID VARCHAR(15), @SEND CHAR(1) ) AS BEGIN CREATE TABLE UST_VIEW_TASK_TEMP ( TASK_ID VARCHAR(5), TASK_ALLOC_DATE DATETIME, PROJ_ID VARCHAR(15), SUBMOD_ID VARCHAR(15), ACTIVITY VARCHAR(20), TASK_CREATE_BY VARCHAR(15), TASK_DETAILS VARCHAR(100), SEND CHAR(1) ) INSERT INTO UST_VIEW_TASK_TEMP VALUES ( @TASK_ID, @TASK_ALLOC_DATE, @PROJ_ID, @SUBMOD_ID, @ACTIVITY, @TASK_CREATE_BY, @TASK_DETAILS, @SEND ) SELECT ALLO.TASK_ID, ALLO.TASK_ALLOC_DATE, HIST.PROJ_ID, HIST.SUBMOD_ID, HIST.ACTIVITY, HIST.TASK_CREATE_BY, ALLO.TASK_DETAILS, 'N' FROM UST_TASK_ALLOCATION ALLO, UST_TASK_HISTORY HIST WHERE ASSOC_ID =@ASSOC_ID AND convert(varchar,ALLO.TASK_ALLOC_DATE,112) =convert(varchar,getdate(),112) AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID UPDATE UST_VIEW_TASK_TEMP SET SEND='Y' WHERE ASSOC_ID =@ASSOC_ID AND HIST.TASK_ID=ALLO.TASK_ID AND ALLO.TASK_ID=@TASK_ID END and the front end which i havedone on selecting a check box and the button click is: Dim bsl As New BSL Dim item As DataGridItem Dim chkBox As CheckBox Dim AllocatedDate As String Dim taskid As String Dim ProjID As String Dim Subm
I think your way of approach is quite too complex for that task. If your aim is to show the rows that the user has checked in some other page, you could better take the ids of the checked rows, into a session variable and use a simple query just like the query which loads the grid in the first page with an extra where condition for the ids, so the ones that are selected alone will come. This should do ur task, it is strongly suggested that you dont take such values to database, just to show stuff in corresponding pages. And infact you can even do this with no database hit (for this purpose) in the second page, just take all the values of the selected rows into a datatable and take that datatable to the next page through session, but the session size will become heavy. Both the above ways are where your project allows to handle values in session, if that is not the case, you can try cookies too. and worst case your db method could help, and in your case, see whether the values u check are inserted in the table and use break points and see whether all the tables and rows that you want are in the dataset you are returned with.
-
Hi thank You, after u mentioned it i wrote in catch System.Diagnostics.Trace.WriteLine("[] Exception " & ex.Message) after that i debugged it its throwing an error like this "Object reference not set to an instance of an object." in the same line which i entined before
Did you put that in the ViewHomeTaskStatus method? The only reference that can be null in the code where you get the exception now, is the data set. It always has a Tables collection, if there was no tables you would get a different exception, and a table always has a Rows collection. So, the conclusion is that a data set is never returned from the method, and that only happens if there is an exception.
Despite everything, the person most likely to be fooling you next is yourself.
-
I think your way of approach is quite too complex for that task. If your aim is to show the rows that the user has checked in some other page, you could better take the ids of the checked rows, into a session variable and use a simple query just like the query which loads the grid in the first page with an extra where condition for the ids, so the ones that are selected alone will come. This should do ur task, it is strongly suggested that you dont take such values to database, just to show stuff in corresponding pages. And infact you can even do this with no database hit (for this purpose) in the second page, just take all the values of the selected rows into a datatable and take that datatable to the next page through session, but the session size will become heavy. Both the above ways are where your project allows to handle values in session, if that is not the case, you can try cookies too. and worst case your db method could help, and in your case, see whether the values u check are inserted in the table and use break points and see whether all the tables and rows that you want are in the dataset you are returned with.
HI ya what u r telling is correct .Since i dono how to implement that functionality and quite little bit tough am following this mehthod.And now my problem is no error is coming the SP is not working fine i think i dono whats the problem the think in backend when i checked the SP its working through front end on button click the SP is not working fine
-
Did you put that in the ViewHomeTaskStatus method? The only reference that can be null in the code where you get the exception now, is the data set. It always has a Tables collection, if there was no tables you would get a different exception, and a table always has a Rows collection. So, the conclusion is that a data set is never returned from the method, and that only happens if there is an exception.
Despite everything, the person most likely to be fooling you next is yourself.
Hi i changed the way in which am getting the output i vchanged the getdataset into .Executescalar now
-
Hi i changed the way in which am getting the output i vchanged the getdataset into .Executescalar now
-
So the problem was in the GetDataSet method? Did you change the exception handling? Did you find out what the actual problem was?
Despite everything, the person most likely to be fooling you next is yourself.
No am not getting the output still nor able to find out the mistake