Error in Fill Command

  • Thread starter Thread starter Temo Miranda via DotNetMonster.com
  • Start date Start date
T

Temo Miranda via DotNetMonster.com

Hello, i look in this forum and other to see if somebody else had the same
problem but no luck, so here is the question

I'm trying to connect to a DBC in VFP and i'm using oledb, the data is in a
server i'm creating a windows form, in the datasource of the connection i
put the path of the db as follows

string oCon = "Provider=VFPOLEDB.1;"
+ "Data Source=\\servername\\serverdisk\\folder_name\\
database_name.DBC;";
string oCmd2 = "Select * from table_in_database";

DataSet oDslista = new DataSet();
OleDbDataAdapter objDa2 = new OleDbDataAdapter(oCmd2, oCon);
objDa2.Fill(oDslista,"table_in_database");

at this point i got the following error = "Invalid Path or filename"

if i use the path after i map the server drive, i got another error, but
that one is different, it have something to do with the decimal values of
the data, also if you can share your toughts on how to fix it i'll
appreciated.

Here is the other error=
" The provider could not determine the decimal value"
"The row was just created, the default for the decimal column was not
available, and the consumer had not yet set a new decimal value"

I'm trying to switch from VFP to C#, in other words i'm a newbie in C#

Thank you
 
Back
Top