关于ADOX操作Access的疑问
请问:ADOX.CatalogClass cat=new ADOX.CatalogClass();cat.ActiveConnection接收对象类型可以使OleDbConnection麽?
--------------------编程问答-------------------- 为cat.ActiveConnetion指定OleDbConnection ,程序异常跳出:
System.InvalidCastException: Specified cast is not valid.
at System.StubHelpers.Inte易做图ceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags)
at ADOX.CatalogClass.set_ActiveConnection(Object pVal)
at myWin.dbToAccess.cueateMDBTbl(String tblname, ArrayList colnames) in d:\我的文档\SharpDevelop Projects\myWin\myWin\dbToAccess.cs:line 97 --------------------编程问答-------------------- 有木有人帮忙顶下? --------------------编程问答-------------------- ADOX.CatalogClass cat = new ADOX.CatalogClass();
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dbName + ";");
补充:.NET技术 , C#