🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TAccessApplication open database

#2649
From: Viatcheslav V. Vassiliev
Date: Mon, 05 May 2003 15:40
50 lines
2388 bytes
Try

AnsiString path = "G:\\projects\\Huurmanager\\cleandb\\huur.mdb";

Note double slashes. And why do not you use WideString?

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.


"OneEye" <m.kollau@home.nl> �������/�������� � �������� ���������:
news:3eb67b13@newsgroups.borland.com...
> Hi,
>
> I don't know if this is the correct forum to post.
> but is there anyone with some experience wit the TAccessApplication
object?
>
> I want to open and control MS Access from within my application.
> since there is no visual TAccessApplication object I have to create
> manually.
>
> the code compiles.
> when executed Access opens but then nothing happens. the db is not opened.
>
> code:
>
> Access = new TAccessApplication(Main); // Main is my main form
> Access->ConnectKind=ckRunningOrNew;
>
> Access->Connect();
> Access->set_Visible(true);
>
> AnsiString path = "G:\projects\Huurmanager\cleandb\huur.mdb";
>
> wchar_t wstr[100];
> path.WideChar(wstr,100); // convert AnsiString to wchar_t
>
> Access->OpenCurrentDatabase(wstr,false);
>
> thanks in advance for any comments.
>
> grtz,
> Maycel
>
>
Technical Details
Message-ID: <3eb6ac39$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!t-online.de!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3eb67b13@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,756a97b7c741e3f2
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-05-05 11:30:15 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3eb67b13@newsgroups.borland.com>
Subject: Re: TAccessApplication open database
Date: Mon, 5 May 2003 19:40:24 +0400
Lines: 52
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
NNTP-Posting-Host: 213.247.201.57
Message-ID: <3eb6ac39$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052159033 213.247.201.57 (5 May 2003 11:23:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!t-online.de!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail