Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 25th, 2005, 02:22 PM
Registered User
 
Join Date: May 2005
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old June 16th, 2005, 03:36 AM
Authorized User
 
Join Date: May 2005
Location: rajkot, gujarat, India.
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
Reply With Quote
  #3 (permalink)  
Old June 27th, 2005, 06:32 AM
Friend of Wrox
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: New Delhi, India.
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
Reply With Quote
  #4 (permalink)  
Old June 30th, 2005, 06:43 AM
Friend of Wrox
 
Join Date: Sep 2004
Location: , , India.
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anubhav is right u can use ODBC to connect to Foxpro

Reply With Quote
  #5 (permalink)  
Old July 15th, 2005, 04:55 PM
Authorized User
 
Join Date: Jan 2005
Location: havana, , Cuba.
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.

Reply With Quote
  #6 (permalink)  
Old April 1st, 2006, 03:52 AM
Registered User
 
Join Date: Feb 2006
Location: , , USA.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL table to .DBF file harriet SQL Server 2005 1 May 17th, 2006 07: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 04:21 PM



All times are GMT -4. The time now is 07:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.