Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. FoxPro ... ODBC ... Help !!

FoxPro ... ODBC ... Help !!

Scheduled Pinned Locked Moved Database
helpdatabasedata-structuresdebugging
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fadee
    wrote on last edited by
    #1

    Yes I know Microsoft has provided provider for OleDB ... but still I must use ODBC to connect to a foxpro database file. The file is called clients.DBF The DSN created using Microsoft FoxPro VFP Driver (*.DBF). The DSN is called ClientDB. I am using following to connect to the ODBC source... ---------------------------------------- Dim c As New Odbc.OdbcConnection("BackgroundFetch=Yes;DSN=ClientDB;UID=;SourceType=DBF;Collate=Machine;SourceDB=c:\Inetpub\wwwroot\App\foxpro_files;Exclusive=No") ---------------------------------------- When I use this code in Windows Based application, it works fine. Connection is opened and my application can read the data. But when comes to Web Base application... it gives following error which is Way Beyond my intellect ... ------------------------------------------------------------ ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 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.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ----------------------------------------------------------- Can Anyone Help me ... Please ... I promise I won't mess with FoxPro again . Fadee !! ------------------- Therez No Place like ... 127.0.0.1

    F 1 Reply Last reply
    0
    • F fadee

      Yes I know Microsoft has provided provider for OleDB ... but still I must use ODBC to connect to a foxpro database file. The file is called clients.DBF The DSN created using Microsoft FoxPro VFP Driver (*.DBF). The DSN is called ClientDB. I am using following to connect to the ODBC source... ---------------------------------------- Dim c As New Odbc.OdbcConnection("BackgroundFetch=Yes;DSN=ClientDB;UID=;SourceType=DBF;Collate=Machine;SourceDB=c:\Inetpub\wwwroot\App\foxpro_files;Exclusive=No") ---------------------------------------- When I use this code in Windows Based application, it works fine. Connection is opened and my application can read the data. But when comes to Web Base application... it gives following error which is Way Beyond my intellect ... ------------------------------------------------------------ ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 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.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ----------------------------------------------------------- Can Anyone Help me ... Please ... I promise I won't mess with FoxPro again . Fadee !! ------------------- Therez No Place like ... 127.0.0.1

      F Offline
      F Offline
      fadee
      wrote on last edited by
      #2

      Hi... If one wants to access ODBC DataSource in ASP .NET, it must be "System DSN". Reason: ASP .NET WP is executed under separate limited right based user. If you will create the "User DSN", it would be fine for the windows based applications but not for ASP .NET as ASP .NET user (which is kind of passive) will not be able to access it. However, if you use "User DSN", it is accessible under Windows Application for the particular user for whom DSN is defined. fadee... ------------------- Therez No Place like ... 127.0.0.1

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups