> >usr = "" >pas = "" >ConnStr = [driver=SQL Server; server=]+THESERVER+[; database=]+THESQLDB+[; uid=]+usr+[;pwd=]+pas+[; Trusted_Connection=No;] >curHandle2 = SQLstringCONNECT( connStr ) >cmd2 = [exec InTransitRNStatus ?']+fdBlNo+['] >lr2 = SQLEXEC( curHandle2, cmd2, "sq2") && sq is the cursor the data is loaded intoCheck the result code from the SQLEXEC - if it's < 0 the query is failing. Use AERROR to get the error message. Is it safe to assume in the real code that usr and pas aren't empty strings?