Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL INSERT to MS Access Failing
Message
De
31/10/2011 16:40:08
 
 
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 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01527718
Message ID:
01527721
Vues:
62
>I see a few minor problems with the way you retrieve identity - I suggest to remove the line with select @@identity and add OUTPUT clause to the first insert statement, so you will have one less statement to run.
>
>Now, I also suggest to use text to lcSQL noshow instead of the one line - the query will be easier to read.
>Finally, if the above suggestions will not help much, as an experiment, you can use textmerge noshow in the above and use the actual values, e.g.
>
>text to lcSQL textmerge noshow
>insert into myAccessTable (field1, field2, field3)
>values (<<Val1>>, '<<Val2>>', '<<Val3>>')
>endtext
>
>The above is not recommended approach, I suggest it just to try.

Well, OK, I can try that, but note that the @@identity line is working fine; it's the INSERT for the second table that fails. Text To and TextMerge may make it look prettier, but will it change the result?
Ray Roper
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform