I am looking at the examples that come with Delphi 2005 and am copying the connection string correctly. I have an ASP.NET app with a BDPConnection component on a web form. A simple Username and Password textboxes with a button to connect.
The error I get is :
Connection open failed. Your user name and password are not defined. Ask your database administrator to set up an InterBase login.
I am using the default "SYSDBA" and "MASTERKEY" values so the login should be valid.
Here is the code:
const
C_CONNECTSTR = 'assembly=Borland.Data.Interbase, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b;vendorclient=gds32.dll;database=127.0.0.1:C:\\InterbaseData\\master.gdb;provider=Interbase;';
C_CONNECTOPT = 'waitonlocks=False;transaction isolation=ReadCommitted;commitretain=False;sqldialect=1;servercharset=;rolename=myrole';
function TTechNotesMain.ConnectDB: Boolean;
begin
Result := TRUE;
try
if (BdpConnection.State <> ConnectionState.Open) then
begin
BdpConnection.ConnectionString := C_CONNECTSTR + 'username=' + txtLogin.Text + ';' +'password=' + txtPassword.Text;
BdpConnection.ConnectionOptions := C_CONNECTOPT;
BdpConnection.Open;
end;
finally
Result := (BdpConnection.State = ConnectionState.Open);
end;
end;
Can someone please point out why this is not working? Thank you
ReidR
The error I get is :
Connection open failed. Your user name and password are not defined. Ask your database administrator to set up an InterBase login.
I am using the default "SYSDBA" and "MASTERKEY" values so the login should be valid.
Here is the code:
const
C_CONNECTSTR = 'assembly=Borland.Data.Interbase, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b;vendorclient=gds32.dll;database=127.0.0.1:C:\\InterbaseData\\master.gdb;provider=Interbase;';
C_CONNECTOPT = 'waitonlocks=False;transaction isolation=ReadCommitted;commitretain=False;sqldialect=1;servercharset=;rolename=myrole';
function TTechNotesMain.ConnectDB: Boolean;
begin
Result := TRUE;
try
if (BdpConnection.State <> ConnectionState.Open) then
begin
BdpConnection.ConnectionString := C_CONNECTSTR + 'username=' + txtLogin.Text + ';' +'password=' + txtPassword.Text;
BdpConnection.ConnectionOptions := C_CONNECTOPT;
BdpConnection.Open;
end;
finally
Result := (BdpConnection.State = ConnectionState.Open);
end;
end;
Can someone please point out why this is not working? Thank you
ReidR