🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5061

Please Help Me

#5061
From: Ahmet OZTURK
Date: Fri, 10 Aug 2001 14:09
36 lines
1785 bytes
Hi All,

I am writing COM object to MTS in BCB 5.0. I would like to connect to MySQL
database via ADO. but until now I could not get any success.

My Connection Code is like this where iste problem???

    wchar_t *ConStr(
                L"Driver={MySQL};"
                L"Server=212.175.216.112;"
                L"Option=16834;"
                L"Database=santral;"
                L"Uid=xxxx;"
                L"Pwd=yyyyyy" );
    CoInitialize(NULL) ;
    _ConnectionPtr pConnection;
    try
    {
        pConnection.CreateInstance(__uuidof( Connection ));
        pConnection->Open( ConStr, L"", L"", adOpenUnspecified );
    }
    catch( Exception &e )
    {
        ShowMessage( e.Message );
    }
    CoUninitialize();

in code there is no any error. code is compiling. while connecting it gives
exception error EAccessViolation Error.

Please Help ME??


Thanks Alll

Ahmet OZTURK
Technical Details
Message-ID: <3b73eab3$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,ab0fe9ce34090fea,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-08-10 07:16:32 PST
From: "Ahmet OZTURK" <ozturk@sim.com.tr>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Please Help Me
Date: Fri, 10 Aug 2001 17:09:48 +0300
Lines: 38
Organization: Internet
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 212.175.216.90
Message-ID: <3b73eab3$1_1@dnews>
X-Trace: dnews 997452467 212.175.216.90 (10 Aug 2001 07:07:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews