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 Wanet Telecoms Ltd 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: *

  1. vonehle

    DataReader Not returning rows

    Good for you, because I was wrong anyway. Lucky for me, your code tipped me off on how to fix something I was working on. So, thank you!
  2. vonehle

    SelectedValue coming up blank in listbox

    Nevermind. I needed SelectedItem instead.
  3. vonehle

    DataReader Not returning rows

    I'm pretty new to this too, but I think your problem is that the myReader.read() comes after the .HasRows. It will always not have rows before the read starts.
  4. vonehle

    SelectedValue coming up blank in listbox

    ...'Declare a command and assign a SQL string to it Dim sqlcomm As SqlCommand = sqlconn.CreateCommand() sqlcomm.CommandText = "SELECT * FROM Students" 'Declare a datareader Dim drd1 As SqlDataReader = sqlcomm.ExecuteReader() While drd1.Read()...
  5. vonehle

    Perhaps I have a Logic Error?

    You're the man, GHolden. Just a silly misplaced parenthesis. Thanks for your help!
  6. vonehle

    Perhaps I have a Logic Error?

    Price field is MONEY. I just tried changing it to FLOAT, but it didn't help.
  7. vonehle

    Perhaps I have a Logic Error?

    Tried it. Both price columns have the same value.
  8. vonehle

    Perhaps I have a Logic Error?

    The first three are $39.95, 35.95, 37.50 After executing, table Books and table BookPriceIncrease_ByMajor still have the same values they had before executing.
  9. vonehle

    Perhaps I have a Logic Error?

    By adding yours directly beneath the CREATE PROCEDURE block, I get the correct @MajorID returned, but the calculation still doens't happen.
  10. vonehle

    Perhaps I have a Logic Error?

    ...sp_PriceIncrease Go CREATE PROCEDURE sp_PriceIncrease(@MajorID int , @Percent int = 5) AS UPDATE BookPriceIncrease_ByMajor SET Price = Price + (Price*(@Percent/100)) WHERE MajorID = @MajorID GO EXECUTE sp_PriceIncrease 1,15 GO SELECT MajorID, BookID, Price FROM BookPriceIncrease_ByMajor; GO
  11. vonehle

    Perhaps I have a Logic Error?

    bborissov, cfstarlight, I've tried your suggestion, but the calculations are still not being done. I do not get any errors during execution, but none of the prices ever get changed, no matter how many times I execute it. I'm wondering if the calculation is even taking place.
  12. vonehle

    Query Help

    I believe you'll want a SELECT INTO statement to accomplish this. I'm pretty sure most people on this forum prefer you to post the code you've tried. Partly because if this is homework, they'd like to know you've tried it yourself, and not just trying to get others to do your homework for...
  13. vonehle

    Perhaps I have a Logic Error?

    ...Go CREATE PROCEDURE sp_PriceIncrease(@MajorID int , @Percent int = 5) AS UPDATE BookPriceIncrease_ByMajor SET Price = Price + (Price*(@Percent/100)) UPDATE BookPriceIncrease_ByMajor SET @MajorID = MajorID GO EXECUTE sp_PriceIncrease 1,10 GO SELECT MajorID, BookID, Price FROM...
  14. vonehle

    Creating new Table, filling it with data from other tables

    I'm not sure I understand how I could use the UPDATE because the SET would be different every time. Isn't SET static? Thanks for your help. I'm going to read up on the JOIN stuff again.
  15. vonehle

    Creating new Table, filling it with data from other tables

    I'm having trouble figuring out how to fill a table with data from 3 other tables. Here's a simple example... CREATE TABLE dbo.Transcripts( StudentID int, First_Name CHAR(20), Last_Name CHAR(20), Semester int, ClassID CHAR(5), Title CHAR(50), Grade int, Credits int, GPA...
  16. vonehle

    How does this work?

    Thanks a lot! That isn't how I wanted it to look, but I see that it will work better than what I was trying to do. I'm still unclear on what makes it look for all the dinos, instead of just the first one. Why doesn't it need some sort of loop to find them all?
  17. vonehle

    How does this work?

    When viewed in HTML, this shows three different tables. I'm trying to get these all into one table. Can someone explain to me, in layman's terms, what makes this Stylesheet create a new table every time? <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet...
  18. vonehle

    Command Line Help

    I'm trying to run an example out of a java book and I'm just no good with command line stuff. I'm trying to connect to an example db2 database. I always compile and run java stuff from the jdk bin directory (C:\Program Files\Java\jdk1.6.0\bin). I have a program that is telling me to include...
  19. vonehle

    empty string error

    Thank you very much. I tried a try/catch earlier and it didn't work. Not sure what I did different this time, but it worked.
  20. vonehle

    empty string error

    ...with a NumberFormatException: empty string. Could someone please tell me why this is not being caught by strSquare.length? import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.math.*; public class SquareRoots extends JFrame { public static void main(String[]...

Part and Inventory Search

Back
Top