FoxPro ... ODBC ... Help !!
-
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
-
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
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