Board index » delphi » Validation Services Error

Validation Services Error


2006-02-07 12:02:51 AM
delphi121
Im using:
Fib+ 6.25.0 + Delphi 7 + InterBase 7.5.1
Im trying to develop a validation rotine doing access to services, writeing that piece of cod:
procedure TPrincipalForm.JvTranspValidationClick(Sender: TObject);
var Ini : TMemIniFile;
begin
PageControl.ActivePageIndex := 4;
Ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName,'.ini'));
with Validation do
try
Params.Values['user_name'] := EdUserName.Text;
Params.Values['password'] := EdPswd.Text;
DatabaseName := DBValidateEdit.Text;
BufferSize := StrToInt(ValidateBufferEdit.Text);
if CB_Protocol.Text = 'LOCAL' then Protocol := Local
else if CB_Protocol.Text = 'TCP/IP' then Protocol := TCP
else if CB_Protocol.Text = 'Novell IPX/SPX' then Protocol := SPX
else if CB_Protocol.Text = 'NetBEUI' then Protocol := NamedPipe;
LibraryName := ClientLibFilenameEdit.Text;
ServerName := EdServerName.Text;
Active := True;
{try
Attach;
except
on e: Exception do
AddStatusLine('Error Code 000506 Internal System '+#13+e.Message, clRed);
end;}
//Pega_Itens_Validation;
//Options := [CheckDB,MendDB,SweepDB,ValidateDB,ValidateFull];
if not Active then Exit;
try
ServiceStart;
AddStatusLine('=========== Validation Started ==============',clFuchsia);
AddStatusLine(Format('Validation Started at %s hours', [FormatDateTime('hh:nn:ss', now)]), clGreen);
while not (Validation.Eof) do
reStatus.Lines.Add(Restore.GetNextLine);
AddStatusLine('=========== Validation Finished ============',clFuchsia);
Validation.Active := False;
except
on e: Exception do
AddStatusLine('Error Code 000508 Internal System '+#13+e.Message, clRed);
end;
finally
if Active then Detach;
Ini.Free;
end;
end;
Im Getting that Error :
Error Code 000508 Internal System
PrincipalForm.Validation:
Unsuccessful execution caused by system error that does not preclude successful
execution of subsequent statements.please retry, specifying an option.
What is wrong? and Why i uncomment the Attach method i get other Error "Service is attached"?
is it an error from InterBase? im tring to do a Validation with EMSIBManagger and IBExpert and get the same message, Borland IBConsole do it right.
Thank you.
 
 

Re:Validation Services Error

Erick Hoffmann writes:
Quote
Im trying to develop a validation rotine doing access to services,
writeing that piece of cod:
Hmmm... Running code from a fish won't help. :)
Quote
What is wrong? and Why i uncomment the Attach method i get other
Error "Service is attached"?
It seems you're trying to do multiple things with the component --
validate, sweep, etc., all at once. Perhaps the component was already
connected? You can only do one operation at a time.
Quote
is it an error from InterBase?
Yes.
Quote
im tring to do a Validation with
EMSIBManagger and IBExpert and get the same message, Borland
IBConsole do it right.
IBConsole uses the same component. Check your options.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio González has a new CD of
Irish music out, and it is good: tinyurl.com/7hgfr