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

0
votes
0answers
4 views

Populating a Gridview with builtin (SqlDataSources)

Is it possible to fill a GridView control with a built in SqlDataSources programatically. I tried the below with no luck: Protected Sub btn_Submit_Click(ByVal sender As Object, ByVal e As System....
0
votes
1answer
38 views

textbox shows old value after postback while database successfully update with new value

I have a GridView with radiobuttonlist template column and textbox in footer. I want the radio buttons to update immediately when selected and used this tutorial to achieve the desired functionality ...
0
votes
2answers
14 views

Like operator in SQL Query in SQL Datasource

I have to use like operator for SQL Command in SQL Datasource, but it is not working. Did some one run into the issue? Please Advise. <asp:SqlDataSource ID="gridSource" runat="server" ...
-1
votes
1answer
11 views

VS Express WEB: ASP/net SqlDataSource avec un paramètre user.identity.name

Bonjour à tous, Je ne comprend pas comment utiliser le nom d'utilisateur connecté dans un sqldatasource. J'ai tenté d'attribuer la valeur user.identity.name au paramètre UserName en code behind sans ...
0
votes
2answers
41 views

ASPX Codebehind - Changing SelectCommand causes sorting to revert to original data

I have a GridView attached to a SQLDatasource, it works fine, and I can sort it properly with the original data. If I tell the codebehind to find specific information via a pre-defined SQLDataSource ...
0
votes
1answer
71 views

SQLDataSource = “Procedure or function [Name] has too many arguments specified.”

I am not sure if its asp:SqlDataSource control or it's the ASPxTreeList from DevExpress I am using but I am getting a weird error when trying to fire a Stored Procedure using the Insert() method. ...
0
votes
1answer
18 views

How to set SelectParameter in code behind in Asp.net web forms application?

I keep getting the error, Must declare the scalar variable "@inspIdFk" when attempting to use the following: protected void rgInspections_SelectedIndexChanged(object sender, EventArgs e) { ...
0
votes
2answers
20 views

Change SqlDataSource SelectCommand depending on user logged in

I have a existing SqlDataSource but the query needs to change depending on the logged in user. <asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT [id], [text] FROM [...
0
votes
0answers
36 views

ASP.net Gridview not showing up

I have an asp page where I show two gridview beside each other. The first one is displayed good, but I can't see the second. When I just display an identic version, two gridviews are shown. Below you ...
0
votes
1answer
51 views

Databind() from code behind never reaches the database

My FormView wont DataBind. I get no errors, all the elements are found correctly, when I step through the code everything looks like it works as expecting. The select parameter is set and the FormView ...
0
votes
1answer
45 views

How to parameterise a SQL REVOKE command

How can I parameterise a SQL REVOKE command? DECLARE @ViewName nvarchar = 'MyViewName' DECLARE @UserRole nvarchar = 'MyRoleName' REVOKE SELECT ON [@ViewName] TO [@UserRole] Outputs the following ...
0
votes
1answer
17 views

Intercept connection pooling of Datasource connections in JEE container

is it possible to intercept the connection pooling mechanism of a DataSource in a JEE container? For (un)setting some information on the connection's context I'm searching for a way to intercept the ...
0
votes
1answer
36 views

java web app refuses to connect to SQL Database when deployed on Tomcat

So i am facing the following problem. I have developed an web app that has the following connection to a SQL Server database. (db connection code attached) public class DBConnection { private ...
0
votes
2answers
49 views

VB.net - Pass Custom Parameter in SQL Update Command

I am using a Gridview with SQLDataSource Select/Insert/Update command. It works fine for updating or changing value using the Gridview. However recently I added another plugin which use Javascript to ...
0
votes
1answer
32 views

Automatically refresh SQLDataSource cache after expired

I have added SQLDataSource control on page with EnableCaching and Cache Duration is 3 hours(10800 Seconds). I am Showing data from SQLDataSource On Page Load event. I just want to know that, After 3 ...
0
votes
0answers
27 views

Windows odbc drivers datasource manager can no longer find a server it could before and now sql manager can't either

I am trying to use PyCharm to get access to my Microsoft SQL Server database. I registered the server on the data source administrator (64bit) on windows so that pypyodbc python package could find it. ...
0
votes
0answers
14 views

using a drop down list within a details view to update a database entry in asp

I have a Details View that contains a drop down list. I have the drop down list being populated and I have the drop down list item that matches the database entry as the default selection. The problem ...
0
votes
1answer
35 views

Populate drop down list with current user value as the selected drop down list option asp

I would like to know the best approach on populating a drop down list with all database values, AND have the current value for a user be the selected index. I have the drop down list being populated ...
0
votes
0answers
25 views

asp.net with SQLDataSource

i have two SqlDataSource one of them depends on a return value of the other how can i do this <i><asp:SqlDataSource runat="server" ID="SqlDataSource2" ConnectionString='<%$ ...
-1
votes
1answer
45 views

asp.net c# Repeating only 1 of 3 images related to record

i want to repeat out all items from a single category (selected via querystring) which currently works. However, each item is currently shown (repeated) 3 times, all 3 with the same text just a ...
1
vote
0answers
19 views

SQLDATASOURCE - Updating database using datavaluefield in combobox

I update in a datagridview. I display a combobox and selected in my datasource datatextfield and datavalue field. When I create my update command, how is it possible to select my value and not my ...
1
vote
0answers
17 views

Must declare scalar variable when binding aspgridview to aspsqldatasource

I'm having difficulties in understanding how parameters in aspsqldatasource know where to get their values. Here is an example: My users table is as follow: CREATE TABLE HR.Users ( userid CHAR(3) NOT ...
0
votes
1answer
29 views

Binding a SqlDataSource to a GridView: What is the difference between binding via ID and via setting DataSource

I want to bind a SqlDataSource to a GridView for viewing and editing database records. No big deal (I thought). However, there seems to be a big conceptual difference between binding via the '...
0
votes
0answers
11 views

SqlDataSource not Passing Update Value

I have a GridView that updates the values of a SqlDataSource. All of the other fields work. However I have a bit value for is active, when I update and try to deactivate that, it simply doesn't pass a ...
0
votes
1answer
40 views

Must declare the scalar variable, but they exist in markup

I have an SqlDataSource that i'm using for a GridView. I have used the Delete functionality of the GridView the same as iv used it for the Update function on other ones, but for some reason this is ...
0
votes
1answer
32 views

SQL Delete from DataGridView is not happening

I have a DataGridView that has delete enabled, but it never happens. The whole grid disappears (multiple rows), but the delete for the row I click never happens. I can run the sql statement manually ...
0
votes
0answers
20 views

How do I get Postgresql as an option in Visual Studio 2015 Data Connections

I have an asp.net project where I want to interact with my Postgres database through my Code Behind and. I have been able to use Npgsql (added through Nuget) to query the DB in the C# code behind but ...
0
votes
1answer
16 views

Update Command not firing after Edit/Save

I have a page that is not firing the update command when making changes to the information. I have several other pages that are working just fine and I am not seeing a difference in the coding that ...
0
votes
1answer
37 views

SqlDataSource and “Contains” when a comma or space is part of search string

I am writing an application in Asp.net with c# as code behind. I have a text box ("txtNameSearch") for the user place information into to filter a SqlDataSource, and a gridview that populates based ...
0
votes
2answers
49 views

asp.net VB Need to set default value for Listview or SQL Insert

Hope I can make this clear. I have: Listview with a sql datasource a separate dropdown that when something is selected filters the listview/sqldatasoure What I am trying to do is use the value from ...
0
votes
1answer
27 views

SqlDatasource: Parameters on Select()

After reading https://msdn.microsoft.com/es-es/library/system.web.ui.webcontrols.sqldatasource.select(v=vs.110).aspx I'm a bit confused about the Select() method of the SqlDatasource. It's easy to ...
0
votes
0answers
15 views

sqldatasource cache at the scope of application

Is there a way to cache sqldatasource for lookup fields at application level. So that if it has been cached once, it can then be used by all future sessions. What other techniques do you use so that ...
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
0answers
263 views

Visual Studio 2015 : SQL Data Source : Unable to retrieve schema. Ensure that the ConnectionString and SelectCommand properties are valid

I have the following development environment for ASP.Net WebPage VS 2015 Professional Version, using .Net Framework 4.0 MySQL Server 5.6, MySQL .Net Connector 6.9.5 MySQL for Visual Studio 2.0.2 ...
1
vote
0answers
31 views

Hikari connection Leakage error

I have implemented Hikari connection with java configuration the code is below , HikariConfig sqlConfig = new HikariConfig(); sqlConfig.setDataSourceClassName(WebAppListener.getContextParameter(...
0
votes
2answers
108 views

how to use SQL datasource wizard at runtime (Devexpress) ?

there is a component in DevExpress called SQLDataSource, this component allows you to import data from any database but not at RunTime, I'm currently developing a module that import data from any ...
-1
votes
1answer
24 views

which datasource doesn't supports caching in asp.net

we have different data sources like sqldataource objectdatasource linqdatasource xmldatasource Out of which doesn't supports caching
0
votes
1answer
33 views

2 Dropdownlists in Gridview cause error: Databinding methods such as Bind() can only be used in the context of a databound control

Though this seems to be discussed before, I can't apply given help in my case: I have 2 DropDownLists (DDL1, DDL2) inside the Edit Template of a Gridview, which is bound to a SQLDataSource. DDL2 ...
0
votes
1answer
24 views

Updating my Gridview Search boxes to use LIKE instead of '= or null'

I currently have a gridview that has text boxes across the top that the user can leave blank (in which case all records in the table are returned) or the user can supply exact matches to information ...
0
votes
2answers
50 views

Bind dynamic parameters to the SQL data source not working

I want to call the stored procedure on the child gridview by using a SqlDataSource. This is what I'm doing: <obout:Grid runat="server" ID="grid1" AutoGenerateColumns="false" PageSize="10" ...
0
votes
0answers
30 views

alert message on admin page when any user login using c#?asp.net

i have an asp.net grid i want to update its datasource from another page i am using sqldatasource1 so that grid sync with database on insert operatioon called on another page and results in updation ...
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 ...
1
vote
2answers
36 views

Select only the name of the column of the tables implemented by the inheritance of the table in SQL Server 2014

I have a question about selecting only the name of the column of the tables implemented by the inheritance of the table in SQL Server 2014. I.e. having four types of person (students, teachers, ...
0
votes
0answers
47 views

Cannot Find Control ID in ControlParameter obtained by Request.QueryString - Asp.Net

I'm with a doubt in getting the id of a book author and add the publication of a book, and the book to be published should have an author id that was used as identity and a name as a text and an ...
0
votes
1answer
38 views

SqlDataSource SelectCommand contains null values

My SQL code that works running on the server. SELECT [LINE_NO], [CUST_ORDER_ID], [PART_ID], [CUSTOMER_PART_ID], [MISC_REFERENCE], [PROMISE_DATE], [PROMISE_DEL_DATE] FROM [...
0
votes
0answers
23 views

Combining Gridviews with sqldatasources

Good afternoon. I have three gridviews that contain sqldatasource. Both grids are 5x2. What I am trying to figure out is how to combine the multiple gridviews into a table. To get that result, ...
1
vote
2answers
34 views

Display results from databound dropdownlist

I have made a dropdown list named Company Dropdown that is databound. The dropdown's data comes from the sql database. There is a table called CompanyList. Once someone selects a company from the ...
0
votes
0answers
22 views

Object reference not set to an instance of an object - Database1Entities showing up as null [duplicate]

So I'm trying to import an excel file to a local database table "TopicList" and it throws this error saying Database1Entities is not set to an instance of an object. Here is my code when I try to ...
1
vote
1answer
51 views

ASP.NET Cannot find object in parameter ControlParameter

I'm trying to get value from DropDownList as a parameter for SQL query. I have a GridView and SqlDataSource. And I can't reach DropDownList ("DDLName") inside the GridView. When "DDLName" is outside ...
0
votes
2answers
93 views

SqlDataSource not binding with multiple parameters

I have a very simple ASP.NET page that has two textboxes, a button, a SqlDataSource and a GridView. The SqlDataSource gets it's two parameters from the two textboxes, which it then passes on to a ...