Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: iRead
  • Order by date
  1. iRead

    I need help with a subquery!

    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...
  2. iRead

    Help with an apostrophe in a query string

    I’ll investigate that. Thank you, iRead
  3. iRead

    Help with an apostrophe in a query string

    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= <%#...
  4. iRead

    Method to copy the schema and data?

    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...
  5. iRead

    Method to copy the schema and data?

    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...
  6. iRead

    How do I reference an object with a JavaScript literal?

    crazyboybert, I appreciate the input! Thank you! iRead
  7. iRead

    Need help with focus() in a datagrid!

    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 =...
  8. iRead

    How do I reference an object with a JavaScript literal?

    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...
  9. iRead

    How can I avoid a “SqlNullValueException: Data is Null” Exception?

    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...
  10. iRead

    How can I avoid a “SqlNullValueException: Data is Null” Exception?

    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...
  11. iRead

    Problems with a SELECT SUM() AS statement

    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
  12. iRead

    Problems converting float to a string in C#

    octothorpe, Still thank you for your input! It's right on target. Thanks iRead
  13. iRead

    Problems converting float to a string in C#

    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! _______________________________________________________________________________...
  14. iRead

    Problems converting float to a string in C#

    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...
  15. iRead

    Problems converting float to a string in C#

    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...
  16. iRead

    Problems with a SELECT SUM() AS statement

    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'...
  17. iRead

    I need help structuring an UPDATE statement with multiple joins

    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
  18. iRead

    I need help structuring an UPDATE statement with multiple joins

    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...
  19. iRead

    Does anyone have a simple method to insert a row in a datagrid?

    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
  20. iRead

    Why do my edit fields in a datagrid have special formatting?

    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...

Part and Inventory Search

Back
Top