🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #67

Ms Access problems

#67
From: Max
Date: Thu, 10 Nov 2005 15:06
42 lines
2215 bytes
Hi,
1) I have this code to read a Ms Access 2000 Db:

var
Name, Password : BdpParameter;
Dataset : BdpDataReader;
begin
  BdpConnection1.Open;

  BdpCommand1.CommandText := 'SELECT * FROM Users WHERE ((UserName=?) AND
(Password=?))';

  Name := BDPParameter.create('Name', BDPType.String, 50);
  Name.Precision := 50;
  Name.Value := 'username';
  BdpCommand1.Parameters.Add(Name);


  Password := BDPParameter.create('Password', BDPType.String, 50);
  Password.Precision := 50;
  Password.Value := 'password';
  BdpCommand1.Parameters.Add(Password);

  Dataset := BdpCommand1.ExecuteReader;

  if Dataset.Read then MessageBox.Show(Dataset.GetString(0));
  end;
So the code don't work (it don't give error but don't display anydata - the
code don't enter in "then" tag). If don't use parameters it work fine. How i
can do?

2) Can someone tell me why the connection with Borland Data Explorer of
Delphi
2005 sp3 and Ms Access 2000 database with password set don't work?
Without the password is all ok, with the password i get this error:
"Cannot start your application. The workgroup information file is missing or
is opened exclusively by another user."....
I've tried to remake the system.mdw file, set again in the system registry
the link to that file but the error persist.
Have i must pass the connection string to runtime? and what i must write?

Thanks, Max
Technical Details
Message-ID: <437361d2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,b9a4f1d45109939b,start
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Max" <massimo.allegretti@tiscali.it>
From: "Max" <massimo.allegretti@tiscali.it>
Newsgroups: borland.public.delphi.database.dotnet
Subject: Ms Access problems
Date: Thu, 10 Nov 2005 16:06:28 +0100
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 82.53.194.6
Message-ID: <437361d2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1131635154 82.53.194.6 (10 Nov 2005 07:05:54 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail