Ok after hunting the NET for Days on end it seems I finally arrived here.
I have Vis Studio 2003 .NET and I am using the OleDB Provider to access a Visual FoxPro Freetable - I also have the latest VfpOleDb.dll Provider and ODBC Provider - I do not know if VS2003 Accepted them or not -
How Do I register the Provider for Use with VS2003.NET
(how do I check that VS is using the updated driver for the OLEDB. For Vis FoxPro where I go to the connection dialog
AND HOW can I fix the following - which is the whole point of all my other questions!
I have a problem though querying the database using the something like this
Select myCharField.MyTable, MyOtherCharField.MyTable , MyCharFromOther.MyOtherTable
From MyTable, MyOtherTable
Where myCharField.MyTable = MyCharFromOther.MyOtherTable AND NOT
Like'[a-z]%'
I have a Char Field that contains both Alpha and Numeric data but I want only the records with NUMERIC data - the field is CHAR.
I looked on the web and found all of two articles that said you must manually create the command - I did and I receive an error, just as I did in the VS2003NET Query Builder.
I receive unknown Phrase/keyword near '['
I would like an answer for this as well as how to use the Cast function.

OLE DB and Visual FoxPro
Sarbjit Chawla
Thanks Cindy for your response.
I have the latest VFPro drivers. DL'd them from the web. Problem is ensuring my Vstudio allows me to use them When I create the connection. The dialog comes up and gives a list of providers (AND THATS IT!) there is no selection for other or Add - where does Vstudio look for these providers to show in that dialog window - I see the Oleprovider, SqlProvider etc.. but there is NO WAY to use Other or Add at least not from that dialog window..
As for the LIKE command - I was using like because I have a ALPHANUMERIC characters in one field such as Axw123090 - I only want to get the ones that have Numeric So I thought I would write the script where NOT Like A-Z% and NOT Like a-z%
all of the records in the field may be preceded with one two or three Alpha characters - I simply want to eliminate them from my result set.
is the Wild Card aproach still good on NOT between 'a%' and 'z%'
Will this work in VFoxPro
barkingdog
Hi StixOfFire,
Sorry I didn't find your thread sooner.
Please be sure you have the latest FoxPro and Visual FoxPro OLE DB data provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
I'm not sure what you mean by "register the provider for use with VS2003." (I'm looking at VS2005 since I don't have VS2003 on this machine.) In the Server Explorer pane, Data Connections you can choose <Other> then ".Net Framework Provider for OLE DB which brings up a list of the Ole Db data providers that are available, including "Microsoft OLE DB Provider for Visual FoxPro."
If you are working with a connection string in code, the simplest possible connection string is "Provider = VfpOleDB.1;Data Source = D:\Temp;" . If there are spaces in the data source path then you'll need to surround it with quotes.
FoxPro's implementation of the SQL language is a little different from ANSI SQL. Your SQL, Select myCharField.MyTable, MyOtherCharField.MyTable, MyCharFromOther.MyOtherTable From MyTable, MyOtherTable Where myCharField.MyTable = MyCharFromOther.MyOtherTable AND NOT Like'[a-z]%' will not parse correctly, first off since you need to say that something is not like whatever. Are you trying to say that the expression must not begin with a lower case alpha character If so you can use AND NOT Between 'a' and 'z' . Otherwise, it's important to note that square brackets are string delimiters in FoxPro.
As for the Cast function, it's always easier to answer questions that are more specific like "How do I use Cast to change a DateTime to a string "