 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Timothy Jones Guest
|
Posted: Wed Jan 21, 2004 2:15 am Post subject: Delphi 4 and MS Access |
|
|
Hi all,
I'm getting a General SQL Error -2147221164 error in Delphi 4 when
attempting to connect a TDatabase component to an MS Access table. I am
following the below instructions:
Database1.DatabaseName:='tryDB';
Database1.DriverName:=MSACCESS;
Database1.LoginPromt:=false;
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=D:Projectspattern.mdb');
Database1.Connected:=true;
TDBGrid.DataSource:=DataSource1;
DataSource1.DataSet:=Table1;
Table1.DatabaseName:='tryDB';
Table1.Active:=true;
Any help would be appreciated.
TIA,
TJ
|
|
| Back to top |
|
 |
Dan Guest
|
Posted: Wed Jan 21, 2004 6:17 pm Post subject: Re: Delphi 4 and MS Access |
|
|
I don't use access, so this is just a stab in the dark... I remember
some problem with passwords and access. Even if you are not using a
password on the db, you still have to set up the username and pw for
the connection. Anything for the name, and a null strng for the
password is what I recall working.
Maybe one of the Access users can shed some more light on this.
HTH,
Dan
On Wed, 21 Jan 2004 13:15:27 +1100, "Timothy Jones"
<timothy.jones (AT) team (DOT) telstra.com> wrote:
| Quote: | Hi all,
I'm getting a General SQL Error -2147221164 error in Delphi 4 when
attempting to connect a TDatabase component to an MS Access table. I am
following the below instructions:
Database1.DatabaseName:='tryDB';
Database1.DriverName:=MSACCESS;
Database1.LoginPromt:=false;
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=D:Projectspattern.mdb');
Database1.Connected:=true;
TDBGrid.DataSource:=DataSource1;
DataSource1.DataSet:=Table1;
Table1.DatabaseName:='tryDB';
Table1.Active:=true;
Any help would be appreciated.
TIA,
TJ
|
|
|
| Back to top |
|
 |
Andreas Schmidt Guest
|
Posted: Thu Jan 22, 2004 1:43 pm Post subject: Re: Delphi 4 and MS Access |
|
|
"Timothy Jones" <timothy.jones (AT) team (DOT) telstra.com> schrieb im Newsbeitrag
news:buknbe$1e2$1 (AT) mws-stat-syd (DOT) cdn.telstra.com.au...
| Quote: | I'm getting a General SQL Error -2147221164 error in Delphi 4 when
attempting to connect a TDatabase component to an MS Access table. I am
following the below instructions:
Database1.DatabaseName:='tryDB';
Database1.DriverName:=MSACCESS;
Database1.LoginPromt:=false;
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=D:Projectspattern.mdb');
Database1.Connected:=true;
TDBGrid.DataSource:=DataSource1;
DataSource1.DataSet:=Table1;
Table1.DatabaseName:='tryDB';
Table1.Active:=true;
|
The BDE supports only Access95 and Access97 file format.
Access2000 and higher are not supported!
Sometimes it helps to install Access97 on the destination
machine, because this will install DAO 3.6.
Andreas
|
|
| Back to top |
|
 |
|
|
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
|
|