Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need syntax help with =SQLEXEC syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00506780
Message ID:
00506796
Vues:
16
Marie-
Your syntax looks correct. Is it possible that m.AgLoc really is empty?

Another possibility is that m.AgLoc is the wrong data type. It might be a good idea to check the return value from SQLEXEC() with code such as:
lnResult = SQLEXEC(nconnhndl, m.cStatement)
IF lnResult < 0
&nbsp;&nbsp;&nbsp;* Insert error handling code here, or SET STEP ON if in development mode.
ENDIF  && lnResult < 0
By the way, I've never tried using the "m." syntax in parameterizing SQL. I doubt that's the problem, but if you can unambiguously use simply "?AgLoc" you might try that too.
zahid

>I have to copy a very large number of records to an existing table on a SQL Server from a VFP 6.0 table. I have no problem moving numeric constants to SQL, but can't seem to get the syntax right to move the character data over. Below is my statement:
>
>m.cStatement = "INSERT into Producercodes (iAgencyID, cAgencyLocation,) Values (1, ?m.AgLoc)"
>
>m.AgLoc being the value in cAgencyLocation.
>
>When I run =SQLEXEC(nconnhndl, m.cStatement) the iAgencyID field on the SQL server table is populated with 1, but cAgencyLocation remains blank.
>
>Suggestions?
>
>Marie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform