473,804 Members | 2,064 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 2723


<sm********@gma il.comwrote in message
news:11******** **************@ n2g2000hse.goog legroups.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.
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
Hi !

The web server account must have permissions to the directory where the DBFs
are stored. Can you try your code against data on the local machine?

By the way, since VFP doesn't have password security, etc. you don't need
all the extra stuff in the connection string. All you need is something like
"Provider=VFPOL EDB.1;Data Source=C:\MyFol der\Test\;"

--
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 21 '07 #2

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

Similar topics

1
1569
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
0
1716
by: Adam Haskell | last post by:
Ok heres the situation: We have a linked server from SQL 2000 to a foxpro dbf. In our test enviroment we had the Foxpro and SQL server on the same machine. The linked worked perfect. Now we are ready to implement it. When we made a link to the real FoxPro dbf nothing is showing up in the tables. The FoxPro is on a seperate machine under another domain in active Directory. We have tried on the same Active Directory as well, not
13
13363
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
2722
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
3341
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
1124
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
1858
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
9595
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
10354
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10359
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
10101
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
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
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
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3005
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.