ODBC, OLE DB, ADO, DAO - which one should I use?

Could someone please recommend one of the above for an MFC app?
The app will mostly access a SQL Server database.  There will also be some 
[very limited] interaction with a MySQL database on a Linux box.
In addition to the stand-alone MFC app I will also have to write a Web app 
(most likely C#/ADO.NET).  Ideally I would like to use APIs that are 
somewhat similar for both the stand-alone app and the Web app.

I think that DAO would not be a good idea but what about the rest?

I'd appreciate any suggestions.

Thanks,
Bogdan


0
nobody2044 (52)
6/8/2006 2:59:31 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
535 Views

Similar Articles

[PageSpeed] 52

I think there are some issues with ODBC & SQLServer and I think Microsoft is 
saying not to use it. ADO\OLEDB is the way to go, don't know if your aware 
but ADO is just a high level wrapper around OLEDB. Unless you are real 
familiar with COM I would use ADO instead of raw OLEDB, it can get quite 
ugly.

"Bogdan" <nobody@nospam.com> wrote in message 
news:%23mculvwiGHA.5036@TK2MSFTNGP04.phx.gbl...
> Could someone please recommend one of the above for an MFC app?
> The app will mostly access a SQL Server database.  There will also be some 
> [very limited] interaction with a MySQL database on a Linux box.
> In addition to the stand-alone MFC app I will also have to write a Web app 
> (most likely C#/ADO.NET).  Ideally I would like to use APIs that are 
> somewhat similar for both the stand-alone app and the Web app.
>
> I think that DAO would not be a good idea but what about the rest?
>
> I'd appreciate any suggestions.
>
> Thanks,
> Bogdan
>
> 


0
junk2845 (48)
6/8/2006 3:10:24 PM
Kurt wrote:
> I think there are some issues with ODBC & SQLServer and I think Microsoft is
> saying not to use it.

I use ODBC with SQL Server 7 and have no problems. I find ODBC really
useful for development as I can shift back-end database very easily
from Access on my PC (development) to SQL Server across the WAN (live).

HTH

Paul.

0
paul.ganney1 (118)
6/9/2006 8:45:27 AM
Hello!

On Thu, 8 Jun 2006 10:59:31 -0400, Bogdan wrote:

> Could someone please recommend one of the above for an MFC app?
> The app will mostly access a SQL Server database.  There will also be some 
> [very limited] interaction with a MySQL database on a Linux box.
> In addition to the stand-alone MFC app I will also have to write a Web app 
> (most likely C#/ADO.NET).  Ideally I would like to use APIs that are 
> somewhat similar for both the stand-alone app and the Web app.
> 
I use ADO using Mr. Carlos Antollini's classes CADODatabase et al.
http://www.codeproject.com/database/caaadoclass1.asp
http://www.codeproject.com/database/caaadoxclass.asp
http://www.codeproject.com/database/connectionstrings.asp

One thing that you need to be aware of is that all Microsofts database
"drivers" are global for the computer and there may only be one MDAC
version!!!

Since the MDAC version ISN'T 100% backwords compatible, I repeat this.
Since the MDAC version ISN'T 100% backwords compatible you need to have the
same MDAC version on the computer that compiles the program and the
computer that runs the program!

So unless you find a bug in your program that has to do with the MDAC
version I would reccommend that you don't upgrade the MDAC version from the
version that is on a new Windows installation.

If you upgrade your compilation computer then you MUST install this MDAC
version when you install your program

The above info is valid for all (except ADO.NET) Windows database handling,
ODBC, ADO, OLE DB


// Anders
-- 
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may learn better English!
0
andis59 (75)
6/9/2006 10:47:05 AM
Reply:

Similar Artilces:

transfer one stock to another broker account
How do I transfer only one stock from one broker's account to another broker's account ?? All I can find is directions to transfer ALL the stocks in one account to another account. Have Money 2003 Deluxe, Version 11.0 Thanks In microsoft.public.money, Karl S wrote: >How do I transfer only one stock from one broker's account >to another broker's account ?? All I can find is >directions to transfer ALL the stocks in one account to >another account. Have Money 2003 Deluxe, Version 11.0 Enter a TransferOut transaction for the stock in the investment acc...

Only one customer in letter writing assistant
Great Plains version 8 - When I run the letter writing assistant to create a Collection Letter or a Customer Letter and I select All customers and All customer types I only get one customer in the customer list to choose from. It doesn't matter what letter I am trying to create I only get one customer to pick from. Does anyone know what I need to do to get all my customers to show up? This is normal behavior if you are launching the letter assistant from the customer maintenance window. Launch it from the reports menu to perform mass mailings. I have tried launching the letter ...

Using IM to upload Sales Territory?
I am trying to update the sales territory table in GP 9.0. I've looked at the Integration manager (IM) and couldn't figure how to do it. There is no destination within IM that points to the Sales Territory master file. I've have setup uploads using IM before for SOP, Journals, AP before. Thanks You could do a table import for that. Set up a csv file with your territory information. It should not have a header row. Open up your Sales Territory Maintenance card then click Tools>Integrate>Table Import then select the Sales Territory Master File. Map the fields and...

using info on cd instead of hard drive
I am uncomfortable keeping my MS$ info on my hard drive. I don't have any account #'s entered, and I do use a firewall & a/v updated, etc., but I'm a paranoiac I guess. Is it possible each time I run my MS Money 2004, to use/add to all the data from the backup CD instead of having it stored on my hard drive? If so, how would I do it? Just insert the CD and then enter/update my info and then backup to the same CD-RW? Thanks for any suggestions. I am not technologically advanced, so any help in layperson's simple babysteps would be most appreciated. In microsof...

nOOb Using Excel for cd/dvd database
ok well i guess im not really a n00b but i havent used excel in a long time, since college(6years ago) what im attepting to do is build a database of all my movies and music so i can keep track of it all, also handy for insurance i guess, just wondered what others have done in this regard and what tips you might have for me, as i havnt used excel in ages im not really sure what my limitations are using thisand ive forgotten alot of my vba and formula skills lol, as it stands i have a work book with 4 or 5 worksheets eg 1 for music, 1 for films ...tv shows etc and the cell contain title...

FORMULA USING MASTER QTY
have a 12 month period where i enter a master qty per month not to exceed 6 (ie 1.3 = 9 units) how do i sum the period and have excel calculate the formula. ns what would that formula be? todd, I don't know about anyone else but I don't follow what it is you are asking. Can you give more details and possibly a (text) example. -- Regards Sandy sandymann@mailinator.com Replace@mailinator with @tiscali.co.uk "todd" <todd@discussions.microsoft.com> wrote in message news:A1450E1A-1C25-48EA-A125-45AA529222C0@microsoft.com... > have a 12 month period where i enter...

Publisher 2003 websites problem when uploaded using Frontpage 2003
I work for a special school in the uk, we have a school website created and maintained using frontpage 2003. We have the children produce simple webpages using publisher 2003, these are then saved as an htm webpage, producing an .htm file and a folder containing images. When I try to upload these pages to our website using Frontpage we get the text but all the images are missing - Front page can not see the folders and does not FTP them, only the .htm files. Can any one help? AdamS wrote: > When I try to upload these pages to our website using Frontpage we get the > text but all...

Password different using RetrieveGlobals
Hi, I'm experiencing a weird problem when using RetrieveGlobals. The connection string from retrieveuserinfo is showing totally different password from what I used to login so I can't the connection to run any queries. The only account in which the password match is for "sa" account but not if I login using any other valid accounts. Have anyone experienced this issue and/or know a solution? TIA John. ------=_NextPart_0001_0D6BE0B7 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi John I am assuming that you are using Retrieveglobals.dll with Great Plai...

ODBC #3
How do I get ODBC set up as an add-in for Excel 2003? I'm confused by your question. What exactly are you trying to accomplish? Randall Arnold "Lynn" wrote: > How do I get ODBC set up as an add-in for Excel 2003? Ok, I think I get your question now. The ODBC Add-in, as far as I can tell, was for Excel 2002. I'm guessing the functionality was rolled into the 2003 version. You can now link to an ODBC data table by selecting Data>Import External Data. Randall Arnold "Lynn" wrote: > How do I get ODBC set up as an add-in for Excel 2003? That didn&...

display sums from multiple worksheets on one worksheet
I am working on a budget plan. So I have multiple totals from various months that I would like to display on one "totals" page so i can track each month. for example, I have the totals from bikes, cars, and transit on the november worksheet. on the "totals" page I have the totals from bikes, cars, and transit for every month of the year. i kept the names consistent from each page hoping that would simplify things. so far it has not. is there a way to display the totals from each month on the "totals" without having to type a similar formula in eac...

Lost folders in hotmail after using Outlook Connector
I downloaded outlook connector and all of my hotmail items transferred to my outlook fine. However, I just noticed that all of my folders from hotmail were also synched to outlook, and have disappeared from hotmail. I still have the emails in my outlook (2007), however I really need to synch the emails back into my hotmail account - as there are folders on there that I cannot lose so that's why I stick with hotmail - to have web-based storage for these emails should something ever happen to my laptop. How can I get these folders to appear back into my hotmail account? I p...

using check boxes in excel
how do i simplfy size and centering of check boxes on multiple columns? Hi Tommy, Something like this may get you going. Used macro recorder and then tweaked the code. Sub BoxesAway() Dim i As Integer Dim j As Integer Dim k As Integer j = 1.5 k = 1 For i = 1 To 5 ActiveSheet.CheckBoxes.Add(j, 10.25, 24, 17.25).Select Selection.ShapeRange.ScaleWidth 1.91, msoFalse, msoScaleFromTopLeft Selection.Characters.Text = "Howard" & k j = j + 48 k = k + 1 Next Range("A1").Select End Sub HTH Regards, Howard "Tommy" <anonymous@discussions.micr...

Example of use WM_PRINTCLIENT and getting bitmap from invisible wnd
Hi, I had take a look to other post about this argoument, but I can't bitBlit ( or something similar ) the content of a window into another when the first is partially or completly invisible. I've succesfully grab the WM_PRINTCLIENT message in this way: ........... //{{AFX_MSG(CTest_Dlg) virtual BOOL OnInitDialog(); afx_msg LRESULT OnPrintClient(WPARAM wParam,LPARAM lParam); DECLARE_EVENTSINK_MAP() //}}AFX_MSG ................. .......... LRESULT CTest_Dlg::OnPrintClient(WPARAM wParam,LPARAM lParam) { HDC const hDC =(HDC) wParam; CDC *const pDC = CDC::FromH...

Using Bound Form and controls to inquire and update with other requirements
Most of the stuff I have done in Access mainly dealt with unbound forms due to the fact that I have issues with how error checking is done. It's been a long while since I have worked with Access and now having to get back into it, but only this time with bound forms and controls. I am still needing to use my custom error checking code to get around the fact that without such code, when doing data validation on individual controls (when moving from one control to another) as opposed to doing data validation on the whole form (moving from one record to another record), data validati...

One IP-address
Our exchange 2003-server hosts two domains A.com and B.com. So, the mx-record for BOTH domains point to the same host (mailhost.A.com) and resolves the corresponding IP-addres. The PTR-record for this IP-address obviously points back to the host mailhost.A.com. All seems to work fine for both domains for the moment, but will this not present a problem in the future for mail from the B.com domain when more and more receiving hosts do reverse lookup ? Or is reverse lookup just verifying the FQDN in the mail-header, and not the senders domain ? Regards Rudy Steyaert HI, NO i don't think ...

Update one Worksheet from Another
Hi, I want to be able to update a worksheet by looking up data from another worksheet. in other words; If Servername in Worksheet A column A equals Servername in Worksheet B Column C then copy serial number from Worksheet B column D to Worksheet A column D. Thanks in advance for any help. OldDog Hi you can use the VLOOKUP function to achieve this. in Worksheet A column D type =VLOOKUP(A1,WorksheetB!$C$1:$D$1000,2,0) this will return the information from column D of Worksheet B where there is an exact match between the data in column A of the current sheet and column C of worksheet B....

Use of Parntheses in Expressions
Hello, I am fairly new to Access and Excel. I am trying to write a formula/expression, but I think my problem is as simple as having the parenthese in the wrong place. The formula I have currently is as follows: Sum(((IIf([Mapping]![Pricing]="CPM",[TPImpressions]/1000*[Mapping]![Price],IIf([Mapping]![Pricing]="CPC",[TPClicks]*[Mapping]![Price],[TPConv]*[Mapping]![Price]))))*[Mapping]![Eye Engage Cost]))))) I basically want the SUM(IF part to be evaluated first and then multiply the result by [Mapping]![Eye Engage Cost] at the end. Currently, the formula abo...

Printing just one page?
I would like to print just one page in my publication, at times. When I hit file, print, I do not have a print option. Print merge, print preview are all that is available. Can anyone help? Please?? What version Publisher? When you are ready to print one page, there should be check off for "current page". Are you expanding the File menu? Right-click any toolbar (Publisher 2002), customize, toolbars tab, check *Always show full menus." What happens if you ctrl+p or click the print icon on the toolbar? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msau...

Display Bitmap using GDI+
Hi all, I have a MDI application in which I want to display bitmap in view ( Base class is CScrollView) with Scroll bar using GDI+, later I want to mark some part of the image. So plz tell me how I can draw a bitmap with Scroll bar. Thanks and Regards Rinu Use GetScrollCtrl to get scrollbar window and subclass window to intercepting message. in intercepted handler, process WM_PAINT with drawing bitmap image.. -- WebSite : Realization of Dream { imagine your dream} - http://rodream.net WebMail : rodream@naver.com "Rinu Gopalakrishna Pillai" wrote: > Hi all, ...

how to use ado to check a field is nullallowable(SQL Server)?
I use ado to operate a database in SQLServer 2k.On the occasion that addnew NULL value to a field not nullallowable, an exception will be thrown.So I need to check whether the field is nullallowable or not before addnew. my question is how to check a field is nullallowable. thanks! best regards, kywoo Get the Field object, check its attribute by (Field::GetAttributes or maybe Field::get_Attributes) the attribute "adFldIsNullable" is what you want. "kywoo" <kywoo@tongji.edu.cn> wrote in message news:%23bcHqYvhDHA.2512@TK2MSFTNGP09.phx.gbl... > I use ado to opera...

GP9 ODBC connections
Hi, I need setup a client connection from GP9 to SQL2005. I created a user login and granted database permission. My question is that. Do I need create ODBC connection by using sa password for that user? Thanks If you created the user through GP, then you definitely need to use the 'sa' user to create the ODBC connection. But, be mindful that you're not saving the 'sa' information in the ODBC connection; you're only using it to create it. -- Charles Allen, MVP "mecn" wrote: > Hi, > > I need setup a client connection from GP9 to SQL200...

is there a template to use pc as cash register
i am just trying to figure it all out and cant seem to get it to do it properly so i was hoping someone already worked out all the bugs and have a template ...

Getting 552 Requested mail action aborted: (from one user on Hotmail)
I have a home user that is using a Hotmail account to communicate with our company. She can email us perfectly fine when she composes a new message...however, when she attempts to reply to a message sent from us, she is getting back and undeliverable message as follows: name@domain.com SMTP error from remote mailer after end of data: host mail.domain.com [xx.x.xxx.xx]: 552 Requested mail action aborted: exceeded storage allocation She gets this message even with no attachements. The host domain name and IP address are both correct as well as the email address (obviously since...

Use the correction package
--jbughcysxtlv Content-Type: multipart/related; boundary="euikrxuqdlkz"; type="multipart/alternative" --euikrxuqdlkz Content-Type: multipart/alternative; boundary="filxxywwowb" --filxxywwowb Content-Type: text/plain Content-Transfer-Encoding: quoted-printable MS Consumer this is the latest version of security update, the "September 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to help maintain the security of your computer from these v...

How do i select different cells to be use in a formula.
Hi I need to know how to select different cells to be used in a formula, but i don't know what is the separator that i need to use to this, see the example bellow Cells that i need to include on my formula: A1 C5 BH32 Thanks. Hi you didn't mention what formula but here's a starting point: =AVERAGE(A1,C5,BH32) or depending on your regional settings =AVERAGE(A1;C5;BH32) hope this helps Cheers JulieD "Manuel" <Manuel@discussions.microsoft.com> wrote in message news:A855A562-725C-4B10-B111-A88F7A767122@microsoft.com... > Hi > > I need to know ho...