Questions tagged [sqldatasource]

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 with other controls that display data, such as the GridView, FormView and DetailsView controls to display and manipulate data using little or no code.

967 questions
-1
votes
1 answer

asp.net SqlDataSource select statement with IN (...) clause

I need to pass a server-side parameter to my SqlDataSource SELECT IN-clause as follows (notice the parameter @InClause and it's location in the SQL-select that is defined in the aspx (for the SqlDataSource): SELECT UID_REPORT, TXT_RPT_TEXT,…
John D
  • 517
  • 7
  • 22
-1
votes
2 answers

where can i learn to program the sqldatasource

i am using linked severs and synonym in sql server 08 in vs08 webpage when i connect the sqldatasource to the db it doesnot show the linked server or the synonyms!! (i don't know why it doesnot show the linked severs). so i write queries manually…
user287745
  • 3,071
  • 10
  • 56
  • 99
-1
votes
1 answer

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 DropDownList what bindings should I do to display the…
George
  • 1
  • 1
  • 2
-1
votes
2 answers

How to populate a listview in ASP.NET 3.5 through a dataset?

Is it possible to populate a listview with a dataset? I have a function that returns a dataset. Why im asking this is because my SQL is quite complicated and i can't convert it to a SQLDataSource... Public Function getMessages() As DataSet Dim…
Jonas
  • 3,155
  • 5
  • 35
  • 55
-1
votes
3 answers

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 specific column names of the table. How to achieve…
Shrivatsan
  • 105
  • 1
  • 18
-1
votes
1 answer

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 query. I've been fiddling about but cant seem to…
horHAY
  • 788
  • 2
  • 10
  • 23
-1
votes
1 answer

Retrieve Data from database in C#.net

Good day!, I want to retrieve data from my database the user will input in the text box and when the user click the search button it will display in the form but when I execute the code below nothing will happen. Can anyone help me. namespace…
user3278908
  • 445
  • 1
  • 4
  • 8
-1
votes
1 answer

ASP.NET sqldatasource.select(arg) gives stackoverflow.exception error

I have a code to read the total number of rows in a SQLDatasource: Protected Sub DSArticles_Selected(sender As Object, e As SqlDataSourceStatusEventArgs) Handles DSArticles.Selected Dim args As DataSourceSelectArguments = New…
Sudi
  • 309
  • 2
  • 4
-1
votes
1 answer

SQLDataSource FilterExpressions: how get data with just similar values, not equal?

I have a GridView with the address column, i added a button that calls a filter expression that suppose to look in that column any address, but with this filter expression if the address is not equal the GridView returns blank. What i need is a…
Carlos Ancona
  • 67
  • 2
  • 11
-1
votes
1 answer

Why this Label.Text does not work?

I have a content VB page where I try to programmatically change Select in SqlDataSource. My code:
Dim Label2 As New Label() Label2.Text =…
-1
votes
3 answers

GridView How to get the value from a textbox in EDIT MDOE

I have a gridview that has databound items. it is bound to a SQLDATASOURCE. The default Edit, Update works fine, however, i wanted to perform a query too when user updates the row. Here is my aspx
Shezi
  • 1,352
  • 4
  • 27
  • 51
-1
votes
2 answers

Session is cleared when Gridview Update Button is clicked

I have a page (Order.aspx) which displays an order which has a specific FileNo, below I call this page from my (Default.aspx): LinkButton clickedButton = (LinkButton)sender; Session["FileNo"] = clickedButton.Text; …
HOY
  • 1,067
  • 10
  • 42
  • 85
-1
votes
1 answer

Stored procedure not executed when string is empty

I've got a really weird problem and I can't seem to find a solution to it. I've got an SqlDataSource with a set of parameters and a select command in form of a stored procedure. One of the parameters is a string called @SearchPhrase which gets its…
Misbit
  • 347
  • 2
  • 20
-2
votes
3 answers

How to assign a string variable to a SelectCommand

I have my two select statements (Str1,Str2) in two string variables. I also have a condition where the appropriate select statement is selected and assigned to another string (res). This is the select statement that is to be assigned to the…
gnome123
  • 35
  • 2
  • 10
-2
votes
1 answer

Edit / Delete table options

I have a table that has Edit and Delete links in each row. I am supposed to be able to click either Edit or Delete and it would do it. The edit link works but the delete has this error: Deleting is not supported by data source 'SqlDataSource1'…
Mike
  • 2,293
  • 13
  • 42
  • 56
1 2 3
64
65