Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning DateTime value from stored proc
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Returning DateTime value from stored proc
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01386791
Message ID:
01386791
Vues:
79
This message has been marked as the solution to the initial question of the thread.
I want to check for the last date something occurred for a specified client. I have a procedure that checks for the last occurrence. The problem occurs when there is no record at all. How do I test for that? It returns {}, which is not null and doesn't register as empty with mmType.IsEmpty(). What's the best way to handle this? If I cast the return value as a string, SQL will give me a spelled out date. Do I need to get a count first and only check for the date if the count is > 0?
Any suggestions are greatly appreciated.

If anyone's interested, I did finally figure this out. I had to cast the return value as a string and then use mmType.IsEmpty() to test for an empty string. If not empty, then I use DateTime.TryParse to return it to a datetime type.
Linda Harmes
HiBit Technologies, Inc.
Répondre
Fil
Voir

Click here to load this message in the networking platform