Problem trying to update dbf table using VFPOLEDB.1 Provider

F

fig000

Hi,

I am new to using dbf files with .net. I have created a small
program using visual web developer 2008. I am able to read a table
using the oledb provider but if I try an update I get the famous
cryptic "One or more errors occurred during processing of command"
error.By the way I'm running vista home premium. The field (subtotal)
I'm trying to update is type "N".

It's been a while since I've used dbf tables so I apologize if any
of my assumptions are stupid. I tried making "77.0" just "77" and a
few other things. I downloaded Microsoft OLE DB Provider for Visual
FoxPro 9.0 by the way.


Here is the code; the error occurs on te executenonquery:

Try


Dim cn1 As New OleDbConnection( _
"Provider=VFPOLEDB.1;Data Source=C:\Users\Public;")
cn1.Open()


Dim cmd1 As New OleDbCommand( _
"Update OE Set SUBTOTAL = 77.0", cn1)
cmd1.ExecuteNonQuery()


Catch e As Exception
MsgBox(e.ToString())
End Try


Any help would be appreciated.

Thanks,
fig000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top