在线:如何将DataTable中的数据写入到Access数据库中!
Dim datatable As New DataTable 建立的一个内存表。
如何把datatable 表中的数据,保存到ACCESS数据库。最好有例子和源码
用oledb的数据库连接对象和数据适配器等对象,例
string cnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " + "c:\\data.mdb";
OleDbConnection cn = new OleDbConnection(cnStr);
OleDbDataAdapter da = new OleDbDataAdapter("select * from 你的表名",cn);
//data.mdb中的表结构和你的datatable相同;
OleDbCommandBuilder cmb = new OleDbCommandBuilder(da);
da.Update(你的表);
http://topic.csdn.net/u/20090915/10/e93241bb-4aa0-4184-bdcd-6a589936a27f.html
http://topic.csdn.net/u/20090910/16/177fdb55-1cac-4765-b192-9f4f29762287.html
分数不多 大家可以去这两个贴里发帖 来着有份了 谢谢了你们!!
up!
相关问答:
IsSqlDataBase = 0 '主数据库类型(1=SQL,0=AC)
'===========================================================================
SqlDatabaseName = "ads365" '主数据库名
S ......
sql语句:
SELECT top 12 Forum.ID,Forum.topic,Reforum.id,Reforum.username,Reforum.posttime,Reforum.postip,Forum.username from Forum INNER JOIN Reforum ON Forum.ID = Reforum.topicid wher ......
_RecordsetPtr CMyAdo::SelectRecord(string &where, string &tablename,string &field, int way )
{
int ret = 0;
_RecordsetPtr pset;
CString sql;
& ......
如何在access数据库 表中插入一个新的字段?
类型为是/否
http://hi.baidu.com/ku_tong/blog/item/393fbe3469eece49241f146a.html
参考上面的
SQL语句能用的 就是类型不知道 false t ......