Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / December 2003

Tip: Looking for answers? Try searching our database.

possible to connect OdbcDataAdapter to 3rd party driver with VC++.NET Standard??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 24 Dec 2003 21:15 GMT
I am trying to learn .NET with the standard edition of
VC++.NET 2003 Standard edition. When I use the wizard in
the toolbox to connect to a non-microsoft ODBC data
source, I get the error message "It is only possible to
connect to SQL Server Desktop Engine databases and
Microsoft Access databases with this version of Visual
Studio".

I've seen several postings regarding this on Visual Basic
that say you can do this in VB if you don't use the wizard
and write the code by hand. Is that also true in C++? If
so, are there any examples of the correct code online?

Thanks...

Dave
Dave - 26 Dec 2003 02:17 GMT
Well it turned out it is trivially easy to get around this
issue if you have Microsoft Access:
1) Create a blank access database
2) In Access, use File/Get External Tables/Link Data. In
the dialog, select Files of type: ODBC Databases ()
3) Navigate to your non-Microsoft ODBC data source.
4) Exit from Access
5) In Control Panel/Administrative Tools/Data Sources
(ODBC) create an ODBC data source to your Access database.
6) In VC++.NET Windows Form Designer, drag the
OdbcDataAdapter onto your form. When the wizard runs,
enter your Access data source.
7) Go to your generated code in <formname>.h and find the
connection string. It will be a statement of the form:
this-><odbcConnectionName>->ConnectionString = S"<stuff to
connect to Access>". Change the string to connect to your
database.

I would assume a similar recepie will work for other .NET
languages as well.

HTH...

Dave
>-----Original Message-----
>I am trying to learn .NET with the standard edition of
[quoted text clipped - 14 lines]
>Dave
>.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.