ODBC, ADO or OLE DB [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What library for connecting C++ with SQL Server do you recommend.
I was searching and found this where is a disccussion about which is best ODBC, ADO or OLE DB?
In your opinion if I have Windows XP SP 2, SQL Server 2008, and VIsual Studio 2008, what works simple and right?.
Does anyone have a functional example, to test....

For SQL Server you probably want to use ADO.NET. There are a lot of goodies in the SqlClient namespace that you just don't get with any other data access technology. It is also very easy to connect to SQL Server datasources, handle errors etc.
The SqlClient namespace is SQL Server-specific though so if you have thoughts of making your app db-agnostic then you need to look at other options such as the Data.Common namespace which contains a nice factory model that allows you to write "provider independent" db access code.

They all work.
I'd default to the native client (system.data.sqlclient), since it's made specifically for SQL-Server, and probably has the most up-to-date / optimized / complete interface.
Here's some info from MSDN if it helps: http://msdn.microsoft.com/en-us/library/ms810810.aspx

Related

C++ - most popular framework for interacting with SQL? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am a computer science student and I want to do a personal project demonstrating some skills that I have learned. Recently I learned how to use SQL with PHP. Since PHP isn't as relevant as it once was, I was hoping someone could point me towards a more commonly used back-end tool where I still interact with my database through SQL queries. In my question, I specifically asked about a C++ framework since I am most comfortable with C++, but if there are much more common frameworks for what I'm looking for that use Java or Python, that would work as well.
Doing a quick google search gave me a very very large list of potential frameworks, so I was hoping someone with more knowledge in the field can point me towards one that employers would find the most relevant.
On a side note, I was also wondering if a framework is completely necessary, or if I can create my back-end just using native c++? If so, is this a valuable skill to look into?
Thanks for the help.
check out QT for the C++ GUI & MySQL for the backend...

read/write the excel file in c++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have to read/write the excel file in C++. I searched in net I found may library file which provides the functionality to parse the Excel sheet but those library are not opensource.
Can any one let me know the easiest way to read/write excel file in c++.
If you suggest and predefine library then it should be free of cost.
Several routes:
If you're parsing character separated value files, then you can use simple iostreaming.
Develop an XLL. Download the Excel SDK and go from there. The framework example in that SDK is pretty good.
Use the COM interface. For this you'll need something like Microsoft's ATL. Low level COM, though possible, is difficult.
Use Apache POI and a JNI / JNA layer to it.
(4) has the advantage that excel doesn't need to be installed so can run well server-side, but it will require Java. (3) is a learning curve if you haven't used COM in C++ before. Budget 6 months of mental fog.
In the absence of any more information, I'd plump for (2). The XLL interface is extremely good.

Is there any C++ library to work with WMI? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm working on a big project that have to poll remote WMI counter. I have to code a Win32 app in C++ to query WMI from remote Windows systems. So, Is there any C++ library (free or paid) help me to work with WMI ? Please help me.
Thanks so much :)
You can use the WMI Delphi Code Creator to generate C++ code to access the WMI (Windows Management Instrumentation) classes, events and methods.
AFAIK, there are no off the shelf libraries (think STL) for accessing WMI. You'll have to do it manually. There is a brief outline on MSDN as to what a program is expected to do in order to access these functions. There is also some example code related to the article here.

Open Source Qt projects deal with database connections [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a Qt application which heavily uses MySql Database. Do you know any open source Qt project which uses MySql? I wonder how did they manage database connections?
Comment to Harald Scheirich's Answer:
1-)QSqlDatabase::isOpen() doesn't work properly. http://bugreports.qt-project.org/browse/QTBUG-223
2-)Using QSqlDatabase::open() in order to check database connection when MySql connection is gone very time consuming in my case.
Use Google codesearch to search for QMYSQL.
Is there anything wrong with QDatabase ? We have a fairly large (non opensource) app that uses MySql together with the Qt provided drivers and the QSql infrastructure. It works fine with very little surprises.

C++ database communication library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking for a well designed, efficient and robust C++ cross-database and cross-platform database communication library.
I need support for
Oracle
MySQL
PostgreSQL
Firebird (optional)
MSSQL (optional)
When I say cross-platform I really mean cross-platform, I need something similar to boost.
Currently I'm researching soci, but
I'm not sure how portable and good this library is
I would like to have an alternatives.
Currently I'm using Qt, but I don't like using Qt only for database communication, while no other Qt features used. It's a temporary solution and I'm looking for a replacement.
What libraries do you use? What can you recommend? If you know any really good and portable Oracle communication library that's also acceptable, but cross-database is preferred.
Thanks.
Using: Progress DataDirect Connect® and Connect XE
Intresting options:
http://www.sqlapi.com/
http://www.thefreecountry.com/sourcecode/database.shtml
http://www.trumphurst.com/cpplibs/cpplibs.php
I've used Database Template Library to good effect with Oracle, MySQL, PostgreSQL and SQLite on Windows, Mac OS X and Linux.
I am using OTL (Oracle Template Library). Despite the name, it has backends for different databases and works in different platforms. It also very simple to use. Just add the header.
I also tried Soci, nothing wrong with that but I decided to go with OTL. It was simply easier to include it to my project.