Tagged Questions
0
votes
2answers
32 views
Asp.Net SqlDataSource bind two columns together into one column in ASPX
I had a <asp:SqlDataSource connected to a database using a connection string however I wanted to have 2 columns merged together to create 1 column such as:
Column: First Name
Column: Last Name
...
1
vote
1answer
94 views
SqlDataSource - SelectCommand with session variable filter
ASP.NET 2.0 framework
I'm trying to list all user related entries when the user visits the page. I have a session variable set with the visitor in session. Now I want to query the database with that ...
0
votes
1answer
63 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 ...
0
votes
1answer
141 views
A WHERE statement in my SqlDataSource causes invalid character exception (ORA-00911), why?
I'm using Oracle developer tools and my generated select command is:
SelectCommand = "SELECT "FIRSTNAME" FROM "USERS" WHERE ("USERNAME" = ?)">...
1
vote
1answer
319 views
Can I connect to multiple servers with an asp:SqlDataSource?
I have a repeater table in an asp.net application bound to an asp:SqlDataSource, and I need that data source's SelectCommand to select data from two databases in different servers.
I've been using ...
1
vote
1answer
2k views
ASP.NET: Access ListView's DataSource object programatically
I have bound my ListView to a database. I've used SqlDataSource to do the work. I want to change the datasource programatically but this is where it all goes wrong. I try to get the current datasource ...
0
votes
1answer
785 views
using selectcommand on code behind with gridview
I have a sqldatascource that I need to pass null values to it and then use the selectcommand specified by a stored procedure and then using the result query to populate a gridview on the page load
...
3
votes
2answers
4k views
asp.net SqlDataSource SelectCommand using LIKE with QueryString
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT ProductName, ProductPrice FROM Product WHERE (@type ...
0
votes
1answer
542 views
SelectCommand doesn't work when ControlParameter is not given
I have a textbox with id = txt_SearchLibrary which is also my controlparameter that I am using to filter my sqldatasource, I want to get all the results when I don't type something in my searchtext ...
4
votes
2answers
30k views
Changing SqlDataSource.SelectCommand at runtime breaks pagination
I have a GridView bound to a SqlDataSource with a default SelectCommand defined as such:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataSet"
ConnectionString="<%...
0
votes
2answers
3k views
SqlDataSource set SelectCommand dynamicly
I'm using a SqlDataSource and to avoid writing long queries directly in my code I thought I could make a Query class that returns the query I want as a string. I tried the code below but I just get "...