Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing DBF tables from .Net
Message
From
16/11/2010 12:59:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Accessing DBF tables from .Net
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01489220
Message ID:
01489220
Views:
113
I'm using ADO.NET to query FoxPro tables. I'm trying to join two tables that are in different folders. Here is the query I'm trying to run.
SELECT fca.id_num AS [Id Number], 
       CAST(fca.sequence * 6 AS VARCHAR) + ' MONTH' AS [Description],
       fca.datesent AS [Sent To Cati], 
       fcm.fudate AS [Received From Cati]
  FROM \\MyServer\g$\filestosurveyunit\followup\followup_sent_to_cati_all AS fca 
  LEFT OUTER JOIN \\MyServer\g$\filesfromsurveyunit\followup\followup_from_cati_main AS fcm ON fca.id_num = fcm.ident
 WHERE fca.id_num = ?

I keep getting this error though.
System.InvalidOperationException: Fill: SelectCommand.Connection property has not been initialized.
   at System.Data.Common.DbDataAdapter.GetConnection3(DbDataAdapter adapter, IDbCommand command, String method)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at DataAccess.DBUtility.cls_soph_db_util.get_data_set(String str_select) in C:\Progs\Regards\RegardsDesktop\DataAccess\cls_soph_db_util.vb:line 688
   at DataAccess.DBUtility.clsParticipantInformation.GetDataSetByParticipantId(String strParticipantId, String strSQL, DataSet& dsData, enConnectionStringFolder oFolder, String& strErrMsg) in C:\Progs\Regards\RegardsDesktop\DataAccess\clsParticipantInformationDbOps.vb:line 411

The real pain is that the test system using UNCs while the production system uses mounted drives. So, while relative paths would work on the test system, they would not work on the production system.


.
Next
Reply
Map
View

Click here to load this message in the networking platform