如何使用C#更新Foxpro表 [英] How Do I Update A Foxpro Table Using C#

查看:126
本文介绍了如何使用C#更新Foxpro表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Foxpro表有2列:tablename和success。

1.表名列出了必须从sql server复制到文本文件并保存在本地的表的名称驱动。

2.成功是空的

如果操作成功,我想用OK更新Foxpro表格列'SUCCESS'。

如何在C#中执行此操作。我已经建立了与Foxpro和SQl的连接,并且能够扫描Foxpro表并显示表的名称。

解决方案

你的意思是你如何更新FoxPro表。如果SQL出现问题,请使用更新 [ ^ ]声明。例如:

 更新 FoxProTAbleName 
SET 成功= ' 确定'
WHERE TableNameColumn = ' TableName'



如果你坚持执行语句,如果你使用例如ODBC,你可以使用 OdbcCommand.ExecuteNonQuery [ ^ ]。请查看 OdbcCommand Class <中的示例。 a> [ ^ ]


访问这里...



http://msdn.microsoft.com/en-us/library/3haz2895%28v=vs.80%29 .aspx [ ^ ]

I have a Foxpro table that has 2 columns: tablename and success.
1. Tablename lists name of tables that have to be copied from a sql server to a text file and save on my local drive.
2. Success is empty
If the operation is successful, i would like to update the Foxpro table column 'SUCCESS' with OK.
How can i do this in C#. I have established the connections to Foxpro and SQl and am able to scan through the Foxpro table and display the name of the table.

解决方案

Do you mean how you update the FoxPro table. If SQL is the problem, you use UPDATE[^] statement. For example something like:

UPDATE FoxProTAbleName
SET Success = 'OK'
WHERE TableNameColumn = 'TableName'


If you're stuck on executing the statement, if you use for example ODBC, you can use OdbcCommand.ExecuteNonQuery[^]. Have a look at the example in OdbcCommand Class[^]


visit here...

http://msdn.microsoft.com/en-us/library/3haz2895%28v=vs.80%29.aspx[^]


这篇关于如何使用C#更新Foxpro表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆