Question : SQL Server 2005 / .NET compare dates as strings

Hi,

I am writing a stored rocedure to compare birthdates entered with those in our records as part of user validation. The records we are comparing to contain dates with no leading zeros ie 3/4/1994. The dates passed through the .NET application form the calendar control contain leading zeros ie. 03/04/1994. When the strings are compared, they fail.

Is there a method to change either one into the format of the other so they will pass compare?

Answer : SQL Server 2005 / .NET compare dates as strings

It's your 'Clear Payment Globals' subscript that runs near the top of the script.  This subscript breaks the context with portal, so when the script later gets to the GTRR step, it doesn't know which portal row to act on, so it goes to the first record every time.

At the top of your script, capture the name of the portal (which you set in the Object Info window, accessible from the View menu) using Get ( ActiveLayoutObjectName ), and the number of the portal row you want the script to act on using Get ( PortalRowNumber ).

After the subscript has run, and just before the GTRR script step, go back to the portal object (using Go To Object) and the correct portal row (using Go To Portal Row).

Obviously, you're going to need to put a button (or make one of the fields or the entire row 'clickable') on the portal so that the script can run for a specific portal row.

I hope this helps!
Random Solutions  
 
programming4us programming4us