The SqlDataSource control enables you to use a Web control to access data located in a relational database, including Microsoft SQL Server and Oracle databases. The SqlDataSource control uses ADO.NET classes to interact with any database supported by ADO.NET. You can use the SqlDataSource control ...

learn more… | top users | synonyms

1
vote
0answers
8 views

How to we use the control inside RadGrid edit field as Select Control parameter Control id

I had a textbox control inside radgrid edit template, I want to use it as sqldatasource select parameter ControlID . <SelectParameters> <asp:ControlParameter ControlID="" ...
0
votes
3answers
1k views

How do I default all my SqlDataSource parameters to convert empty string to null?

I have a project that utilizes a number of FormViews and SQLDataSources. I would like the default behavior of the SQLDataSource to insert values that are empty as null. I know I can do this by ...
0
votes
1answer
11 views

Overload/Override SQLDataSource Update Events

I have a SQLDataSource that loads/selects the User and Role information from an ASP.net side quite well. I like the ability to take advantage of the auto generated edit/update link buttons that are ...
1
vote
1answer
2k views

Delete parameters in SqlDatasource in asp.net

I have a Gridview which is connected with SqlDataSource for Data. I have Edit and Delete built in functionality. I have passed the Stored Procedure for the SelectCommand. Now I want to delete record ...
-1
votes
2answers
7k views

Assiging parameters to sqldatasource

I'm trying to get data from SQL Server and use it in a formview, but the formview control won't get any data from the datasource. (The datasource gets parameter on page load) Output is just: "There ...
0
votes
1answer
20 views

Gridview doesn't refresh after deleting a row

I have a GridView in an UpdatePanel. When I add a row, it gets updated right away. The problem is that, when I delete a row, it doesn't update the GridView. What can be done? protected void ...
1
vote
2answers
25 views

SQLDataSource Paramter not working

I have the following SQLDataSource: <asp:SqlDataSource runat="server" ID="MySqlDataSource" ConnectionString='<%$ ConnectionStrings:RmaReportingConnectionString %>' ...
0
votes
0answers
7 views

SqlDataSource using the client-side variable

I am using the SqlDataSource with sql query to provide the datasource for DataGrid. Using general query or stored procedure is fine. However, can I used the client-side variable, for example ...
2
votes
1answer
9k views

setting the default value for insert parameters in sql datasource asp.net

i have a datasource, which has an insertparameters, one of which whose type is set to Boolean, but while adding it from code behind insertparameters.defaultvalue always return string. code behind ...
0
votes
1answer
22 views

ASP.NET GridView won't populate from changing SqlDataSource.SelectCommand if Textbox is empty

I'm using a Textbox and a DropDownList to filter database searches. I'm using an SQLDataSource with a blank SelectCommand and then setting the command in the codebehind depending on what the user has ...
0
votes
1answer
9 views

Cancel SqlDataSource selecting rows when SelectCommand timeout

How can I cancel selecting rows in SqlDataSource when SelectCommandtimed out? I know that I can set CommandTimeout property but I want to Handle error and force Page to continue running when ...
3
votes
3answers
80 views

'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

I'm using TemplateField in GridView to implement edit/delete from database. I'm Querying Data with the SqlDataSource Control. when I edit the Table from page I get following error: ...
1
vote
1answer
46 views

Create SqlDataSource Filter Parameters from code behind

I`m trying to fill a gridview from a SalDataSource from code behind. I want to filter the results using 3 text boxes: ScheduerName, Username and Summary. My wish was to keep the aspx page as simple as ...
0
votes
5answers
9k views

change the font color gridview row based on a columns value. cant index gridviewrow?

i am getting a syntax error at drr(5) which 5 is the column i want to base the color change on. this method works when i am using a dataset Dim Land As String = "Land" Dim Air As ...
-1
votes
1answer
37 views

how to write delete query in multiple selection?

I have a gridview in my web project and I connect it with the SqlDataSource. The select command contain fields from 3 table, and I created commandField for gridview so that users can delete their ...
0
votes
3answers
1k views

When delete button is pushed on gridview throws Must declare the scalar variable “@Content”

I am trying to enable deleting in grid view. When you run this code and press the delete button you get the error Must declare the scalar variable "@Content". Code <asp:GridView ...
1
vote
0answers
10 views

SqlDataSource control is hidden in ToolBox of Visual Studio 2012

I'm a fresher started my career with SharePoint. I created a visual web part and tried to bind data with grid view of a SqlDataSource. But I cant see the SqlDataSource control in the toolbox and its ...
0
votes
2answers
19 views

SqlDataSource requery on button click

I've got an issue with asp:SqlDataSource. I'm trying to pull some data based on a start and end date. I want this data to pull the last 24 hours on load but right now I'm just trying to pull it all ...
0
votes
1answer
37 views

SqlDataSource UpdateCommand is not working

I have a GridView and its DataSource is a SqlDataSource. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" ...
1
vote
1answer
29 views

VB SQL Insert Query Inserts NULL for all values

I'm developing an asp.net application in Visual Web Developer and I am trying to Insert a new row into the database. I currently have an "Insert" row that is in the Footer Template of a GridView. The ...
0
votes
0answers
22 views

Send float parameter through SqlDatasource.InsertParameter

Hi I am trying to insert a float value into database through SqlDatasource.InsertParameter but after SqlDatasource.Insert() function is executed I only see the Integer part of it inserted in database. ...
0
votes
2answers
961 views

Gridview: editing after searching

MY search button is linked to a GridvieW, which has an edit button on every row. When I press search button, data changes and a databind() occurs. After that, If I try to use the edit button it ...
3
votes
2answers
11k views

Accessing data from my SqlDataSource in the code behind C# .net

I have a contact page where there is a datalist of people and if you click on one of them you get a contact form that I want to send to that particular person. I use sqldatasource dscontactemail to ...
0
votes
0answers
37 views

ASP.Net SqlDataSource: FilterParameters not yielding results when SELECT statement includes WHERE clause

I have SqlDataSource control in my .aspx page. The SelectCommand property includes a WHERE clause: <asp:SqlDataSource runat="server" ID="dsProducts" DataSourceMode="DataSet" EnableCaching="true" ...
0
votes
1answer
44 views

SqlDataSource insert error - too many arguments

I want to insert a row into an Infragistics grid. It has 2 columns, ID and Name. Both are bound. But when I insert I only want to use the Name column as a parameter. But when I use both, the ...
1
vote
2answers
23 views

Update control from .NET DataGrid on row select

I have what seems on the surface a really simple requirement. I want to update a label with a value from the data source when a user clicks a field in a datagrid control. My page has an SqlDataSource ...
20
votes
4answers
37k views

asp.net dropdownlist - add blank line before db values

On my page I have a DropDownList which I populate with database values from an SqlDataSource (see code below). How can I add my own text or a blank line before the values? <asp:DropDownList ...
1
vote
2answers
680 views

How to add a “Select All” entry to a Dropdownlist tied to SQLDataSource?

I hvae a dropdownlist tied to a SQLDataSource that returns a list of Categories. Since this is used as part of a search function, how do I add a "Select All" category and ensure that such a selection ...
1
vote
1answer
33 views

Using a VB Function as a SqlDataSource SelectParameter value

in my code behind i have a function getEmail() that returns an email address, in the front end i have a sql data source selectcommand that grabs info according to the email address. as of now the ...
0
votes
1answer
27 views

Load inserted Items only in Listview using SqlDataSource

I have a SqlDataSource which helps a Listview to Insert/Delete new data. But, I don't want to show the existing data to the Listview using this SqlDataSource. Only the newly inserted records to be ...
0
votes
1answer
754 views

Why does this FilterParameter not work as expected?

I have a gridview with columns: id, name, address, phone And a TextBox: NameFilter My gridview is populated by a SqlDataSource controller. I need to filter my gridview registers with name. I'm ...
1
vote
4answers
8k views

ora-00972 identifier is too long oracle 10g

I am getting the error mentioned in the title. I am using a 36 charecter ID. This error is only thrown In my sqldatasource in my asp.net webform. It is not a problem when I perform updates in Oracle ...
0
votes
2answers
78 views

Using SqlDataSource In Visual Studio

I am having an interesting problem in visual studio (likely due to my lack of experience). I have a SqlDataSource object and a GridView object. The Gridview object is setup to use the SqlDataSource ...
0
votes
0answers
21 views

Detailsview templatefield mapping to ObjectDataSource?

I need help to understand the proper way to map or associate TemplateFields to the ObjectDataSource. I show only one (of many) template definitions here: <asp:TemplateField HeaderText="First ...
1
vote
1answer
82 views

How to bind a Data Source?

I'm getting an error - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'netLogsDao': Injection of resource dependencies failed; nested exception is ...
0
votes
0answers
17 views

Assign Dropdown value to insert parameter using SqlDataSource

I need to set the insert parameter to a SelectedValue of a Dropdown list that is an int. This should be easy but I cannot get it to work in my main application. It works in my test application. But ...
0
votes
2answers
101 views

Gridview with Sqldatasource Edit/Delete buttons

I'm using asp.net with c# code behind, and all I want to do is have a gridview+sqldatasource that I can manipulate at runtime and for whatever reason the buttons don't work. I have a login page that ...
0
votes
1answer
28 views

Multiple DataKeyNames not filtering sqldatasource

I have two grid-views on a page both bound to an sqldatasource. The first gridview (GVMonthReport) displays data from a table My goal is to select a row from GVMonthReport to filter three items ...
1
vote
2answers
48 views

How to use appSettings key in SqlDataSource

Web.config: <appSettings file="Application.config"> <add key="stringC" value="Data Source=svr1;Initial Catalog=myDB;Integrated Security=FALSE;user=user2;pwd=@#$123pop;" /> ...
7
votes
7answers
30k views

How can I set the sqldatasource parameter's value?

I'm trying to set the value of the sqldatasource's selectcommand parameter @ClientID as in the code below, but it's not working out. My code: Dim strCommand = "SELECT caller_id, phone, name, email ...
0
votes
0answers
19 views

Filter sqldatasource by ROWNUM

I have a sqldatacource control on an asp.net page that is the datasource for a gridview. This sqldatasource is selecting records from an Oracle database table. The number of results I get back many ...
0
votes
1answer
218 views

SqlDataSource SelectParameters code behind

I have a SqlDataSource feeding a ListBox with this SelectCommand: <asp:SqlDataSource ID="DSPatients" ConnectionString="<%$ ConnectionStrings:CSMain %>" ProviderName="<%$ ...
0
votes
0answers
49 views

Dynamically remove rows from a datasource/database in gridview delete button handler

I have many different data sources being linked to different tables. One for each table. I have the edit and delete buttons showing on my gridview and have the subsequent methods created in my code, ...
1
vote
4answers
5k views

Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified

I have an ASP button link in GridView1 that should delete an item from a db table on click, and I am getting this error message: Deleting is not supported by data source 'SqlDataSource1' unless ...
1
vote
1answer
89 views

How to access selected values in ASP.net template field drop down list

I have a grid view in which i have two edit template fields both with list boxes in. I need to get the value out of DropDownList6 and use it in DropDownList1's SQL connection string. i have tried ...
0
votes
1answer
54 views

How do I Bind in ASP to a SQLDataSource?

I'm trying to wrap my head around databinding using a sqldatasource. Right now I have a sqldatasource, databound fields, and template fields that I bind using: <%# Bind("ColumnName") %>. I ...
0
votes
1answer
1k views

Filter GridView with SqlDataSource, DropDownLists not working

I made a search function in gridview format. I have 1 textbox, 2 dropdownlist and a search button. My textbox is use to search the lastname of a doctor, the 1st and 2nd dropdown is use to filter which ...
0
votes
3answers
161 views

The conversion of the varchar value overflowed an int column ASP.NET

I have a SqlDataSource in ASP.NET that is returning an error unhandled System.Data.SqlClient.SQLException, The conversion of the varchar value '5157964168' overflowed an int column I am not sure ...
0
votes
2answers
799 views

Error in binding SqlDataSource data to GridView

I am getting this error: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. I am trying to bind SqlDataSource's results to a ...
0
votes
1answer
76 views

Passing null in textboxes not working

Hi I m trying to pass null values in my date textboxes Textbox 3 and Textbox 4 but am not able to do so. Please let me know what I am doing wrong. Basically what I need is when the page load and the ...