I have a SELECT statement with a subquery. I use an alias as I add the results of the subquery to the dataset. I then try to use the alias in the WHERE clause of the SELECT statement. I get an “Invalid column name “ message with this code:
select i.id as itemid,
(select top 1 ca2.itemid from...
In my application I have the user click on a row in a data grid to drilldown to the detailed data then displayed on the resulting page. I use this line in the datagrid to make this happen.
<a style="COLOR: black; TEXT-DECORATION: none" href='TestList.aspx?Res=1&Type=Desc&Name=
<%#...
I need to create some sort of method to copy the schema and data from an existing database and recreate that database schema and data at another location i.e. customer site. I would like to be able to start the rendered script from a command line. I will be very appreciative of anyone who can...
I’m trying to set the focus to the first textbox of the row I’m editing in a datagrid when I press the edit button on the row. Problem is I don’t know how to reference the textbox.
I’ve tried:
// Set the script to focus and select the TextBox
ltlScript =...
In the C# code I want conditionally store reference to an object to a literal executed in a JavaScript .
Example one works:
<script language="JavaScript">
function setFocusIfNeeded()
{
document.all('atMyDropDownList').focus()
}
</script>
<body...
The variable sbSQL is an SQL SELECT SUM() statement with a while condition. The while condition may return no records. This code works fine when records are returned but throws the error listed below when the while condition returns no records.
sql = sbSQL.ToString();
SqlCommand comm...
The value of the variable I’m trying to write to fTotal comes from a SQL query on a column with a type of float. I think my problem may have something to do with boxing and unboxing variables. I plan to research this to understand it better. Any input on what causes the errors in the two code...
When I execute the code around these statements I get the error below. Any suggestions on why or ideas about a better way to a total from a column in a dataset with 3 or 4 filter conditions will be greatly appreciated.
Select SUM(amount) AS SQLTotal FROM T1 WHERE comID = 'C1' AND catID = 'C2'...
Okay I have an application where I need to replace a variable in one data table with the value from another data table. Problem is there are two table in between that relates the records and I can’t figure out how to structure the update statement.
I use a join like the one below to return a...
Any help will be greatly appreciated!
I found a couple examples in VB.Net. The only examples I’ve found in C# are petty complex and convoluted in both the ASP.Net code and the .cs code. I wouldn’t imagine it should be that much different that VB.
Thank You!
iRead
Any help will be greatly appreciated! Here’s the problem: in edit mode the first 3 fields firstName, middleName and lastName have special formatting. Those 3 fields are a different color and have a 3-D shadow effect. The other two socialSecurityNumber and amount appear as a normal textbox. The...
Any help will be greatly appreciated!
I have a problem in my edit control on a datagrid. All of the fields are varchar except amount which is float. The problem is when I try to build my SQL update string. With this line in I get an error. With this line out no error:
"amount = '" +...
I have an application with a portion that essentially acts as a contact manager. After a new contact is added the data is save in the database and the page reloads to clear the values in order to except new values for the next contact to add. This method has worked fine. Now I want to persist...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.