CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    help with DSN less connection please

    I am trying to connect to my database using DSN less connection.
    My connection string is something like this

    cn.open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=false;Data Source=D:\new\Cms.mdb"



    when I execute this, it gives an error
    err.description = 'Data source Name not found. No default driver specified'
    err.source = 'OLEDB Provider'

    Why does it ask for dsn when I am trying dsn less connetion.

    Please help!


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: help with DSN less connection please

    Add this string after the provider part:

    Driver={Microsoft Access Driver (*.mdb)};




    it seems that ADO likes to be told exactly what driver to use when using Access.

    that should help.

    John

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured