Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting Datefield into Remote SQL Fails
Message
 
À
18/09/2008 15:00:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01348719
Message ID:
01348721
Vues:
14
>We have the following code that inserts records into a remote sql Server 2005 table. However it fails, I think, because the hold_date might be empty.
>
>Insert INTO remotehistory (;
>ordernum, custnum, hold_date, address;
>VALUES (;
>Changed.order, changed.custnum, changed.hold_date, changed_address;
>)
>
>If that's the case, how do I code that so if there is no hold_date the insert works?
>If that's not the case, what else could my problem be?
>Many thanks.

Try
Insert INTO remotehistory (;
ordernum, custnum, hold_date, address;
VALUES (;
Changed.order, changed.custnum, IIF(EMPTY(changed.hold_date),'',changed.hold_date) , changed_address;
)
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform