Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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.
Posted
Comments
Jason Gleim 8-Aug-14 14:39pm    
Why the hell are you using this architecture? Why not just keep the table in SQL server or something way more simple like an XML file?

At any rate, we need to know how you are connecting to FoxPro. Are you using the ADO.NET OBDC datasource adapter or something else?

Please edit your question and provide that as well as what you have tried to do (I'm assuming you are making the changes then calling the Commit method???) so we know what doesn't work.

Do you mean how you update the FoxPro table. If SQL is the problem, you use UPDATE[^] statement. For example something like:
SQL
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[^]
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900