日期:2014-05-17 浏览次数:20437 次
[WebMethod("insert mdb 方法")]
public bool mdbinsert(string insertstr)
{
System.Data.DataSet myDataSet = null;
try
{
string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = E:/HMI/data.mdb";
OleDbConnection myConn = new OleDbConnection(strCon);
myConn.Open();
OleDbCommand myCommand = new OleDbCommand(InsertStr, myConn);
myCommand.ExecuteNonQuery();
myConn.Close();
return true;
}
catch (Exception ex)
{
return false;
}
}
[WebMethod("query mdb 方法")]
public DataSet mdbquery(string querystr,string tablestr)
{
System.Data.DataSet myDataSet = null;
try
{