开发者

delete records in foxpro 2.x using oledb connection

hi there first of all im completed excited to use for first time this incredible forum

my question is, if somebody knows how to physically delete a Fox pro 2.x record from C#.net using an OleDb connection, because i used a simple and standard delete sql state开发者_如何学编程ment like 'delete from table where condition' and the compiler throws me an exception that i have a sintax error.

p.s. im mexican so please be considered about my english, im not pretty good at all.


Could you show the code you used? As the simple delete from table where condition should indeed work just fine.

Did you use a DBCommand with .ExecuteNonQuery() ?

In general the pattern is basically this...

    IDbConnection c = GetYourConnectionOrNewOneUp();
    using (IDbCommand cmd = c.CreateCommand())
    {
      cmd.CommandText = "delete from yourtable where yourfield = 'value'";
      cmd.ExecuteNonQuery();
    } 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜