Advertisement
Advertisement
| 05.16.2008 at 06:45AM PDT, ID: 23408208 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: |
int recordsAffected = 0;
OpenFileDialog dlg = new OpenFileDialog();
//dlg.Filter = ".dbf";
if (dlg.ShowDialog() == DialogResult.OK)
{
string longfilename = dlg.FileName;
StringBuilder buffer = new StringBuilder(256);
GetShortPathName(longfilename, buffer, buffer.Capacity);
string shortfilename = buffer.ToString();
string fileName = shortfilename.Substring(0, shortfilename.Length - 4);
string filePath = System.IO.Path.GetDirectoryName(dlg.FileName);
string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Extended Properties=dBASE IV;User ID=Admin;Password=;";
OleDbConnection conn = new OleDbConnection(ConnectionString);
char c = (char)34;
OleDbCommand cmd = new OleDbCommand("UPDATE " + shortfilename + " SET ROUNDCODE = 'test' WHERE POSTCODE = 'WV1 1AA';", conn);
conn.Open();
recordsAffected = cmd.ExecuteNonQuery();
conn.Close();
MessageBox.Show(Convert.ToString(recordsAffected));
}
|