fab5freddy Posted November 15, 2010 Report Posted November 15, 2010 I have run into a little trouble. I need to create a histogram by accessing a database and retrieving numbers from the database. I can list all the database information however when it comes to the histogram part all I get is a lot of x's that crashes the whole program. I need to use the numbers from the currentStockAmount. If more information is needed let me know here is my code so far: function project4Part3() { var currentNumber; var currentName; var currentStockAmount; var itemRecords; //Open Inventory Items itemRecords = openInventoryItemsRecords(); //Read records and display while (itemRecords.readNextRecord()) { currentNumber = itemRecords.getItemNumber(); currentName = itemRecords.getItemDescription(); currentStockAmount = itemRecords.getItemStockAmount(); currentStockAmount = Number(currentStockAmount); document.write(currentNumber + "\t" + currentName + "\t" + currentStockAmount + "\n"); } } I think I need to convert the currentStockAmount to a Number but am unsure. Quote
falkencreative Posted November 15, 2010 Report Posted November 15, 2010 I'll take a look at this later... realistically though, if you are doing this for a class, you should have resources there that are available to you to help explain this information (professors, textbooks, sample code, etc.) Quote
fab5freddy Posted November 15, 2010 Author Report Posted November 15, 2010 You're right I agree with you about having other resources however we don't have class this week. As far as the book is concerned it is no good what so ever. There have been several complaints to the instructor to find us a new one. All he responds with is we should be able to find additional resources on our own. This can be a little overwhelming to a new student. This is not really the best class I've ever been as you can imagine. Only a few weeks to go. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.