How to create datasource in VC++ program?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to create datasource in VC++ program?

  1. #1
    Ramana Guest

    How to create datasource in VC++ program?




    Dear All,

    How to create Datasource , how to map to the perticuler database(.mdb file),
    this is thru writting code, not like thru the control panel.

    thank you
    ramana



  2. #2
    Randy Charles Morin Guest

    Re: How to create datasource in VC++ program?

    Here's an example of a DSN-less connection string.

    ADODB::_ConnectionPtr connection(__uuidof( ADODB::Connection));
    connection->Open(L"driver={SQL
    Server};server=servername;database=databasename;"
    L"UID=userid;PWD=password", L"", L"", ADODB::adConnectUnspecified);
    --
    Randy Charles Morin
    Author of Programming Windows Services
    http://www.kbcafe.com

    Feel free to contact me by private email or messenger
    MSN Messenger - morin_randy@hotmail.com
    Yahoo Messenger - randymorin@yahoo.com

    "Ramana" <gvramana@uk2.net> wrote in message
    news:3b36c1b9$1@news.devx.com...
    >
    >
    >
    > Dear All,
    >
    > How to create Datasource , how to map to the perticuler database(.mdb

    file),
    > this is thru writting code, not like thru the control panel.
    >
    > thank you
    > ramana
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center