Questions tagged [selectcommand]

48 questions
0
votes
3 answers

How will I execute another SELECT command after I executed the first one?

protected void Button1_Click(object sender, EventArgs e) { string client = TextBox1.Text; string selected = RadioButtonList1.SelectedValue; string calendar = Calendar1.SelectedDate.ToShortDateString(); string…
0
votes
0 answers

Open a GridView using row parameters from another GridView

I am opening a modal window from the below button (btnOpen). This bhutton is located inside a GridView. It needs to open another Gridview in the modal window but my code is not working:
Johnathan
  • 879
  • 3
  • 12
  • 22
0
votes
1 answer

Cancel SqlDataSource selecting rows when SelectCommand timeout

How can I cancel selecting rows in SqlDataSource when SelectCommandtimed out? I know that I can set CommandTimeout property but I want to Handle error and force Page to continue running when SqlDataSource timed out. for more information: in my…
Micle
  • 159
  • 10
0
votes
0 answers

Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column

I have set PK for all Admin tables. They were working fine in the website. It's still working in the VM, when I debug the application using F5. But the same code when deployed to IIS website, throwing this error all of the sudden. I didn't change…
Jay
  • 11
  • 2
0
votes
1 answer

A WHERE statement in my SqlDataSource causes invalid character exception (ORA-00911), why?

I'm using Oracle developer tools and my generated select command is: SelectCommand = "SELECT "FIRSTNAME" FROM "USERS" WHERE ("USERNAME" = ?)">` Then I removed all " and replaced them with a single quote: '. Then…
0
votes
1 answer

ASP.NET passing value from textbox to selectcommand with IN vb

I have an asp.net webpage with an asp.net gridview with the following query: SelectCommand="SELECT * from details2 as t2 WHERE (t2.OCC IN ('+ @txtCOUNTRY +') OR t2.DCC IN ('+ @txtCOUNTRY +')) and t2.ac='Y'" The textbox txtCOUNTRY value can have…
user1135218
  • 393
  • 1
  • 8
  • 26
0
votes
1 answer

Having trouble using SelectCommand to select values in SQL database (C#)

So in an application I'm making, I have a selectCommand that is supposed to read the text within a textbox on a button click, and filters search results based off of the value. Select command is. SelectCommand="SELECT (bunch of columns) WHERE…
JaGo
  • 257
  • 1
  • 4
  • 12
0
votes
4 answers

ASP.NET : Passing a outside variable into a tag ASP.NET 2.0

I'm designing some VB based ASP.NET 2.0, and I am trying to make more use of the various ASP tags that visual studio provides, rather than hand writing everything in the code-behind. I want to pass in an outside variable from the Session to…
Maximillian
  • 743
  • 2
  • 22
  • 41
0
votes
6 answers

OleDb Select Command Returning an Empty Column

I have two saved queries in my database called Free_Cash_Flow and Quarterly_Growth_Rates. They are shown here: Free_Cash_Flow: Quarterly_Growth_Rates: When I use this code: SELECT * _ FROM Free_Cash_Flow AS C _ INNER JOIN Quarterly_Growth_Rates…
gromit1
  • 577
  • 2
  • 14
  • 36
0
votes
0 answers

set Order By direction using selectparameters -- ASC or DESC

I'm trying to set the order by direction (ASC or DESC) by using SelectParameters and I get this error: Incorrect syntax near '@LicenseStatusSortOrder'. When I replace @LicenseStatusSortOrder with ASC or DESC then it works. The…
Clark Bohs
  • 11
  • 3
0
votes
1 answer

using selectcommand on code behind with gridview

I have a sqldatascource that I need to pass null values to it and then use the selectcommand specified by a stored procedure and then using the result query to populate a gridview on the page load notes: I tried the stored procedure on sql server…
Scarnet
  • 738
  • 2
  • 11
  • 36
0
votes
3 answers

The SelectCommand property has not been initialized before calling 'Fill

Im trying to upload some records from an excel file and got that error when uploaded the source to the server. `sqlQuery = "Select * from [Sheet1$]" oleConn = New OleDb.OleDbConnection oleConn.ConnectionString = conString If…
Carl Michaels
  • 125
  • 1
  • 3
  • 12
0
votes
1 answer

Error in SELECT command after changing date

Sir, I am using following script (complete aspx page) for dispaling 3 pivot tables from SQL sever 2008 database for December month 2012 <%@ Page Language="C#" %>
user1185088
  • 99
  • 1
  • 1
  • 8
0
votes
2 answers

Modify text values in datagrid returned by SELECT command

I would like to modify the text values after the data has been returned from the database, I need to modify the MBS1270 and the MBS1263 to look like the others when displayed in the datagrid. SelectCommand="SELECT PartNumber as 'Part Number',…
Charlie
  • 197
  • 4
  • 15