Accessing DBF FoxPro on Network

Discussion in 'ASP .Net' started by =?Utf-8?B?WWFtYQ==?=, Jan 30, 2004.

  1. Hi All

    I am trying to access a Fox Pro Free Table on the network as follow

    Dim cmd As New OdbcCommand
    Dim conn As OdbcConnection = New OdbcConnection("Driver={Microsoft Visual FoxPro Driver};" &
    "SourceType=DBF;" &
    "SourceDB=L:\my_mapped_folder_on_the_network_where_DBF_file_exists\;" &
    "Exclusive=No"
    If conn.State = ConnectionState.Closed Then conn.Open(
    cmd.CommandText = "select * from freetable
    cmd.CommandType = CommandType.Tex
    cmd.CommandTimeout = 120 '-- 2 minutes
    cmd.Connection = con
    conn.Open(
    Dim ds As DataSet = New DataSe
    Dim da As New OdbcDataAdapter(cmd
    Tr
    '--- Fill the DataSe
    da.Fill(ds
    Catch ex As Exceptio
    ' Close the connection when done with it
    If conn.State = ConnectionState.Open Then conn.Close(
    ErrorMessage = ex.Message 'In web.config Redirect to Error message pag
    Throw New Exceptio
    Finall
    cmd.Dispose(
    da.Dispose(
    ' Close the connection when done with it
    If conn.State = ConnectionState.Open Then conn.Close(
    End Tr

    However I get this error message
    ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'cashblk.dbf' does not exist

    If I copy the 'cashblk.dbf' and the 'cashblk.fpt' on one of local drives as
    Dim conn As OdbcConnection = New OdbcConnection("Driver={Microsoft Visual FoxPro Driver};" &
    "SourceType=DBF;" &
    "SourceDB=C:\my_drive_where_I_copied_the_free_table;" &
    "Exclusive=No"

    In works! BUT I really would like to know why it won't work if I use the network as well as why do I get the error message and finally how I can resolve it or work around it

    I will truly appreciate input on this topic

    Sincerely

    Yama Kamyar
    Sr. Microsoft .NET Consultant
     
    =?Utf-8?B?WWFtYQ==?=, Jan 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alex9128
    Replies:
    1
    Views:
    613
  2. JN
    Replies:
    0
    Views:
    3,201
  3. Jan Smazinka

    Visual FoxPro OleDB Driver in ASP.NET

    Jan Smazinka, Nov 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,013
    Jan Smazinka
    Nov 28, 2003
  4. Jan Smazinka

    FoxPro OleDb Problem on Windows 2003

    Jan Smazinka, Nov 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    493
    Jan Smazinka
    Nov 28, 2003
  5. Vijoy Varghese

    Reading dbf file over network possible?

    Vijoy Varghese, Nov 24, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    134
    Default@IO_Error_1011101.xyz
    Nov 24, 2003
Loading...

Share This Page