prowebinteractiveinc
asked on
vb.NET check if returned value is a number
I have created a log file in mySQL for loggin users that connect to my db
the function that writes to the db is suppose to return the mysql_insert_id()
if the record fails it sends text or nothing, I want to make sure that the logging into the system doesnt work if the vb.NET app doesnt receive the mysql_insert_id()
I was thinking of isNaN but Im not quite sure how to use this function
please help
the function that writes to the db is suppose to return the mysql_insert_id()
if the record fails it sends text or nothing, I want to make sure that the logging into the system doesnt work if the vb.NET app doesnt receive the mysql_insert_id()
I was thinking of isNaN but Im not quite sure how to use this function
please help
ASKER
sample code for the isNaN pls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should be able to use a nullable type. For example:
Dim id As Nullable(Of Integer)
id = DirectCast(command.ExecuteScalar(), Nullable(Of Integer))
If id.HasValue Then
' The id was returned
End If
Hope that helps.