2
votes
5answers
10k views

Change select command of sqldatasource at runtime

HTML <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="id" ...
0
votes
1answer
28 views

ORA-01036 after rewriting an Oracle insert command

I am reworking legacy code and came to this query: sqlDS.InsertCommand = "INSERT INTO SCHEMA.TABLE " + "(ID, DATUM, ID_STATE, G_AM, G_VON, DATUM_BEW) " + ...
0
votes
2answers
342 views

C# and EMgu CV in image data accessing & image matching‏

I'm currently using C# with Emgu CV to create a real-time face recognition programme in student registration system. Upon the process in developing it, I have several problems been spotted in ...
0
votes
0answers
601 views

How do I manually call the Update method on a SqlDataSource?

I'm looking for a solution on how to manually call the Update method on a SqlDataSource connected to a DetailsView. The problem is that if I call the Update method from a button.onclick event nothing ...
1
vote
4answers
5k views

How to handle exceptions with a SqlDataSource

I have a SqlDataSource that is supplying data to my GridView. Thats all i am using on my form, thus i have NO code behind at all. But somewhere i need a TRY CATCH block just in case my connection ...
1
vote
0answers
17 views

filter sqldatasource and display values that not equals filterexpression

I just want to filter my sqldatasource and display all values that not equals the filterexpression. Somehow like this: SqlDataSource1.FilterExpression != "something='something'"; Is there ...
0
votes
2answers
49 views

The expression contains undefined function call DATEADD() | FilterExpression | Datime filter

I have a grid-view and I want to filter it to display data only in a certain date interval (from date A to date B, include A and B) I use SqlDataSource and FilterExpression, initially I use this ...
0
votes
0answers
25 views

Using a CheckBoxList as paramater for SqlDataSource

I'm trying to populate a GridView based on a CheckBoxList on the same page. The GridView works well, however, I can't find a way to only use the values from the CBL. I searched and tried a few things, ...
0
votes
2answers
646 views

When Gridview column is hidden, and update button is clicked, it tries to insert null value for that hidden field

Problem is similar to the indicated here: http://forums.asp.net/t/945656.aspx/1 I have a gridview with update button which updates the row. When a column is hidden, it tries to insert null values ...
4
votes
4answers
21k views

How to set SelectedValue of DropDownList in GridView EditTemplate

I am trying to do this as asked earlier. The only difference that I found is additional List item that was included in above code. I tried to use AppendDataBoundItems=true but it is still not ...
0
votes
1answer
321 views

How to add exception handling to SqlDataSource.UpdateCommand

We have a radgrid that is automatically updated with the SqlDataSource.UpdateCommand. So when we edit some column(s) and click on "Update" the table is updated correctly with UpdateCommand in the ...
6
votes
2answers
6k views

How to use User.Identity.Name as a parameter for SqlDataSource in ASP.NET?

For SqlDataSource I can configure the external source for the incoming paramater. For example it might be a QueryString, Session, Profile and so on. However I do not have an option to use User as a ...
0
votes
1answer
27 views

ASP:GridView dynamic datasource from Querystring

Just playing around with ASP.net C#. I am trying to pass a querystring to the gridview's datasource. The querystring is the SQLDataSource ID. This way one page can pull from different datasources ...
0
votes
0answers
13 views

DataRowView does not contain a property with the name 'FormID'

I am having trouble using the data value within a listbox. The DataValueField and SelectedValue always shows an error for the property FormID. <asp:ListBox ID="ListBox1" runat="server" ...
1
vote
2answers
2k views

Delete Record from GridView AND File from server in one click

I'm trying to delete a record from Gridview1 at the same time delete the corresponding image file off the server in a single click. (Each row in Gridview1 has an associated image file on the ...
0
votes
0answers
50 views

GridView Row Count after FilterExpression and Paging

I was using below code to count total row, But total row is not updating with filter expression. protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e) { int ...
0
votes
0answers
33 views

Sqldatasource connect Oracle database with parameters, code behind not working

I need set 3 parameters in SQLDatasource, binding source to the gridview. If I remove the parameters, and directly choose datasource from design view, it shows data correctly. I guess after pass ...
0
votes
2answers
49 views

Delete link in gridview deleting all row

I am facing a problem with my gridview as the Delete link is deleting all the rows where i want to delete one by one. I have record my screen that may exolain more about my problem ...
8
votes
8answers
122 views

Filling gridview from codebehind

I have a gridview control in my ASP.NET web form. I the past I have used the same code to fill a gridview with data in a Windows Forms App. Here is my code: var sql = new SQL_Statements(); var ...
1
vote
3answers
880 views

Filtered Gridview does edit correct row

I have a gridview that works fine with SQLDataSource. Edit, Delete buttons works perfectly. However, when I search any record and try to edit that record, the gridview opens up the first row in the ...
0
votes
5answers
2k views

How to set a GUID field from C# code

There is a parameter in InsertParameters. When I try to set it I get an error:: Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run ...
0
votes
1answer
156 views

asp.net sqldatasource parameter not supplied

OBJECTIVE: TO GET THE DELETE STORED PROCEDURE TO WORK Hi, I am creating a very simple CRUD (CREATE, READ, UPDATE, DELETE) test program in asp.net framework 4 which needs to have a table id as a ...
0
votes
1answer
114 views

UPDATE command property for asp:SqlDataSource does not recognize parameter values

The error occurs when the asp:ListView object tries to call the update command built in to the datasource. Specifically the error states: Cannot insert the value NULL into column 'FirstName', ...
-2
votes
2answers
38 views

ASP.NET C# : How to load a dataview object using sql classes via the code behind?

I know I can drag/drop an sqlDataSource object onto my webform and then get my connection string from my webconfig file and link it and done... But I don't want to do it that way. I want to do it ...
0
votes
2answers
58 views

SQL Join query in SqlDataSource

I am not really sure about how to do this. In a table Product1 I have: Id, Code, Description, Group, Quantity, Unit, Cost, Note In the other table Componets I have: Id, Code, Description, Unit, ...
0
votes
1answer
70 views

Path string format '/' to '\'

i have a problem about string format. first, i have table on the database and the record is id | url ---|----------------- 1 | \root\folder\file.txt and i have to access query like this one, ...
1
vote
3answers
157 views

DropDownList retains wrong input text instead of selected input from its List of Items

I have a DropDownList Control populated with List of Items from SqlDataSource. The SqlDataSource QueryBuilder chooses the Column_Names from my Database Table. If the DropDownList is provided with ...
-1
votes
3answers
160 views

What is the Sql command to get selected column names from a database table?

I am able to bind my dropdownlist with the following lines of code. Current Scenario : DropDownList bounded with all the column names of that table. Requirement: DropDownList to be bounded with only ...
0
votes
3answers
219 views

How to search data in asp.net web application

I need help with my asp.net web app. I have a page where i display data (all the users) with datagrid. For now, there is no problem when i only have a few users in. But when a database will be ...
-1
votes
1answer
39 views

SqlDataSource get url parameter

I'm using an SqlDataSource and gridview to display some data, the data being displayed related to the url parameter. So in my case, my url paramter is ?orderid={number} and I want to use that for my ...
0
votes
3answers
3k views

ASP.NET C#: SqlDataSource with Stored Procedure and Parameters

I am trying to have a SqlDataSource coded programmatically with stored procedure and with parameters. Later I want to assign this SqlDataSource to a listbox as a datasource.But I am getting an error ...
0
votes
0answers
46 views

C# Basic Active View Index Coding - Adding an Update View

I am attempting to do the code for an Update view on a multiview task. The directions are as follows: What is the index of the Update command in the RBL? If this index is selected, then before ...
0
votes
1answer
153 views

query string and response.redirect issue

I Have a listView and I want to create a button or link that when user click,goes to a page that have a formview and it's datasourse configured : </asp:FormView> <asp:SqlDataSource ...
0
votes
2answers
34 views

Select sqldasource query from dropdownlist

I have a grid which has a dasource selected sqlDataSource2. I have not built any query in the datasource. I have a dropdownlist with two items and I would like to select the query from the ...
0
votes
0answers
78 views

SQldatasource update not working

I am using templates in gridview. In 1 template I took a checkbox and in the footer templates I took a button. I want to perform an update action when the button is clicked on checked entries in the ...
0
votes
1answer
28 views

retrieve data from sqldatasource object

I'm working on a gridview and got a little problem with the built in edit button. the gridview got 3 columns title, artist, genre and when editing the genre a ddl shows. in my grv_update event ...
0
votes
1answer
84 views

Dynamic Report building Refresh() is not changing data

I am trying to View a report dynamically from code behind. But when the parameters are changed from dynamic textboxes added in the page. in the report refresh() the data is not changed. I call ...
0
votes
0answers
216 views

Build (web): Type 'System.Web.UI.WebControls.SqlDataSource' does not have a public property named 'SelectQuery'

I'm building a simple .net program for class using Visual Studio 2012. I'm getting this error: Build (web): Type 'System.Web.UI.WebControls.SqlDataSource' does not have a public property named ...
0
votes
0answers
101 views

Listview Control with datapager: How to export to excel and get all data

I am having an issue with getting all of the data to export from a Listview control with datapager to excel. This is my code: private void ExportListView() { ...
0
votes
2answers
93 views

GridView is not visible in the output

Okay! I am trying to merge 4 Tables which i have aliased in SelectCommand. Problem--> The GridView is not visible in the final output Guesswork--> I even tried without alias (Didn't work still). So i ...
0
votes
1answer
22 views

C#, In a Mysql connection proprety connection.Server and connection.DataSource are always equals or there is a case where are different?

In my program I can see these proprietes are always equals, can be different in some exceptional case?
0
votes
1answer
53 views

When using GridView, which is the best option to bind it to the datasource?

I'm relatively new to ASP.net and while learning it I came across different ways people use to bind data to GridView: SqlDataSource ObjectDataSource Binding DataTable to GridView control from the ...
-1
votes
1answer
67 views

Creating SQLDataSource

I have a table (EmployeeID,EmployeeName,ManagerID) How can I create a SQLDataSource to include the ManagerName from the EmployeeName given EmployeeID = ManagerID? In my GridView after dragging a ...
0
votes
2answers
211 views

ASP.NET SqlDataSource Gridview Problems

There are a few issues with this. right now, all I am trying to do is to get the delete command to work. The Edit doesnt work either, and guessing the issue is similar. This is a learning project ...
0
votes
1answer
53 views

SQLDatasource Select Parameter causes time out

If I run this code, the result is returned in less than a second - <asp:SqlDataSource ID="OrdersSqlDataSource" runat="server" ConnectionString="<%$ ...
2
votes
1answer
2k views

Setting DateTime as a SqlDataSource parameter for Gridview

Hey I would like to display certain data with my stored procedure for the last 30 days. here is what I have done (aspx.cs file): protected void Page_Load(object sender, EventArgs e) { ...
0
votes
0answers
235 views

ASP.NET SqlDataSource Update command

I've got stuck a little: protected void btnUrediUporabnika_Click(object sender, EventArgs e) { DataSet ds = (DataSet)SqlDataSourceUserDetails.Select(DataSourceSelectArguments.Empty); ...
0
votes
1answer
133 views

SqlDataSource Gridview not updating but doesnt crash either

<label>Date</label> <asp:TextBox ID="txtDate" runat="server" CssClass="entry"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ...
0
votes
1answer
67 views

Attaching SqlDataSourceEnumerator to Combobox Event. C#

I'm in a bind with this one and spinning my wheels now. Here is what I have that grabs the local network SQL instances and puts them in my combobox1 quite nicely. SqlDataSourceEnumerator sdse = ...
0
votes
2answers
3k views

SQLDataSource Insert method not working in CodeBehind .NET C#

I'm writing an ASP web project for a degree module and I have to insert some login details into a login table. It was working fine whilst I had it running as a script in the .aspx file, but I needed ...