BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using ADO to connect to Outlook/Exchange

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
MOJO
Guest





PostPosted: Thu Jul 21, 2005 5:38 am    Post subject: Using ADO to connect to Outlook/Exchange Reply with quote



Hi all,

I'm using Borland Delphi 5 Build 5.62 and I'm having trouble viewing data in
my dbgrid.
I can see the column names, but the data is blank. I have rechecked that I
have the folder name is
correct and there is mail in that folder by simply going into Outlook.

Below is my code.

procedure TForm1.Button8Click(Sender: TObject);
var connstr:string;
i:integer;
sl : TStrings;
begin
connstr := 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'+
'EXCHANGE 4.0;'+
'MAPILEVEL=;'+
'DATABASE=C:Temp;';

ADOConnection1.ConnectionString := connstr;
ADOConnection1.Connected := true;
sl := TStringList.Create;
try
ADOConnection1.GetTableNames( sl);
ADOQuery1.SQL.text := 'Select * from [' + sl.Strings[0] + ']';
ADOQuery1.Open;
ShowMessage('done');
end;
finally
sl.free;
end;

end;

Apart from getting blank records.

* I get "Either Bof or Eof is true, or the current record has been deleted"
when I exit out of the application," whenever I try to close the query.

I made a search on the internet, and read a Delphi 5 bug had a workaround by
setting the cursorlocation is set to clUUserClient.
But I still get the error message nonetheless.

p.s I log in with empty password and login. I've tried to connect with my
login name. but I get
"The workgroup information file is missing or opened exclusively by another
user".


Any ideas?

Andrew


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.