473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Connect to DB with Windows App

I am building a windows app, and need to connect to a Microsoft Access
Database. How might I go about doing this? I know sql if that helps any.
I am using Dev C++ and writing in C

Nov 13 '05 #1
3 1470
On Tue, 05 Oct 2004 17:10:24 -0400, "Victorb17" <vi*******@isp.com>
wrote:
I am building a windows app, and need to connect to a Microsoft Access
Database. How might I go about doing this? I know sql if that helps any.
I am using Dev C++ and writing in C

Hi
I have used ODBC. I know this is now deprecated by Microsoft, but so
is the Jet database which I take it is what you want to connect to.
The advantage of ODBC is that you can later swap easily to other dbs
including all the other free ones.
David

Nov 13 '05 #2
I'm not exactly sure how to do that either? if you could post some example
code that would be great. I'm still learning everything and any help is
much appriciated! Thanks!

Nov 13 '05 #3
On Wed, 06 Oct 2004 13:30:27 -0400, "Victorb17" <vi*******@isp.com>
wrote:
I'm not exactly sure how to do that either? if you could post some example
code that would be great. I'm still learning everything and any help is
much appriciated! Thanks!

Hi
Looking back I'm not sure what is the right advice. Originally we used
ODBC via MFC which was fairly straightforward, mainly connecting and
running SQL. Using via ODBC directly, which I did using lcc, is much
more fiddly and I see I only really used SQLExecDirect.

ADO is much less fiddly than ODBC but needs Microsoft
compilers/headers and won't be easy to get working with Dev-C++.

Some databases have their own C API, eg mySQL, which might be easier
to use. Also SQLLite I believe.

There are ODBC examples, on which I based my own code, in MSDN. See
particularly the SQLConnect Function and example, at

http://msdn.microsoft.com/library/de...sqlconnect.asp

the SQLExecDirect Function, and the SQLGetData function and example.
HTH
David
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kevin Sage | last post by:
For anyone who is having this problem and want to know the solution. Add this line of code before your connect method call. It loads up some config file that the code behind the scenes needs...
0
by: Jim | last post by:
I'm working on my first .net project using c#. I've been using activex controls embedded in a web page and wanted to do the same in ..net. My approach has been to create a windows control library...
5
by: Kona | last post by:
Hello, Is it right to tell that DB2 Connect has the same function that Oracle Net ? If I have an ODBC application is it also right to tell that I have 2 possibilities on my client workstation to...
1
by: PATSY | last post by:
For tests purpose, I have tried to install DB2 CONNECT V8.1 on a separate partition but on a same Windows 2000 Server as the one on which I had already installed DB2 WSE V8.1 + Fixpack 5 After...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
2
by: iwdu15 | last post by:
hey, i was wondering if 1) anyone could tell me whats wrong with my code, i did a little fixing to the msdn version fo this, or 2) how to make a simple program that will connect and listen for...
4
by: traceable1 | last post by:
I have a couple new servers - Windows 2003 R2 - with SQL Server 2000 SP4 installed. They are all Active/Active clustered instances (my first ones). I am trying to create database links to other...
1
by: Ben Hanson | last post by:
I've scoured Google searching for an answer that seems like it should be easy but apparently isn't...when I open SSMS to connect to a SQL 2005 database and choose Windows authentication, it greys...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.