Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple sql query not working /vfpoledb
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01158200
Message ID:
01158260
Views:
35
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform