473,770 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to write portable database access code?

I can access Microsoft Access database via ODBC on Windows 2000 using
C++. Now, I would like to use the SAME piece of code to access MS SQL
on Windows. Can I achieve this without any modification to my existing
codes?
Then, I would like to use the SAME piece of codes to access Oracle
on Windows? Is it possible?
Thanks in advance!
Jul 20 '05 #1
1 2885
"nickel" <MG**@winbond.c om.tw> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
I can access Microsoft Access database via ODBC on Windows 2000 using
C++. Now, I would like to use the SAME piece of code to access MS SQL
on Windows. Can I achieve this without any modification to my existing
codes?
Then, I would like to use the SAME piece of codes to access Oracle
on Windows? Is it possible?
Thanks in advance!


The kludge approach would be to write three separate code
sections that are correspondingly executed upon determination
of the host db.

Pete Brown
Falls Creek
Oz

Jul 20 '05 #2

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

Similar topics

2
1835
by: nickel | last post by:
I can access Microsoft Access database via ODBC on windows 2000 using C++ . Now, I would like to use the SAME piece of code to access MS SQL on Windows. Can I achieve this without any modification to my existing codes? Then, I would like to use the SAME piece of codes to access Oracle on Windows? Is it possible? thanks in advance
5
2018
by: Henri Schomäcker | last post by:
Hi folks, I have a quite big class, which I want to use on UNIX-like systems and on win32. Until now, everything is absolutely portable. But now I need to read a directory and use the os dependent functions. So need to define and include different libraries and functions for both OS-types. How can I do this using e.g. compiler #define's that all compilers understand? And can I do this also inside of a function?
1
2150
by: webguynow | last post by:
I'm trying to build a good DB Layer on top of Pear::DB Are there any forums or knowledge base sites on this direct topic ? I've been using the documentation at: http://pear.php.net/package/DB/docs But since I'm not always online, is there a way I can download this ? Or if the documentation is derived from the classes, How can I build it?
6
9272
by: sambuela | last post by:
How can I write message to the file located in the wwwroot directory? It seems that IIS protect these files. Let make me cannot do the I/O writing sucessfully. I try to open file's write privileage by file manager and IIS manager. However, one PC is okay and another PC is not. Any help on this will be greatly appreciated. Regards, --sambuela
4
1939
by: marcmc | last post by:
Hi, I hope to create a XML file that will hold my Connection data to a SQL Db. I want to write an XML file from 4 Text Box named UserName, Password, Database & Server and later read from it. My XMLSchema elements are named dbLogin, dbPassword, dbDatabase & dbServer I receive a 'System.NullReferenceException Info: Object refernece not set to an instance of an object' on the following line of code: dtSettings = Settings.Tables("Settings")...
2
1493
by: Tull Clancey | last post by:
Hi all. I'm nearing completion of a host app that needs to send data to, and receive data back from a portable, an HP device. The application running on the portable will be a .net application. Basically I need to know the best practice, or most reliable way of sending and receiving data on a serial connection. In VB6/EVB I used to use the RAPI commands for sending data, until the 2003
6
1320
by: Timothy Madden | last post by:
Hello I have an application using an internal database (user doesn't know about it) and I would like to know if I can use some IBM product with a run-time that I could emmbed in my app and redistribute, to provide SQL access to database and possibly to let me create the database on first run (after my app is installed). All that without the user having to provide me an working instalation of a server. I would like just some lite...
0
1827
by: musosmiffy | last post by:
Hi, I have been trying to get the following working for days - I wonder if anyone could help me? I am trying to list a set of database entries as a newspaper column. I am using classic ASP (not NET). It would seem that things fail when the code gets to if DataArray(i,j) <> "" then The following code has been working great when connected to an Access database. I wish to swop the database to MySQL. I have proven that I am connecting OK...
36
2384
by: CK | last post by:
How do I write a set based query? I have a groupSets table with fields setId, idField, datasource, nameField, prefix, active Data: 1,someIDfield, someTable, someField, pre1, 1 2,someotherIDfield, someTable, someotherField, pre2, 1 3,somethirdIDfield, someTable, somethirdField, pre3, 1 4,somefourthIDfield, someotherTable, somefourthField, pre4, 1 I need to generate records in another table by constructing queries from the data in groups...
0
9617
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.