|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using VB to read Visual Foxpro filesI have a VB 5.0 program that reads VFP (Visual Foxpro 8.0) data files, and
is successful. It uses ADO with an OLEDB provider for VFP. However, it only works when I read a DBF file (I understand this to be a 'free table' in VFP). But what I really want to do is read a View from VFP, and it is located in a Visual Foxpro DBC database. Whenever I open the DBC database it is successful, but reading the View fails. It seems to fail because the View calls another View, which I think obtains VFP data from a different disk path. Is there any way around this? I guess the ADO using OLEDB doesn't know anything about getting the data except that it obtains it from a single file path, and if a View within a View gets the data from a different file path it fails? Any help appreciated. Hi Tom,
You didn't say what kind of "it fails." I created a simple Fox DBC with a table and a view of the table and was able to read it correctly using the Fox OLE DB data provider. However, everything was all in the same directory. I created a table in another directory that was part of the original DBC, and a view of that table and was able to read it correctly. I created another DBC and table in a different directory and created a view in the original DBC to the table belonging to the other DBC and was able to read it correctly. In my original DBC I created a "remote view." This requires a connection to an ODBC data source (I used SQL2K Northwind), which I also created. I was not able to read this view - the error message was "System.Data.OleDb.OleDbException: Connectivity error: [Microsoft][ODBC Driver Manager] Connection not open." Note that this refers to an ODBC connection - i.e. the connection to Northwind in my DBC - rather than my OLE DB connection to the Fox DBC itself. The DBC metadata includes both the ODBC connection and the view definition, but at this point I don't know what is required to open the connection. (Sorry, this is new ground for me.) Do you have any more information on exactly what your view definition is? Does your app have full rights to the other directory? -- Cindy Winegarden MCSD, Microsoft Most Valuable Professional cindy_winegar***@msn.com www.cindywinegarden.com Blog: http://spaces.msn.com/members/cindywinegarden "Tom Edelbrok" <anonym***@anonymous.com> wrote in message news:SEb5f.34277$S4.20160@edtnps84...Show quoteHide quote > But what I really want to do is read a View from VFP, and it is located in > a Visual Foxpro DBC database. Whenever I open the DBC database it is > successful, but reading the View fails. It seems to fail because the View > calls another View, which I think obtains VFP data from a different disk > path. > > Is there any way around this? I guess the ADO using OLEDB doesn't know > anything about getting the data except that it obtains it from a single > file path, and if a View within a View gets the data from a different file > path it fails? > >
Efficient way to parse large files
Subclass Help WM_NOTIFY array loop alignment Finding files and/or folders Problem executing a DTS from a VB6 application after installing th BAS Module! DataGrid Format Question Controlling location of form within form "_files" folders and related folders How to monopolize Windows in vb6 |
|||||||||||||||||||||||