Is it possible to use dynamic query filters with a gridview using a stored procedure as a data source? What I'm thinking of is a search page where there are multiple controls to enter in a search string and a radio button for the AND/OR query filters between the various controls. If not, what would be the best way to allow a user to select an AND / OR with a group of different query controls?
Here is the page I have created thus far using a view and no AND/OR option. I but I can't get it to work with my SP, also listed below:
i have a grid bound to sqldatasource control which gets its data from stored procedure. in page load event i code a dropdownlist where i take the selectedvalue parameter for the parameter query. only when a second dependant dropdownlist is selected (coded in dropdownlist1 selected event)is data returned ?
I have one repeater on page which has his own sql data source. I've placed 2 dropdown lists on the page. The repeater has jQuery DataTable plugin. With 2 dropdownlist I wish to change the sql stored procedures so when each will be selected the data in repeater will change. When user select the first there will be only data (users) according to selected item and in the second the same. I wrote 2 simple functions for changing stored procedure of repeater and rebiding it. Everything works but when I try the second one and then the first I always get warning about error "Procedure or function .... has too many arguments specified".
I think that when I select the first one the second function is still called although I don't call it.
I have an update function in my data layer which is defined as:
public int UpdateRBTable(parameters ...) This calls a SQL Server Stored Procedure to perform an update function on the database.
The process does its job for updating the table. However, the stored procedure has a return value (which indicates how many rows were updated), but this return value is not returned to the application. The application always shows that a zero was returned from the stored procedure.
Cannot implicitly convert type 'System.Data.SqlClient.SqlParameter' to 'string' I have a stored procedure on SQL 2000 returning an email from a database table (aspnet_Membership). The email type from the table is nvarchar. I have a method (in C# in the code behind) that gets that value. But the debugger doesn't like the last line:
return returnEmail; // returnEmail is a string variable we created to capture the stored procedure's return value
I've tried doing returnEmail.toString() in several places, but still get the same error message for the last line of code (returning the email).
I have a stored procedure which returns a value to state if the userlogin is valid. but i want to return the data and store it in a data session as i will require the user details in the checkout page.
is it best to get individual parameters out of the stored procedure then assign the variables to a datatable which is then assigned to session Or how can i get all the details returned from the stored procedure for the table? not sure which would be the most effective solution?
When it is bound to a datagrid. I do a grdELTCompletions.DataBind() and it shows that it's SELECTING, but returns nothing. I can execute the SP in MS SQL and it works fine. I just need know what elements of either the datasoure (sql to execute the SP) or the datagrid to find the error. Or even if there is a SQL log I can look at..
Is it possible to return multiple values from a stored procedure? Basically, if I execute the stored proc on the C# side, then on the SQL side I do multiple calculations. Let's say I have 5 int values I need returned to the C# side.
I would like to ask a question on the visual basic codes to loop the gridview to retrieve the values and based on the values, it will be provided as parameters to update to the database table using stored procedure.
Firstly, I have a gridview named grvProduct. The page (ui) will be loaded with data from the database with the use of stored procedures. And only certain values can be edited through the use of template in gridview. So based on those edited values, I'm supposed to pass these values as parameters to the stored procedure which will then update a database table.
Let say, I have 3 records retrieved from the database and displayed in the gridview. And I would like to edit a values in the 3 records, how do I do batch update and pass those parameters to the stored procedure? I went to debug and step through the visual basic codes and realised there were too many arguments specified because I actually loop the gridview.
Below is my visual basic codes:
Below is my Stored Procedure code: [Code]....
I believe it is the error in the looping of the gridview which results that I could not batch update the data/values.
I'm pretty new at web programming but a lot of years as a client-server dev.
I'm populating a gridview from a stored procedure, but I don't want to actually execute the populate till I have all the values filled in the page. (some are static textboxes, a calendar (date) value and some drop-downs that are populated earlier) I see there's nothing like gridview1.show() like there is in c# windows form programming. I tried
I have a stored procedure that returns a dataset with a different number of columns and different column names depending on user input. How can I use this with a GridView? Normally I define the columns beforehand in a static fashion, but, have never done a dynamic dataset like this.
Im loading some results from a SQL Stored procedure into a Grid View. From my stored procedure I simply get 2 columns returned, Details and Savings, the savings are being returned in the format 30.50123 I want to limit this to 2 decimal places and put a euro sign in front of it like so €30.50, I have managed to do this however its adding a new "savings"column to my Grid view which I obviously don't want. So I now have a savings column with the correct format of €30.50 and my 2 columns from my stored procedure
I have an app where i have a GridView connected to a DropdownList....The selectedIndexChange determines what the gridview shows. Then have coded in the row editing event the ability to change the information in the row. MY ISSUE- cant take the new information changed in the row and update it in the database. I have a row updating event that im trying to figure out how to attach it to my stored proc and the newly edited row
I need to be able to delete records from a gridview using a stored procedure. My data comes from two sources so the standard delete won't work. I have come up with the code below which deletes a record, but the wrong one. How can I iterate through the rows to delete the row I actually want to delete.
I am using two SQL Data Adapters to initially populate a gridview and then repopulate from search results. The Search SQL Data Source uses a stored procedure to retrieve the results but I cannot get the updated gridview to display.Here is my aspx code:
Here is my CS code:
I cannot get the gridview to display after I click the Search button.