473,796 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

txtConnectionSt r.Text = "\\soya4042\Qd\ LM\LMS\Data"
Dim strFoxProDirect ory As String = txtConnectionSt r.Text
Dim strConnection As String = "User ID=;DSN=;Cache
Authentication= False;Data Source='" & _
Trim(strFoxProD irectory) & "'" & _
";Provider='VFP OLEDB.1';Collat ing
Sequence=Machin e;Mask " & _
"Password=False ;persist security info=False;"
& _
"Mode=Share Deny None;Extended
Properties=;Enc rypt 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.Ole Db.OleDbExcepti on: Invalid path or
file name.

Source Error:

Line 44: ODBCCon.Connect ionString = strConnection
Line 45: m_OleDBConnecti on = ODBCCon
Line 46: m_OleDBConnecti on.Open()
Line 47:
Line 48: Dim strSelect As String = "Select dsid, dsname,
FName from dsmaster order by dsname"

Source File: c:\inetpub\wwwr oot\WebApplicat ion1\WebForm1.a spx.vb
Line: 46

Stack Trace:

[OleDbException (0x80040e21): Invalid path or file name.]
System.Data.Ole Db.OleDbConnect ion.ProcessResu lts(Int32 hr) +20
System.Data.Ole Db.OleDbConnect ion.InitializeP rovider() +57
System.Data.Ole Db.OleDbConnect ion.Open() +203
WebApplication1 .WebForm1.btnCo nnect_Click(Obj ect sender, EventArgs
e) in c:\inetpub\wwwr oot\WebApplicat ion1\WebForm1.a spx.vb:46
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+33
System.Web.UI.P age.ProcessRequ estMain() +1292

Jun 20 '07 #1
1 1857
<sm********@gma il.comwrote in message
news:11******** **************@ q75g2000hsh.goo glegroups.com.. .
>I have an ASP.NET website.
I'm trying to connect to a Foxpro database (ADO.NET) with the
following
connect string:

txtConnectionSt r.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=VFPOL EDB.1;Data Source=....". Everything else you have is the
default.
--
Cindy Winegarden
ci***@cindywine garden.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
1568
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 the database I am using ADODB.Record, Cursor Type of Static, Lock Type of Readonly, command
13
13359
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 and disadvantages of both programs. Many Thanks Simon
8
2720
by: Alfred | last post by:
Hi What is the difference between Access and Foxpro and who will use Foxpro. Thanks Alfred
2
2534
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 some experience with Java and LAMP (Linux/Apache/MySQL/PHP) but don't consider me one of those boring OS advocates please. ;-) I also have done a little bit with Visual Basic (and GwBasic in a long forgotten past) and nowadays my job involves...
9
3339
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 help on this is. My current problem is I've got to display some Visual FoxPro data from stand alone tables in a datagrid (Widows App). The main table is 50 meg with 540,000+ records. 1 of the others joined to it is 11 meg and the other 2 are...
12
10507
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 SQL server of some sort. I have been given the task of overseeing the overhaul on the program. I am paranoid about security and uptime, and so is the CEO and there is more and more demand for the company to get on the interactive internet. I'd...
2
1813
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 system...how to convert plz help me...its urgent...i need the solution... Thanks
0
1123
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 String = txtConnectionStr.Text Dim strConnection As String = "User ID=;DSN=;Cache Authentication=False;Data Source='" & _ Trim(strFoxProDirectory) & "'" & _
1
2721
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 String = txtConnectionStr.Text Dim strConnection As String = "User ID=;DSN=;Cache Authentication=False;Data Source='" & _ Trim(strFoxProDirectory) & "'" & _
0
9530
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.