Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple sql query not working /vfpoledb
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01158200
Message ID:
01158269
Vues:
33
It's not VFP error, btw.

>I tried it and it worked. Thanks. I guess old fashioned SQL is not enuf.
>
>>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
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform