🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.os.ms-windows.programmation
Article #11

ADO visual c++ error connection string

#11
From: Dennis Charest
Date: Thu, 13 Feb 2003 16:19
41 lines
2183 bytes
Bonjour,

J'utilise ADO sous visual c++ pour me connection � une BDD Access.

Quand je cr�� un nouveau projet MFC, le petit code basique que je prends
pour me connecter et lire une table fonctionne sans probl�me.

Par contre quand je veux l'int�grer � un programme existant, le m�me petit
code que je duplique b�tement par un copier coller me fait planter mon
application :

_ConnectionPtr bdd;
 bdd.CreateInstance(__uuidof(Connection));

bdd->ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;"
          "Data Source=C:\\numexco\\BDLEX.mdb;"
          "User Id=Admin; Password=;";                                    //
PLANTE ICI

Lorsque j'essaie d'afficher les erreurs

try{

}
catch (_com_error& e1)
{
    try {
         err = bdd->GetDescription();            // lance une exception
    }
    catch (_com_error& e2)
    {
         MessageBox(e2.Description());        // 2
    }
}

La chaine affich�e par e2 est vide.

Quelqu'un voit-il d'o� vient l'erreur ou alors y-a-t il une autre fa�on de
savoir de quel type d'erreur il s'agit ?

Merci !!!!!!!!!
Technical Details
Message-ID: <ZzP2a.37322$LR3.2796796@charlie.risq.qc.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: ffbfc,b6d9b846dd1833a0,start
X-Google-Attributes: gidffbfc,public
X-Google-Thread: 1053e6,b6d9b846dd1833a0,start
X-Google-Attributes: gid1053e6,public
X-Google-ArrivalTime: 2003-02-13 08:19:19 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail
From: "Dennis Charest" <C12088@internet.uqam.ca>
Newsgroups: fr.comp.os.ms-windows.programmation,fr.comp.applications.sgbd
Subject: ADO visual c++ error connection string
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <ZzP2a.37322$LR3.2796796@charlie.risq.qc.ca>
Date: Thu, 13 Feb 2003 16:19:05 GMT
NNTP-Posting-Host: 132.208.28.229
X-Complaints-To: abuse@uqam.ca
X-Trace: charlie.risq.qc.ca 1045153145 132.208.28.229 (Thu, 13 Feb 2003 11:19:05 EST)
NNTP-Posting-Date: Thu, 13 Feb 2003 11:19:05 EST