tags:

views:

41

answers:

2

I want to write a winPE(vista) application that connects to a DB and just writes a row in a table saying it booted winPE.

Here is my problem. I only ever do .NET. I'm pretty familiar with OO concepts so I'm finally taking the plunge to unmanaged code. I assume I have to use visual studio's unmanaged c++ project type, but I don't know where to go from there; what header files do I need? Are there any I can leverage?

Are there any good tutorials for this type of thing?

+2  A: 

Personally, I use OLEDB for all my old data access, its the underlying system that drives the others while still being cross-DB, so it might not be as easy to use as ADO, but once you get the concepts, create the classes to hold the data rows, its really simple.

Here's some example code that should be useable almost as it is.

gbjbaanb
A: 

You can use ODBC or OleDB. ODBC is best for any database connectivity, as is an interface developed specifically for set oriented, database type of interaction. On the other hand OleDB can be used via ADO from C++ and that you might find very comfortable coming from ADO.Net (although there serious differences between ADO and ADO.Net).

The important thing to read is the SQL Server Native Client specifics for each interface including the SQL Server specifics for OleDB. these specifics include working with SQL 2008 datatypes (XML, geography and geospatial, hierachyid), using FILESTREAM types, using CLR types, working with table valued parameters and so on and so forth.

Remus Rusanu