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 endup generating a script for the schema from Enterprise Manager then generated a script for the data with a third party utility. Combined the two. Then I found a vb script file to prompt for the server name and launch the sql script with osql. The solution turned out reasonably elegant and...
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...
Walid and obislavu,
Walid you’re right. I don’t want to define the dTotal and assign value to it in each iteration. I’m experimenting with obislavu’s suggestion:
double dTotal = (double) comm.ExecuteScalar();
With that statement I’m still getting an error when the while condition returns no...
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...
tektipdjango and SQLBill,
Thank you each for your valuable input. The problem was with using a column like a variable in the C# code. The problem is now resolved.
iRead
Thank you obislavu!
I had tried that and still got an error. To be truthful I tried many, many approaches with no success.
This was posted to me on another forum. This led to a resolution of the problem!
_______________________________________________________________________________...
Okay here is all of the code associated with the error I'm getting
The value of the variable I’m trying to write to LTotal comes from a SQL query. The firstName column is type varChar. The column amount is float. The character column writes to the variable fine. The float column causes the...
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'...
AngelTampaBay,
There was a filter condition I neglected to put in the select statement in my posting. Soon as I included that in the update statement you suggested and tweeked it a little it seems to work just as intended.
Thank you greatly!
iRead
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...
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.