G
Guest
I'm having a very strange problem I can't seem to figure out and am hoping
maybe somebody has seen it before.
I get an exception "Cast string to date is invalid" with this chunk of code:
' class member
Private m_invDate As Date
' this code is not exact from the program, but essentially does the same
thing. This is were the exception occurs:
Dim str As String = "12/08/05"
invDate = str
Public Property invDate()
Get
Return m_invDate
End Get
Set(ByVal Value)
If Value Is DBNull.Value Then
Value = Nothing
End If
m_invDate = Value
End Set
End Property
The mystery is the code works fine on some computers and the server, but
throws the exception on a few computers. I've also noticed it may have
something to do with being logged in with admin rights(??). However, I got
the computer to work for a day being logged with the admin rights, but the
next day it started throwing the exception again. I have tried so many
different variations to fix this and have gotten nowhere with it. I would
appreciate any tips.
Thanks.
maybe somebody has seen it before.
I get an exception "Cast string to date is invalid" with this chunk of code:
' class member
Private m_invDate As Date
' this code is not exact from the program, but essentially does the same
thing. This is were the exception occurs:
Dim str As String = "12/08/05"
invDate = str
Public Property invDate()
Get
Return m_invDate
End Get
Set(ByVal Value)
If Value Is DBNull.Value Then
Value = Nothing
End If
m_invDate = Value
End Set
End Property
The mystery is the code works fine on some computers and the server, but
throws the exception on a few computers. I've also noticed it may have
something to do with being logged in with admin rights(??). However, I got
the computer to work for a day being logged with the admin rights, but the
next day it started throwing the exception again. I have tried so many
different variations to fix this and have gotten nowhere with it. I would
appreciate any tips.
Thanks.