Re: Connecting to a FoxPro DBF file

From: Veign (NOSPAMinveign_at_veign.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 10:53:03 -0500

Using a Function like:

Public Function FileExists(ByVal filespec As String) As Boolean
  On Error Resume Next
  FileExists = (GetAttr(filespec) And vbDirectory) = vbNormal
End Function

Does it pass back True on the FilePath variable on the clients machine?

-- 
Chris Hanscom - Microsoft MVP (VB)
http://www.veign.com
--
"Duncan" <ddimech@ads.com.mt> wrote in message
news:OpEbzRK0EHA.1652@TK2MSFTNGP11.phx.gbl...
> Dear All,
> I have designed a routine inVB 6 which opens the data from a FoxPro DBF
> file, does some manipulation and saves it in an SQL Database
>
> This work fine on the machine it was designed on but when it was installed
> on two oth machines it started to give the following error: -
>
> -2147217865 [Microsoft][ODBC Visual FoxPro Driver]File 'client.dbf' does
not
> exist.
>
> The connection string used is :-
> Set DBS_SB = New ADODB.Connection
> DBS_SB.Open "UID=;PWD=;SourceDB=" & FilePath &
> ";SourceType=DBF;Driver={Microsoft Visual FoxPro
> Driver};Exclusive=No;BackgroundFetch=Yes;Collate=Machine;"
> Set ADO_SB = New ADODB.Recordset
> ADO_SB.Open "select * from CLIENT", DBS_SB
>
> and the error appears when the recordset is opened
>
> and the file does exist and it is not corrupted
>
> Thanks and Regards
> Duncan
>
>


Relevant Pages

  • Re: Connecting to a FoxPro DBF file
    ... Public Function FileExists(ByVal filespec As String) As Boolean ... "Duncan" wrote in message ...
    (microsoft.public.vb.com)
  • Re: Connecting to a FoxPro DBF file
    ... Public Function FileExists(ByVal filespec As String) As Boolean ... "Duncan" wrote in message ...
    (microsoft.public.vb.general.discussion)
  • Re: Connecting to a FoxPro DBF file
    ... Public Function FileExists(ByVal filespec As String) As Boolean ... "Duncan" wrote in message ...
    (microsoft.public.vb.database)
  • Re: Connecting to a FoxPro DBF file
    ... Public Function FileExists(ByVal filespec As String) As Boolean ... "Duncan" wrote in message ...
    (microsoft.public.vb.database.ado)
  • Connecting to Sharepoint Problem
    ... String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& ... pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, ... pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& ...
    (microsoft.public.biztalk.general)