Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
ADOX initialisation problem
Administrator
21y
1.3k
1
Reply
Anyone have an idea why the following code doesn't work It seems that the ADOXCatalog object is not initialised because I receive the following: <<<<<<<<
>>>>>>>>>> when trying to use the ADOXCatalog pointer on the last line of code !!!! //************************************************************** using System.Runtime.InteropServices; using ADODB; using ADOX; ADODB.Connection m_obj_ADODBConnection; ADOX.Catalog m_obj_ADOXCatalog; m_obj_ADODBConnection = new ADODB.Connection(); m_obj_ADODBConnection.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/toto.mdb", "Admin", null, 0); m_obj_ADOXCatalog = new ADOX.Catalog(); m_obj_ADOXCatalog.ActiveConnection = m_obj_ADODBConnection; ADOX.Table obj_ADOXTable; obj_ADOXTable = m_obj_ADOXCatalog.Tables["SomeTableName"]; // -> Object Reference not set to an instance of an object // ************************************************************** Any help is welcomed... Sylvain.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Excel Event Handlers
Adding new worksheet to existing Excel workbook