none
Accessing an ACCESS Database RRS feed

  • Question

  • Why, while using Access 2010, when I have written the following :-

     

     

    Dim ConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;DataSource=C:\Phiteq\Data\SRC\Students.accdb;"

    Dim Conn As New OleDbConnection(ConnectionString)

    At the line beginning Dim Conn, do I get the following error in the Immediate Window?

    Step into : Stepping over non-user code 'System.Data.OleDbConnection.OleDbConnection'

    I have the following at the head of my Form :-

    Imports

     

     

    System

    Imports

     

     

    System.Data

    Imports

     

     

    System.Data.OleDb

    • Moved by Cindy Meister MVP Tuesday, December 28, 2010 8:35 AM data connection, not VSTO (From:Visual Studio Tools for Office)
    Tuesday, December 28, 2010 2:07 AM

Answers

  • Thanks for the help. I have found the answer.

    It was to change "DataSource" to "Data Source" at the appropriate place in my connection string.

    What can I say! Probably, the less the better.

    Regards,

     


    Captain Baz
    • Marked as answer by Captain Baz Wednesday, January 5, 2011 2:22 AM
    Wednesday, January 5, 2011 2:22 AM

All replies

  • Does not look like you got an error in Immediate window. It is just a notification while you are debugging code. Do you get any real exception while running your code? If yes, can you post it here? 


    Val Mazur (MVP)

    http://www.xporttools.net

    Tuesday, December 28, 2010 11:24 AM
    Moderator
  • Yes I do!

    Strangely enough though, when coming back to this a day later, the message is changed to :-

    Step into:Stepping over method without symbols 'System.Data.OldeDbConnection.OleDbConnection'

    If I continue on, with the next line of code I reference OleDbDataAdapter and get the same message but referencing OleDbDataAdapter

    Then when I reference DataSet I get the same message but this time referencing DataSet eg: System.Data.DatSet.DataSet

    Then when I try to use the DataAdapter to fill my DataSet, I get 2 more messages the same  but with different references eg: 'Bid.ScopeEnter' & 'System.Data.Common.DbDataAdapter.FillSchema'

    then

    This message 3 times :-

    A first chance exception of type 'System.Data.OleDb.OleDbException' occured in System.Data.dll'

    Hope that all makes sense and gives you the inspiration needed to solve my problem!

     


    Captain Baz
    Wednesday, December 29, 2010 6:58 AM
  •  

    all of these looks like first chance exception which should not matter as long as you have a try-catch block in your code.

    you can safely ignore them.

    Do you get any error or exception while running the application other then the one you see in the immediate window?

     

     


    Snehadeep(MSFT) SQL Developer Team
    Tuesday, January 4, 2011 3:28 PM
  • See the below link for an explanation of first chance exceptions:

    http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx

    If you wish you can also debug first chance exceptions:

    http://blogs.msdn.com/b/davidklinems/archive/2005/07/18/440150.aspx

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Captain Baz Wednesday, January 5, 2011 2:14 AM
    • Unmarked as answer by Captain Baz Wednesday, January 5, 2011 2:14 AM
    • Marked as answer by Captain Baz Wednesday, January 5, 2011 2:16 AM
    • Unmarked as answer by Captain Baz Wednesday, January 5, 2011 2:16 AM
    Tuesday, January 4, 2011 4:00 PM
  • Thanks for the help. I have found the answer.

    It was to change "DataSource" to "Data Source" at the appropriate place in my connection string.

    What can I say! Probably, the less the better.

    Regards,

     


    Captain Baz
    • Marked as answer by Captain Baz Wednesday, January 5, 2011 2:22 AM
    Wednesday, January 5, 2011 2:22 AM
  • A bad connection string should generate an exception other than a "first chance exception" so I'm kind of surprised that you didn't see it.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, January 5, 2011 3:21 AM
  • I Agree with Paul.

    If connection string is incorrect it should throw a second chance exception.


    Snehadeep(MSFT) SQL Developer Team
    Friday, January 7, 2011 1:50 PM