Delphi SQL problems in a Windows NT Service????


[ DelphiLand FAQ ]

Posted by Todd Jaspers on June 28, 2004 at 16:42:04:

Hey guys, any idea why I would have problems accessing a database in a Windows NT Service?

I can access the database ONCE, and then when I go to access it again, it freezes up. I'm not sure why it does this.

Any idea?

I am using Delphi 7, with ADO components accessing an MS SQL database.

I am connected from the very beginning (set Active := True property in the beginning), and this is my code that I use...

Begin
RM_DATA.RM_DM.RM_Input.SQL.Clear;
SQLStatement := ('UPDATE REPORT_DATA '
+ 'SET REPORT_DATA.[IN_ERROR] = 1 '
+ 'WHERE REPORT_DATA.ID= ' + IntToStr(RepID));

ShowMessage (SQLStatement);

RM_DATA.RM_DM.RM_Input.SQL.Text := SQLStatement;
RM_DATA.RM_DM.RM_Input.ExecSQL;
End;


Any help would be much appreciated!!

Thanks!!!

Todd


Related Articles and Replies:


[ DelphiLand FAQ ]