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

Procedure or function has too many arguments specified in FormView and SQL SERVER c#

I have one stored procedure called VideoGalleryDelete . I am using FormView and Gridview to insert, update, show and delete data. VideoGallery is my primary table with PK VideoId and it has a foreign ...
1
vote
1answer
83 views

How to assign a radiobuttonlist to a boundfield in GridView?

I imported an excel table consisting of 5 columns and 50 rows into a datatable and stored it in a database table. None of the columns are a primary key as they consist data of string, are repetitive ...
-1
votes
1answer
71 views

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

How to generate the needed SQL statements to Update, Insert, Delete data in GridView?

I'm using GridView along with SqlDataSource, for selecting, updating and deleting, and DetailsView for Inserting, the problem is, when I click one of these buttons, I get this error for the Delete ...
0
votes
1answer
153 views

SqlDataSource UpdateParameters - Input string was not in a correct format

I have inherited some ASP.NET code that I need to update which has resulted in my needing to change the ASP SqlDataSource's UpdateCommandType from a string (hard coded SQL Update statement) to a ...
0
votes
0answers
30 views

parameterise table name in nested repeaters datasource

i want to select a column like cl1 from different tables for each row on gridview and show it on my repeater. how can i do this? here is my code: <asp:gridview cssclass="text-center table table-...
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 %&...
0
votes
1answer
226 views

Gridview doesn't refresh after deleting a row

I have a GridView in an UpdatePanel. When I add a row, it gets updated right away. The problem is that, when I delete a row, it doesn't update the GridView. What can be done? protected void ...
0
votes
3answers
720 views

The conversion of the varchar value overflowed an int column ASP.NET

I have a SqlDataSource in ASP.NET that is returning an error unhandled System.Data.SqlClient.SQLException, The conversion of the varchar value '5157964168' overflowed an int column I am not sure ...
0
votes
1answer
1k views

SqlDataSource SelectParameters code behind

I have a SqlDataSource feeding a ListBox with this SelectCommand: <asp:SqlDataSource ID="DSPatients" ConnectionString="<%$ ConnectionStrings:CSMain %>" ProviderName="<%$ ...
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
1answer
534 views

ssrs DB connection error

I'm Trying to created a shared Data source from a sql server that is not local. the host of SSRS is a sql server 2014 and the DB source is a sql server 2008 R2. I'm getting the same error whatever I ...
1
vote
1answer
319 views

Can I connect to multiple servers with an asp:SqlDataSource?

I have a repeater table in an asp.net application bound to an asp:SqlDataSource, and I need that data source's SelectCommand to select data from two databases in different servers. I've been using ...
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
1answer
637 views

asp.net sqldatasource parameter not supplied

OBJECTIVE: TO GET THE DELETE STORED PROCEDURE TO WORK Hi, I am creating a very simple CRUD (CREATE, READ, UPDATE, DELETE) test program in asp.net framework 4 which needs to have a table id as a ...
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
2answers
283 views

SQL Join query in SqlDataSource

I am not really sure about how to do this. In a table Product1 I have: Id, Code, Description, Group, Quantity, Unit, Cost, Note In the other table Componets I have: Id, Code, Description, Unit, ...
-1
votes
3answers
412 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
1answer
2k views

Procedure or function x has too many arguments specified

I have a gridview with the following SqlDataSource: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnString%>" ...
0
votes
1answer
28 views

C#, In a Mysql connection proprety connection.Server and connection.DataSource are always equals or there is a case where are different?

In my program I can see these proprietes are always equals, can be different in some exceptional case?
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
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 ...
1
vote
2answers
621 views

Cascading One DropdownList with Another in Insert command on asp

I have this asp in a formview insert template. <asp:FormView ID="FormViewReport" runat="server"> <InsertItemTemplate> GAME_ID: <asp:DropDownList ID="...
0
votes
2answers
4k views

Asp.Net CheckBoxList to update a SqlDataSource

I need to update some table values using Checkboxes. The table consist of 3 simple columns: id, name and selected (bool). I added a asp:CheckBoxList control to a form, bound it to a SqlDataSource. I ...
1
vote
0answers
340 views

How to filter using a dropdown in a gridview and display all values when none is selected

I have a web page with 3 values (1 text box, and 2 drop-downs) and displays result in a gridview. This is working great when the value that I want to search is in the drop-down. However, if the user ...
0
votes
0answers
1k views

insert into a database with a sqldatasource. asp.net mvc4

My problem is that when I click the button nothing happens to the sql server. When I look in the profiler I can see that my code reads from the database but nothing else. I have borrowed code from the ...
0
votes
2answers
491 views

Removing duplicates from sqldatasource

I'm trying to create a "Contact Us" page and I have a drop down list on this page using a SqlDataSource to pull the list from my database but my database has duplicate entrys that I do not want shown ...
0
votes
0answers
139 views

updating a single SQL table from a joined datagridview

So my problem is that i need to update a table on my database using a DataGridview bound to an SqlDataSource. the thing is that this DataGridview is a joined set of other tables from the same database....
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
0answers
542 views

Getting asp.net SqlDataSource table dynamically from query string

I'm getting SqlDatasource table from query string likes <asp:SqlDataSource ID="myDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="...
0
votes
1answer
249 views

Change Label Control Property Based on Data from SqlDataSource Inside a Repeater

I am using a repeater control to populate data from SqlDataSource into my custom designed display-box. <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnDataBinding="...
0
votes
1answer
133 views

Update grid row within a grid using a datasource

I might be posting tons of ASP.NET questions during the coming weeks because the place I'm working at during the summer gives me several things to add to their CRM system even though I have never ...
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
0answers
412 views

VB.NET T-SQL error retrieving SCOPE_IDENTITY() value with SQLDATASOURCE

I'm using Scope_Identity() and I cannot figure out why the new ID value isn't being retrieved on insert. I was hoping someone could see what I am missing. I am getting the following error: ...
45
votes
3answers
19k views

“Server” vs “Data Source” in connection string

I'm new to SqlServer, right now I have SqlLocalDb installed to work locally. Good, but I can see two connection strings typically and both works: Data Source=(localdb)\v11.0;Integrated Security=true; ...
0
votes
3answers
2k views

Giving alias in JOIN command in sqldatasource

I am using JOIN command to connect two tables in SqlDataSource. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CS %>" ...
0
votes
3answers
923 views

Declare table variable in sqldatasource (aspnet)

I have a query that I try in Microsoft SQL Server Management Studio, and this query work fine: DECLARE @tableVariable TABLE (fecha DATE, valor Float); INSERT @tableVariable SELECT fecha, valor FROM ...
0
votes
0answers
274 views

SqlDataSource not being populated with parameter

I am executing an SSRS rpt and need to duplicate this in a web project with sqldatasource id's. The ssrs rpt parameters work perfectly as far as being populated, but when I try to get the same thing ...
2
votes
3answers
736 views

SqlDataSource won't retrieve logged in user's data from database?

I tried retrieving the user's data based on the logged in UserId, but no progress. Any suggestions? protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { // ...
1
vote
0answers
225 views

How to make SQLDataSource insert into view instead of the underlying table?

We have replaced 20 tables with a consolidated table, that separates each set of data via a "set id" (all the records for table "A" have a set_id of 1, table "B" is 2, etc.). We then built views on ...