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.
When I run my program, it fills up the listbox properly, but when I try getting the SelectedValue, it comes back empty. I tested it by having a msgbox pop up with just the SelectedValue. Can someone tell me why the value wouldn't work?
Public Class frmCourseList
Public strStudents As...
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.
I like that little joke, GHolden. Do I have your permission to use that too?
DROP TABLE BookPriceIncrease_ByMajor
SELECT Majors.MajorID, Majors.Description, Books.BookID,
Books.Title, Books.AuthorName, Books.pub_id,
Books.BooksOnHand, Books.Price
INTO BookPriceIncrease_ByMajor
FROM...
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.
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...
As is, this code executes with no errors; however, it doesn't seem to be performing the calculation. I think this may be because the line SET @MajorID = MajorID is in the wrong place. Anytime I try to move it though, I get an error Msg 102, Level 15 State 1 Line 2. For the life of me, I can't...
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.
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...
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.