Information générale
Catégorie:
Codage, syntaxe et commandes
if either start or end date is empty the program aborts
I was concerned about a time in the datetime data type in SQL
I prompt to 02/02/2010 and 02/02/2010:11:00 it would be greater than 02/02/2010
If there is a time and I only prompt for a date.
The database I am selecting from I have no control over.
>What is the reason for using character strings for dates in your SP? If you want (for some reason) to use characters, then you need to pass them as characters from VFP. You can use DTOS() function for this.
>
>Also, what empty string will mean?
>
>>I have 3 parameters I am trying to pass to a stored procedure
>>They are date fields in the parameters, not date time.
>>The SP variables are string.
>>
>>Is this the correct syntax in Foxpro 9?
>>I am not getting a cursor to be generated.
>>The SP works when I enter 01/01/2009 and 02/01/2009 in QA
>>
>>ldStartDate={}
>>ldEndDate={}
>>ldStartDate=thisform.startdate.value
>>ldEndDate=thisform.enddate.value
>>
>> lcSQLCMD="exec get_invoices ?ldStartDate,?ldEndDate"
>> SQLEXEC(gnConnect,lcSQLCMD,'jobcost')
>>
>>
>>the parameters in the SP are this
>>
>>Alter PROCEDURE get_invoices
>> @ldStartDate Char(12) = '',
>> @ldEndDate Char(12) = ''
>>AS
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement