Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 25th, 2005, 01:22 PM
Registered User
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to webgen
Default Connecting to a DBF Table

Can anyone tell me what the proper code is to connect to a FoxPro .dbf file in ASP.NET using VB.net? The file is going to be on the local drive. I have looked high and low and I cannot find anything that works correctly. I have found some examples here but they fail when I actually try to retrieve some data from the table. Any help would be greatly papreciated...

Thanks
 
Old June 16th, 2005, 02:36 AM
Authorized User
 
Join Date: May 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shaileshk Send a message via Yahoo to shaileshk
Default

Hi

Have Connection String for connect databse to your web application ?



shailesh kavathiya
http://www.kavathiya20m.com
 
Old June 27th, 2005, 05:32 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

if you are using framework 1.1 then use the System.Data.ODBC.ODBCConnection class to connect to the dbf via a DSN

Cheers

Anubhav Kumar
 
Old June 30th, 2005, 05:43 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anubhav is right u can use ODBC to connect to Foxpro

 
Old July 15th, 2005, 03:55 PM
Authorized User
 
Join Date: Jan 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, you could use oledbconnection, then you choose the proper provider from connection wizard, the installation of the provider is free for download from microsoft download page, the installer is vfpoledb.exe. after the installation you should give permissions for the provider dll in system32 folder for the aspnet account in order to access the provider.

 
Old April 1st, 2006, 03:52 AM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can access Visual FoxPro databases and tables in Visual Studio .NET using the Visual FoxPro OLE DB Provider. The Visual FoxPro OLE DB Provider is available through the Visual Studio Server Explorer or by using connection strings in code.

Use a connection string to specify the Visual FoxPro OLE DB Provider and the data source as shown in the following code:

Imports System.Data.OleDb
Public Class ConnectToVFP
        Public Function ADONETOpenVFPDatabase() As Boolean
            Dim bIsConnected As Boolean = True
            Try
                Dim cnn As New OleDbConnection("Provider=VFPOLEDB.1;" + _
                   "Data Source=.\MyTestDatabase.dbc;")
                cnn.Open()
            Catch e As System.Exception
                bIsConnected = False
            End Try
            Return bIsConnected
        End Function
End Class





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL table to .DBF file harriet SQL Server 2005 1 May 17th, 2006 06:37 AM
Exporting Oracle Table to .dbf (FoxPro 2.6) File syamchandr Oracle ASP 2 December 12th, 2005 04:43 AM
Trouble with connecting two table with relationshi tycoon Dreamweaver (all versions) 1 December 26th, 2003 07:21 AM
ADO connecting to a Paradox 8.0 table cpopham Access VBA 0 December 5th, 2003 01:22 PM
Connecting to Paradox Table using ASP crobarian Classic ASP Databases 0 July 24th, 2003 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.