连接数据库....
public static OleDbConnection con()
{
String myConnstring = @"provider=microsoft.jet.oledb.4.0;data source=my.mdb;Persist Security Info=True;Jet OLEDB:Database Password=456852;";
OleDbConnection MyConnection;
MyConnection = new OleDbConnection(myConnstring);
return MyConnection;
}
字符串转为数字
Convert.ToInt32(s);
数字转为字符串
int varInt = 1;
string varString = Convert.ToString(varInt);
string varString2 = varInt.ToString();