 |
BOOK: Beginning VB.NET Databases  | This is the forum to discuss the Wrox book Beginning VB.NET Databases by Thearon Willis; ISBN: 9780764568008 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning VB.NET Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

November 29th, 2005, 11:23 PM
|
Authorized User
|
|
Join Date: Feb 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CH 12 LoadTimeSheet() Problem
I am having a problem in CH 12 - trying to log in as a user returns the following error:
Code:
Operator is not valid for type "Integer" and type "DBNULL"
The error is returned at this line of code from TimeSheet. vb:
Code:
intTotal += objTimeSheetDS.Tables( _
"TimeSheet").Rows(intIndex).Item("MondayHours")
I believe it is looking for rows of data that do not exist in the DB.
I am using the code downloaded from Wrox.com.
Any help with this would be appreciated - This problem is identical to the 2nd problem posted in this forum (hgcheong), but that solution will not help in this case as I have not typed the code for the solution and can assume that the code is correct.
Chuck
|

November 30th, 2005, 07:23 AM
|
Authorized User
|
|
Join Date: Feb 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Additional - just completely installed everything needed for the Time Tracker project on my home computer (other post was in regards to work computer) and I get the same error. Am able to add users using the Command Window method on Pages 348-349. When I attempt to logon as User1, I get the same error at home that I did at work. As before, I am using the code from the book, so it is not a typo error.
Operator is not valid for type "Integer" and type "DBNULL"
Anyone have any ideas?
Chuck
|

November 30th, 2005, 09:35 AM
|
Authorized User
|
|
Join Date: Feb 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
If anyone has the time, could you shoot me a quick screen shot of valid data for the TimeSheets and TimeSheetItems tables, then I can be on my way, and I will return the favor if I can someday.
Chuck
|

January 22nd, 2006, 09:44 AM
|
Authorized User
|
|
Join Date: Feb 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I still need the answer to this problem, I put it on the back burner until I get the code to continue.
Chuck
|

January 23rd, 2006, 07:29 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
Chuck,
You should never run across an instance where the employee does not have a timesheet. Check the GetTimeSheet procedure in the WDATimeSheets class in the data access component. This procedure checks the DataSet after you call the usp_SelectTimeSheet stored procedure and if it is empty, it calls the AddTimeSheet procedure to insert an empty timesheet.
Thearon
|

February 11th, 2006, 08:15 PM
|
Registered User
|
|
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thearon,
I'm having this same problem in Chap. 12(Private Sub LoadTimeSheet). The problem is that when it queries the new time sheet record (usp_SelectTimeSheets)after it gets added to the TimeSheets table, it looks for an integer value for "MondayHours" in the objTimeSheetsDS RecordSet, but finds a NULL value. That's where the error occurs.
Was there a spot I'm missing that converts these NULLS to zeros?
Please help!
Thanks.
John
* The book has been great so far!
|

February 14th, 2006, 08:06 PM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
You'll need to set a breakpoint on the line of code:
objTimeSheetDS = objTimeSheets.GetTimeSheet( _
New Guid(strUserID), WeekEndingDate.SelectedItem)
in the LoadTimeSheet procedure and trace this call through line by line to determine where the problem lies.
When you get to the GetTimeSheet procedure in the WDATimeSheets class, ensure the UserID and WeekEndingDate parameters contain values.
Thearon
|

November 2nd, 2006, 09:14 AM
|
Registered User
|
|
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just downloaded code from site and is experiencing the same problem. Did not see a resolution to this problem in previous responses. Thus, how do I resolve this issue?
|

November 6th, 2006, 07:07 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
When you installed SQL Server, did you perform a default installation of SQL Server or did you customize the installation options?
Thearon
|

April 22nd, 2010, 01:41 AM
|
Registered User
|
|
Join Date: Apr 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
LoadTimeSheet
Dear chuck,
How this issue solve?
Best Regards,
Thanks
Pisith Oum
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
CH 12 login nightmare |
gegala |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
2 |
December 31st, 2007 09:34 AM |
ch 12 php logins |
ejurasin |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
1 |
March 13th, 2006 02:24 PM |
Ch. 12 Connect.asp |
mcauliff |
BOOK: Beginning ASP 3.0 |
2 |
August 5th, 2005 02:47 PM |
Ch. 4 & Ch. 12 |
athena |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
0 |
July 23rd, 2004 10:54 AM |
|
 |