- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
class WorkDBF
{
private OdbcConnection _connection = null;
public DataTable Execute(string command)
{
DataTable dt = null;
if (_connection != null)
{
try
{
_connection.Open();
dt = new DataTable();
System.Data.Odbc.OdbcCommand oCmd = _connection.CreateCommand();
oCmd.CommandText = command;
dt.Load(oCmd.ExecuteReader());
_connection.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
return dt;
}
public DataTable GetAll(string dbpath)
{
return Execute("SELECT * FROM " + dbpath);
}
public WorkDBF()
{
this._connection = new System.Data.Odbc.OdbcConnection();
_connection.ConnectionString = @"Driver={Microsoft dBase Driver (*.dbf)};" +
"SourceType=DBF;Exclusive=No;" +
"Collate=Machine;NULL=NO;DELETED=NO;" +
"BACKGROUNDFETCH=NO;";
}
}
guest 18.03.2014 20:34 # 0
guest 18.03.2014 20:35 # 0
bormand 04.04.2014 20:20 # 0
В DBF. Сколько можно насиловать труп...
TauSigma 07.04.2014 11:28 # 0
bormand 07.04.2014 11:36 # 0
guest 04.04.2014 18:47 # 0