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" ...
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
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
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
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 ...
0
votes
1answer
31 views

How to stop Visual Studio Query Builder from re-writing SQL (VS2005)

I simply paste this SQL code that I've carefully crafted in SQL Server Management Studio and it works. SELECT v.StudentID, v.StudentName, s.StudentHomeEmailAddress, s.StudentStudyYear, s....
3
votes
1answer
122 views

Different SQL Datasource on Dropdownlist Selected Index Change

I have a Grid view and I want to use Two different Sql DataSources on Selecting different values from DropDownList i.e. On Selected Index Change. Please help me How should I implement that??? I don't ...
0
votes
1answer
32 views

SqlDataSource control and SQL Injection

I'm testing a web page to prevent SQL Injection.Here is my ASPX page source: <asp:SqlDataSource ID="SqlDataSource_Test" runat="server" ConnectionString="<%$ ConnectionStrings:Default %&...
1
vote
2answers
38 views

SQLDataSource Paramter not working

I have the following SQLDataSource: <asp:SqlDataSource runat="server" ID="MySqlDataSource" ConnectionString='<%$ ConnectionStrings:RmaReportingConnectionString %>' SelectCommand="...
0
votes
1answer
48 views

how to write delete query in multiple selection?

I have a gridview in my web project and I connect it with the SqlDataSource. The select command contain fields from 3 table, and I created commandField for gridview so that users can delete their ...
1
vote
1answer
93 views

Using a VB Function as a SqlDataSource SelectParameter value

in my code behind i have a function getEmail() that returns an email address, in the front end i have a sql data source selectcommand that grabs info according to the email address. as of now the ...
0
votes
3answers
47 views

Return first product from database where repeating data exists

I am making an e-commerce site, and on the 'shop' page I want to show the lowest product price from my database for each unique productID. So my data is as follows: PRODUCT TABLE: product ID (PK), ...
1
vote
2answers
232 views

Modify SqlDataSource.SelectCommand using Stored Procedure with parameters

I am trying to create a search box in my application, in order to do so i need to modify the SqlDataSource.SelectCommand. I will appreciate any help! For testing I did it like this, it works but it ...
0
votes
2answers
59 views

How can I gather a sqldatasource's results as a comma separated string in code behind?

Hello and thank you for your time. If I have a Sqldatasource that is pulling from my database a list of ID's based on a certain criteria, how can I call that list formatted to a comma separated string ...
0
votes
1answer
368 views

Unable to pass wildcard character to stored procedure using asp:ControlParameter

I have an aspx page that allows a user to enter in a string asp:ControlParameter that is then passed to a stored procedure using the SelectCommand. The problem is if a user enters 123456% in the text ...
1
vote
2answers
241 views

Button click to fire stored procedure from SqlDataSource

I have an sql stored procedure which accepts 3 parameters and acts as a search facility which all works fine as its supposed to. I also have an asp page with 3 corresponding text boxes, a grid view, ...
0
votes
1answer
96 views

Insert Data retrieved from another row except one updated column

I would like to take all the data used in a previous row and insert it into a new row. However, in one column I will be using a new value. I am using a SqlDataSource in a FormView to show this ...
0
votes
2answers
236 views

Delete link in gridview deleting all row

I am facing a problem with my gridview as the Delete link is deleting all the rows where i want to delete one by one. I have record my screen that may exolain more about my problem https://www....
0
votes
2answers
2k views

Make an ASP.NET GridView change based on a DropDownList selection

I've tried a thousand ways to make this work and I can't. I have a DropDownList bound to the data in a column from an .mdf database. I also have a GridView below it that is bound using the Query ...
0
votes
0answers
417 views

Bind columns from two tables of a database into one gridview (Nonprogrammatically) ASP.NET

There are several answers to this question across the internet but every one is programmatically, which is more complicated than necessary. There's a way to do it in visual studio with the built in ...
0
votes
0answers
192 views

Context.User.Identity.GetUserId() doesn't return any value

Why the following code doesn't return any data? There are values in the database for Context.User.Identity.GetUserId() ASPX markup: <asp:SqlDataSource ID="owner_information" runat="server" ...
0
votes
0answers
195 views

SQL Query fails in Visual Studio

I need to display data on a chart from a database. As far as I can tell, the chart has to be bound to a DataSource which in my case is a SqlDataSource. My query to get this data is: SELECT A.a, A.b, ...
0
votes
1answer
252 views

How to use SqlDataSource with button on click to get results from gridview

My overall goal is to be able to type in information into my textbox and click a button to search and get results from the database using gridview. So far I have my SqlDataSource SQL statement set up. ...
0
votes
1answer
31 views

sqldatasource, SQL doesn't run correctly

This is a strange problem that I've been working on for a while. I have a sqldatasource with select and update statements. However the statements don't work correctly with parameters. For example if ...
0
votes
2answers
43 views

Select sqldasource query from dropdownlist

I have a grid which has a dasource selected sqlDataSource2. I have not built any query in the datasource. I have a dropdownlist with two items and I would like to select the query from the ...
0
votes
0answers
76 views

Unknown column error for which column I have

I know this is not a good writing query :) but it does what I want when I execute it on FlameRobin. But when I try to use same query on a web app for a SqlDataSource.SelectCommand I get unknown ...
2
votes
2answers
917 views

Gridview with SQL data source is removing white spaces

I have a GridView connected to my database through an sql data source. It is bound by the follow code: firstview = "SELECT ID, DC, DD, CYM, CB, ST FROM SCH_SCHEMANAME.TABLENAME WHERE CI = " & ...
0
votes
1answer
75 views

Defining placeholders for source and schema name in a query inside SSIS

I am using a following query with hardcoded datasource name in my OLE DB source of SSIS package wherefrom I am pulling certain types of rows. select * from mtb.dbo....
0
votes
4answers
78 views

Pass is NULL instead of = Null

This is my sqldatasource <asp:SqlDataSource runat="server" ID="get_client_users" ConnectionString="<%$ ConnectionStrings:local %>" SelectCommand="SELECT * FROM users WHERE clientid = @...
-1
votes
1answer
453 views

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 ...
1
vote
1answer
643 views

Date in ControlParameter causes error with date format

I have a vb.net web site that has a SQLDataSource with a date as a ControlParameter. This works okay in UK, but when the same page is opened in Germany it produces an error due to the different date ...
0
votes
1answer
572 views

SqlDataSource FilterParameters and FilterExpression do not work with empty strings

I have an SqlDatasource for which I programmatically create the SelectCommand. In general, the SqlDataSource works fine, but when I give it FilterParameters and a FilterExpression, things go awry. ...
1
vote
1answer
514 views

Can you only use one Select command w/SqlDataSource

This is a pretty simple question that I haven't been able to find an answer for. Is it possible to have two separate SELECT commands (from the same table) in the same SqlDataSource command to populate ...
0
votes
1answer
739 views

SqlDataSource.FilterParams FilterExpression with ORDER BY CLAUSE

I am using an SqlDataSource control with c#. ASP.NET 3.5 Visual Studio 2013. I have two drop down list controls with values for sorting using ORDER BY with the following order by clause in the ...
0
votes
0answers
246 views

ASP.NET FormView Control, SQL Data Source - SQL Join Statement

I have a Form View control connected to a SQL data source control with a Select inner join statement that reads the users profile information from from database1/table1 and pulls an email address ...
2
votes
1answer
456 views

Using a SQL datasource to filter the options in drop down list

Using a SQL datasource to filter the options in drop down list from an onclick link button Ultimately I have a drop down list that show all individuals. I'm wanting the user to be able to click a ...
1
vote
1answer
669 views

Get returned values from table-valued function using SQLdatasource

I made a simple Table-valued function that returns an Integer and a string. I've looked around but couldn't find anything about retrieving the returned data with a SQLdatasource. I've tried using it ...
2
votes
3answers
2k views

How can i select from more than one table in a SqlDataSource asp.net

i have a web page, that will load data from three tables is there a way to load all the data at once using a Sqldatasource, or must i do it in coding? i also want to sort it. but that i know how to ...
2
votes
1answer
2k views

My GridView control bound to a SqlDataSource does not update

All the data is displayed correctly. Only the "Update" link isn't working. My code is: <asp:SqlDataSource runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" ...
1
vote
1answer
607 views

Insert current user ID into DB using ASP.NET Gridview

I need to insert the currently logged in user's ID into an Oracle database table using ASP.NET 4.5. I am using Windows Authentication with a local AD server. When the admin user clicks the Override ...
0
votes
1answer
428 views

How do I create custom paging on a repeater with a SQLDataSource?

While looking on stack overflow a member suggested this tutorial . I looks like it may actually work but it is incomplete. at the bottom of his codebehind he is using a private Control ...
0
votes
2answers
1k views

How to get a gridview to show all table rows when no text is entered in a dependent textbox?

The below works correctly and filters my gridview based on the text entered in my textbox. When no text is entered into my textbox I get no results and cannot understand why. MY QUESTION How to get ...
0
votes
2answers
887 views

Want gridview to fill only on button click

So I've been working on a search in asp.net using a sqldatasource with more than one control parameter. It's taken me a bit of looking into to get my table searchable if one control is filled in, but ...
0
votes
0answers
326 views

How I built a SQL Database connectionstring right?

I have a problem with a connectionstring in a html file ... is this connectionstring form false? objConnection.Open "Provider=SQLOLEDB;Data Source=x.x.x.x\WINCCFLEXEXPRESS;UID=test;PWD=test;Database=...
1
vote
1answer
546 views

User.Identity.Name to SQL parameter

I have this code: protected void Page_Load(object sender, EventArgs e) { SqlDataSource4.SelectParameters["zadavatel"].DefaultValue = this.Page.User.Identity.Name; } Markup: <...
1
vote
2answers
4k views

ASP.NET SqlDataSource, like on SelectCommand

I'm working on asp.net. I Have a SqlDataSource with a query hardcoded on selectcommand: <asp:SqlDataSource ID="DataSource1" runat="server" CancelSelectOnNullParameter="False" ConnectionString=...
0
votes
1answer
392 views

Error when displaying data in a datalist from sqldatasource in asp project

I am building a website for a class and have come across an error that I can not find the solution to. I have a dropdownlist on the page that displays the cutomer name and sets the selected value to ...
0
votes
3answers
2k views

Using C# SQL Parameterization on Column Names

I'm having a problem. I want this to work, but it doesn't: SqlDataSource.SelectCommand = "SELECT blah1, blah2 FROM myTable WHERE @ColumnName = @Value"; SqlDataSource.SelectParameters.Add("ColumnName"...