Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this SPT containing dates
Message
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 8 SP1
Database:
MS SQL Server
Divers
Thread ID:
01134926
Message ID:
01136351
Vues:
16
>Hi Borislav
>
>>You could put comments as many as you wish, but don't use VFP comments chars [* or &&] use SQL Server ones [-- or /* */]
>>Something like:
>>
>>TEXT TO cVar NOSHOW
>>     SELECT MyField,    -- This is the first field
>>            SecondField -- SecondSelected field
>>     FROM MyTable       /* This is the table */
>>ENDTEXT
>>SQLEXEC(.....)
>>
>
>Didn't seem to work. I have tried to paste the query in SQL Query analyser and it would work. But the same (ie. with comments with -- in it) will not work from VFP. Worked only after I removed, unfortunately with the time limitations I couldn't test which one, all the comments.

What error you get?
Here what works on my computer:
CLEAR
sqlH = SQLSTRINGCONNECT([.......;DataBase=master])
IF sqlH > 0
    TEXT TO lctext NOSHOW 
         SELECT Type, -- This is TYPE Field
                Name  -- This is Name Field
         FROM dbo.spt_values /*This is Table Name*/
    ENDTEXT
    IF SQLEXEC(sqlH, lcText) < 0
       AERROR(la)
       MESSAGEBOX(la[2])
    ELSE
    BROWSE NORMAL
    ENDIF
ELSE
   AERROR(la)
    MESSAGEBOX(la[2])
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform