PDA

View Full Version : Flatfile Problem



ecampsite.co.uk
18 Dec 2005, 09:58 PM
I think this is a simple question for most of you but I just cant seem to get this right. Ive got a flatfile database, and can display all of the records. What i want to do though, is only to display records that are equal to a fieldname. For example i have the field, $county and i would like to only display the records with the $county field = somerset
Please help me! :(
Thanks,
Craig

DanInManchester
01 Jan 2006, 11:29 AM
I'm not sure what language you are using but in the likes of ASP and ASPX you can connect to pretty much any datasource using ADO or ADO.net and then query your data using SQL.

So to do what you want would require the apropriate text database driver and an SQL string like so :

SELECT * FROM Countries.csv WHERE Country LIKE 'Somerset'

If you are using ASP this article explains it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting03092004.asp