解决方案 »
- Windows的端口
- 如何在没有VC#的环境下 运行可执行程序
- installshield 12软件打包问题
- 求控件名
- 遍历xml文件时 报错“ 未将对象引用设置到对象的实例”
- 高分求思路.请高手进来讨论
- 来问一个多线程的问题???多谢,,100 分,马上揭贴
- 程序编译没问题,可是测试时跳出 未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 system.data.dll 中 是什么意思 ?大
- 运行后,点击按钮,为何没有输出?
- DataGridView分页后排序的问题
- C# 怎么接收 Evc 用SendMessage发过来的信息
- Winform怎么实现word中的字体样式和大小的改变
继续问题这是我的代码
SQLiteConnection SqlCon;
int MaxValue = 0;
string ConStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + @"\SpiderResult.db3";
SqlCon = new SQLiteConnection(ConStr);
SqlCon = new SQLiteConnection(ConStr);
string dataSource = "'Data Source=" + Application.StartupPath + @"\S1.db3'";
using (SQLiteCommand command =
new SQLiteCommand("insert into newTable Select * From OpenDataSource('Microsoft.Jet.OLEDB.4.0',"+dataSource+").S1.dbo.Content", SqlCon))
{
SqlCon.Open();
command.ExecuteNonQuery();
SqlCon.Close();
} }调试有点问题。在GG上面搜,insert into tablename
SELECT * FROM
OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.18.252;User ID=sa;Password=test').pubs.dbo.authors'Data Source都是以ip形式存在所以不知道怎么弄了。。
SELECT *
INTO newtable
FROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\uploads\DB.mdb";User ID=Admin;Password=')
要不然也不知道SQLite是否支持访问另一数据库