I am wanting to use an ODBC connection to play with. The connection exists and works as I can suck data into Excel using it. My suspicion is that the ODBC stuff in Beta 2 is incomplete...
I have a very simple working application - nothing more than a form, an empty treeview (which is what I want to populate!) and an 'Exit' button.
I have added these lines:
using namespace System::Data; using namespace System::Data::Odbc;
OdbcConnection^ tm422 =
gcnew OdbcConnection();And now when I compile I get a pile of errors------ Build started: Project: MyTreeView, Configuration: Debug Win32 ------
Compiling...
MyTreeView.cpp
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : error C3624: 'System::Transactions::Transaction': use of this type requires a reference to assembly 'System.Transactions'
while importing type 'System::Data::Common::DbConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : warning C4679: 'System::Data::Common::DbConnection::EnlistTransaction' : could not import member
while importing type 'System::Data::Common::DbConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : error C3624: 'System::EnterpriseServices::ITransaction': use of this type requires a reference to assembly 'System.EnterpriseServices'
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : warning C4679: 'System::Data::Odbc::OdbcConnection::EnlistDistributedTransaction' : could not import member
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : error C3624: 'System::Transactions::Transaction': use of this type requires a reference to assembly 'System.Transactions'
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
e:\my documents\visual studio\projects\mytreeview\mytreeview\Form1.h(37) : warning C4679: 'System::Data::Odbc::OdbcConnection::EnlistTransaction' : could not import member
while importing type 'System::Data::Odbc::OdbcConnection ' from assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Build log was saved at "file://e:\My Documents\Visual Studio\Projects\MyTreeView\MyTreeView\Debug\BuildLog.htm"
So - will the final released version include ODBC connectivity If it will be, is my supposition that it's missing from Beta 2 correct, or have I made dropped an obvious clanger
Thanks

Visual C++ Express Beta 2 & ODBC
st3ph3n
You're give C# sample, and how i may to do this in Managed C++ System::Transaction and System::EnterpriseServices don't help me...
prof.Scuba