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
0answers
10 views
Handling checkbox in <asp:ControlParameter> section of SqlDataSource
I'm reusing some code that I've had a lot of success with on other pages and the only significant difference here is that I'm capturing the value of a Checkbox in the filter panel that I haven't done ...
0
votes
0answers
8 views
setting SelectParameters asp:ControlParameter for a CheckBox control
I have a GridView that I'm trying to set up a filter based on the input to several controls (mostly TextBoxes) in a Panel. I've done this elsewhere without the checkbox that I'm having difficulty ...
5
votes
5answers
77k views
How to clear exisiting dropdownlist items when its content changes?
ddl2 populates based on ddl1 selected value successfully.
My issue is the data that is already present in ddl2 does not clear before appending the new data so ddl2 content just continues to grow ...
0
votes
0answers
19 views
Data Migration From SQL Server to MySQL
I am getting this Attribute Error : 'No Type' objectives has no attribute 'split' when i tried to migrate sql db to mysql db in mysql workbench
these are the Log details :
Starting...
Connect to ...
3
votes
3answers
4k views
How to get the datasource of a gridview
I am using a gridview with sqldatasource. How to get back the datasource in the codebehind as a datatable?
-1
votes
0answers
11 views
Get Drop down databound value to Insert Parameter
I have a drop down list from which I need to get the datavaluefield and pass to the insert parameter on the client side.How can we send the datavalue field of the dropdown to the insert parameter.
...
0
votes
2answers
61 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 ...
2
votes
5answers
9k 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 get'...
0
votes
0answers
15 views
Edit Commands are not working in gridview in asp.net
Previously, I dragged and dropped the grid-view into the editor. Afterwards I linked the grid-view with a specific Data Source. Usually Enable Editing and Enable Deleting options were automatically ...
0
votes
0answers
15 views
change data source for sql server database for any computer wpf c#
I think my question is probably amateur but i don't know about it & can't find any answer about it .
I Create a program in wpf using c#
It ran success on my PC , but when install it on the other ...
0
votes
0answers
13 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....
1
vote
3answers
9k views
How to Pass Textbox value to SQLDataSource and Fire MessageBox based on Query Result?
I've created a simple form that contains a textbox prompting the user to enter an ID. There's a submit button on the form and a SQLDataSource that wires up the textbox value as a parameter for the ...
0
votes
3answers
724 views
How to return identity value from sqldatasource.insert() in code behind?
I want to return id from insert.
I found solution it's use select scope_identify.
But I want example for my code.
sqlDatasource ds = new sqlDatasource();
ds.InsertCommand = "INSERT INTO Product (Name)...
0
votes
2answers
16 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
1answer
1k views
How can I get sql server database name from DatabaseMetaData object
I am wondering how can I get the database instance name from DatabaseMetaData, or is there any way I can do that, kind of stuck here, thanks for any pointers!
How to get sqlserver database name from ...
0
votes
1answer
2k views
When Update a field with ReadOnly Mode in GridView ,value of that is empty
One of the few fields that have their ReadOnly property equal to True then Edit and Update the value field is empty ReadOnly property is recorded.
I also have a ReadOnly property and its value is not ...
0
votes
2answers
49 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
361 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
21 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 [...
8
votes
2answers
5k views
asp:QueryStringParameter and empty query string parameter
I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client:
View.aspx has to display everything, View.aspx?client=1 has to display only ...
0
votes
0answers
40 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
53 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
21 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
46 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
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
79 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 ...
1
vote
1answer
642 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
43 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
147 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
420 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
35 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
18 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
297 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
38 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
26 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
3k 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
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
20 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
21 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
30 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
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
13 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
25 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
43 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
33 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 ...