473,407 Members | 2,546 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,407 software developers and data experts.

Foxpro database connectivity Urgent Help please

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
1 1839
<sm********@gmail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
>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".....

If I put the same string in a VB.NET the connection string works fine.
Hi!

The account the web server runs under needs to have network permissions to
the directory where the DBFs are stored.

Also, the basic connection string for VFP OLE DB is
"Provider=VFPOLEDB.1;Data Source=....". Everything else you have is the
default.
--
Cindy Winegarden
ci***@cindywinegarden.com

VFP OLE DB: http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC: http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
Jun 24 '07 #2

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

Similar topics

1
by: Stuart | last post by:
Hi, I have a web site that is built using FOxpro database (free table directory) running on a Win2003 server and IIS 6. I am using a DSN as the connection string to the DB. To connect to...
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: Amedee Van Gasse | last post by:
Hello, Since it is the first time I'm posting in these groups, I believe a (short) introduction of myself would not be a bad thing. I am mainly a support engineer, not a programmer. I do have...
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...
12
by: Alex S | last post by:
Hello everyone, My company uses a FoxPro database right now as an interface and a database. For our situation, I have come to the conclusion that it would be a better choice for us to move to an...
2
by: vidhyapriya | last post by:
I want to convert database file .DBF of FoxPro into Mysql database please suggest me the procedure for this conversion... I don't have FoxPro in my system. but i have .dbf file in my...
0
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...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.