Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing DBF tables from .Net
Message
De
16/11/2010 12:59:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Accessing DBF tables from .Net
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01489220
Message ID:
01489220
Vues:
112
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.


.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform