S
smtwtfs007
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.vb
Line: 46
Stack Trace:
[OleDbException (0x80040e21): Invalid path or file name.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
WebApplication1.WebForm1.btnConnect_Click(Object sender, EventArgs
e) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:46
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1292
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.vb
Line: 46
Stack Trace:
[OleDbException (0x80040e21): Invalid path or file name.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
WebApplication1.WebForm1.btnConnect_Click(Object sender, EventArgs
e) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:46
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1292