473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

FoxPro database connectivity

I have an ASP.NET website.
I'm trying to connect to a Foxpro database (ADO.NET) with the
following
connect string:

txtConnectionStr.Text = "\\soya4042\Qd\LM\LMS\Data"
Dim strFoxProDirectory As String = txtConnectionStr.Text
Dim strConnection As String = "User ID=;DSN=;Cache
Authentication=False;Data Source='" & _
Trim(strFoxProDirectory) & "'" & _
";Provider='VFPOLEDB.1';Collating
Sequence=Machine;Mask " & _
"Password=False;persist security info=False;"
& _
"Mode=Share Deny None;Extended
Properties=;Encrypt Password=False"

If I put the same string in a VB.NET the connection string works fine.
Do you have any other suggestions?

I can open the network path and read the files in my windows explorer \
\soya4042\Qd\LM\LMS\Data

Invalid path or file name.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Invalid path or
file name.

Source Error:
Line 44: ODBCCon.ConnectionString = strConnection
Line 45: m_OleDBConnection = ODBCCon
Line 46: m_OleDBConnection.Open()
Line 47:
Line 48: Dim strSelect As String = "Select dsid, dsname,
FName from dsmaster order by dsname"
Source File: c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.v b
Line: 46

Stack Trace:
[OleDbException (0x80040e21): Invalid path or file name.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
WebApplication1.WebForm1.btnConnect_Click(Object sender, EventArgs
e) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.v b:46
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1292

Jun 20 '07 #1
0 1110

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kimo | last post by:
Hi I develope an application in VB.Net. I want to connect to foxpro database. I use the following code Tr Dim cnn As New OleDbConnectio cnn.ConnectionString = "Provider=VFPOLEDB.1;" + "Data...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
8
by: Alfred | last post by:
Hi What is the difference between Access and Foxpro and who will use Foxpro. Thanks Alfred
2
by: Salad | last post by:
OS = WinXP & Win98. Access = A97 & AXP Q1) Where can I find the VFP ODBC driver at Microsoft. I have been working developing an app in Access that will link to some DOS FoxPro tables. I...
1
by: David Sorber via AccessMonster.com | last post by:
Hello, I've got two questions. Im writing an Access 2000 database to collect data from multiple Visual Foxpro Databases, total some figures, save the data into a table for archiving purposes, and...
9
by: cj | last post by:
I'm trying to forge ahead with Visual Basic .Net but recently I've suffered several major set backs in demonstrating VB is the future and we should move from Visual FoxPro. I really need to find...
2
by: Toco | last post by:
Hello. I have app written in C# that we are testing. The executable is shared on our network. The method we are testing is a call to a foxpro table. The call is made to query the table, then...
1
by: smtwtfs007 | last post by:
I have an ASP.NET website. I'm trying to connect to a Foxpro database (ADO.NET) with the following connect string: txtConnectionStr.Text = "\\soya4042\Qd\LM\LMS\Data" Dim strFoxProDirectory As...
3
by: HistoricVFP | last post by:
Hello, I’ve been given the task of importing .dbf files from a very old version of Visual FoxPro (version 2.1) into Access (2003). When I import the data straight to Access it errors with: ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.