Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update a vfp numeric field
Message
From
13/01/2004 17:42:21
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Update a vfp numeric field
Miscellaneous
Thread ID:
00866525
Message ID:
00866525
Views:
62
Hello everyone,

I am trying to update a field in a vfp table buy I get the following error :
Data Type mismatch
The visual foxpro field called wsc001 is numeric(numeric,10,0) type.

Here is the c# code:
int nBPC = 4;
string strUpdateSelect  = "UPDATE policy SET wsc001 = '" + nBPC +" '   "+
	                "WHERE policy.controlnum ==  '"+ controlNumber +"' ";
		
//*-- Create a command object with the update select
OleDbCommand  VFP7UpdateCommand = new OleDbCommandstrUpdateSelect,VFPConnection);
// Execute the command
VFP7UpdateCommand.ExecuteNonQuery();
//Close the connection
VFPConnection.Close();
I think the problem is with the string strUpdateSelect.
The update will work if I update a vfp character field, but I can not get it to work for a numeric field.

Any help is appreciated.

Thanks,
Sergio
Next
Reply
Map
View

Click here to load this message in the networking platform