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 ...
0
votes
1answer
38 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
12 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
43 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
33 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
34 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
562 views
SqlDataSource_OnSelected: Get data (DataTable) without re-executing the query
I have a SqlDataSource bound to a GridView with an SQL that takes about 10 seconds to retreive the data.
Also there is a UserControl called "PageSizeControl" which hooks the selected-event of the ...
0
votes
1answer
19 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
2answers
87 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
2answers
111 views
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 ...
-1
votes
3answers
402 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
0answers
23 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. ...
1
vote
3answers
2k views
What is the difference between DbType and Type in SqlParameter?
Can you explain me the difference between Type and DbType in a parameter of a datasource?
What is the best pratice of assigning these two properties?
0
votes
0answers
13 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
2answers
269 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 ...
0
votes
1answer
33 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='<%$ ...
2
votes
1answer
2k 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 ...
-1
votes
1answer
44 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
14 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
20 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 '...
1
vote
3answers
2k views
How to display elements only if SQLDataSource has rows
I'm creating an ASP.NET/C# page where a user enters an ID at the top of the page, and when they press Submit, the page posts back and displays the data. Right now, the data fields are displayed at all ...
1
vote
2answers
33 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
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 ...
-1
votes
1answer
23 views
Exception | must declare scalar variable @IdAlbum
I am getting an error "must declare scalar variable @IdAlbum". I have already been through similar posts on this topic but it does not help. Can someone have a look at the code below? When i use ...
0
votes
1answer
39 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
31 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
18 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
14 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
26 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
36 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 ...
2
votes
3answers
2k views
Nested ListView using two different sqldatasources
I have a nested listview
<asp:ListView ID="lst_productsWithDiscounts" DataKeyNames="ProductID" runat="server" DataSourceID="source_discountProducts" ItemPlaceholderID="plc_product" OnItemDataBound=...
0
votes
1answer
24 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 ...
1
vote
0answers
200 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
2answers
618 views
Login Stored Procedure in Oracle | Error: PLS-00306
I'm calling a stored procedure in a package from an ASP.NET SqlDataSource however I keep getting the following error.
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in ...
0
votes
0answers
14 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
25 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
26 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
1answer
392 views
show header and footer in gridview asp.net when data source return no data
Goal
show header and footer when Sqldatasource of GridView1 returns no data
Problem
now this is what i did so far i have a GridView in my asp.net application which shows meetings of a persons ...
1
vote
3answers
6k views
Pass parameter value to SqlDataSource ASP.NET User.Identity.Name
Need help! I can't get around why this doesn't work.
Page:
<asp:SqlDataSource ID="SelectUserInfo" runat="server" ConnectionString="<%$ ConnectionStrings:TradeRelay %>" SelectCommand="...
-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
30 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
1answer
486 views
String data getting truncated when fetching through sql datareader
I am using a datareader to fetch a table's record values through a stored proc.
but while using datareader.getstring(2) to fetch the value of the particular column, the string returned is truncated ( ...
0
votes
0answers
29 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
77 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
2k views
Filtering SqlDataSource with multiple dropdownlists
I have an SqlDataSource at the moment, which I want to be able to be filtered using 3 DropDownList's. Basically, each DropDownList contains values for a certain column on the table, so when they ...
1
vote
1answer
8k views
execute sqldatasource with button
I have two queries that I want to be able to run on a page. I have a button, gridview and sqldatasource at the top of the page and another button, gridview and sqldatasource with the second query at ...
0
votes
1answer
318 views
Change the SqlDataSource SelectCommand
I have a SqlDataSource for a gridview. I want to change SelectCommand of that SqlDataSource.
My select command is:
select *
from JobLog
where UserName = @username
and PrinterName = @printer
...