locked
DSN connection RRS feed

  • Question

  • Hi,

    I am working on a project and i am stuck in between. I have just started vb.net coding...

    The project was prepared by somebody who have left the team and i am trying to finish the project. The front end is in VB.net and there is a code written for connecting to the database (mentioned below).

    cn = New ADODB.Connection
    cn.Open("dsn=USERS;userid=;pwd=;")

    This is not working !  Is something missing in the code or i have a to create a database?

    I know how to connect MS access as a back end. ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb)... Can i use DSN method to connect to an MS access database.

    please advise
    Thx!

     


    Wednesday, July 8, 2009 9:17 AM

Answers

  • Don't use a DSN for a Microsoft Access database. It uses the old Microsoft Access ODBC driver which isn't as stable as the Jet or ACE OLEDB providers. It also does not support some of the features present in newer versions of Access. 
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Bossvb Thursday, July 9, 2009 12:53 PM
    Wednesday, July 8, 2009 4:47 PM
  • This link should provide everything you need to know about connection strings:

    http://www.connectionstrings.com/

    Hope this helps.


    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Bossvb Thursday, July 9, 2009 12:53 PM
    Wednesday, July 8, 2009 3:54 PM

All replies

  • This link should provide everything you need to know about connection strings:

    http://www.connectionstrings.com/

    Hope this helps.


    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Bossvb Thursday, July 9, 2009 12:53 PM
    Wednesday, July 8, 2009 3:54 PM
  • Don't use a DSN for a Microsoft Access database. It uses the old Microsoft Access ODBC driver which isn't as stable as the Jet or ACE OLEDB providers. It also does not support some of the features present in newer versions of Access. 
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Bossvb Thursday, July 9, 2009 12:53 PM
    Wednesday, July 8, 2009 4:47 PM