Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple sql query not working /vfpoledb
Message
De
29/09/2006 15:15:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01158200
Message ID:
01158260
Vues:
36
Try:
SqlDataSource2.SelectCommand = "SELECT office, MAX(nsn) AS Nsn FROM csulog6 where nsn like" + "'51%' GROUP BY Office order by office"
>SqlDataSource2.SelectCommand = "SELECT distinct office FROM csulog6 where nsn like" + "'51%' order by office" <-- GIVES the error
>
>SqlDataSource2.SelectCommand = "SELECT distinct office,nsn FROM csulog6 where nsn like" + "'51%' order by office" <--GIVES no error but I do not get get the OFFICE uniquely. :-(
>
>
>
>>
>>>No, that was a typo just when I wrote in the UT, error still exists.
>>>
>>>>You have wrong table name, 'thistable' instead of 'csulog6'.
>>>>
>>>>>In my VB asp page I have this line
>>>>>"SELECT distinct office FROM thistable where nsn like" + "'51%' order by office"
>>>>>
>>>>>and I get this error
>>>>>
>>>>>A field or property with the name 'nsn' was not found on the selected data source.
>>>>>However "SELECT distinct office,nsn FROM csulog6 where nsn like" + "'51%' order by office" does work
>>>>>
>>>>>PS, I am using VFPOLEDB to access a microsoft visual Foxpro table
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