none
oledb connection corrupted RRS feed

  • Question

  • Hi,

    I´m using a connectionstring to access like this:

    Public accinio As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\..;Persist Security Info=False;")

    This throws the - " no instance of object, use the "new" keyword bla bla... "- error (we all know the one).

    This line of code has always worked, and the exact same line in another form is working! And it gets better. If I copy the line and put it in (with a different variable name) after the first line, the code halts - not on the first but the second line. If I put in a third line, the code halts on that line.

    Now, if I remove the third line, it again stops on the second line. And if I remove the second line, it stops on the first.

    So please, what do I do`?

    regards 

    Fabean

    Tuesday, December 1, 2015 2:12 PM

Answers

  • Hi again,

    I found the problem. There was some autogenerated code for a datetimepicker in the form that caused an error when loading the form.

    I don´t know what that had to do with access, but removing it took care of the problem.

    Thanks for your time.

    Fabean

    • Marked as answer by Fabean Tuesday, December 1, 2015 9:41 PM
    Tuesday, December 1, 2015 9:41 PM