>StringBuilder sb = new StringBuilder(); >sb.AppendLine("SET SAFETY OFF"); >sb.AppendLine("SET EXCLUSIVE OFF"); >sb.AppendLine("CLOSE ALL"); >sb.AppendLine("USE "+lcLocalDbf+"Thread in 0"); >sb.AppendLine("SET SAFETY OFF"); >//... >string strScript = sb.ToString(); > >cmd.CommandType = CommandType.StoredProcedure; >cmd.CommandText = "ExecScript"; >cmd.Parameters.Add("myScript",OleDbType.Char).Value = strScript; >cmd.ExecuteNonQuery(); >Thanks, this approach is better. I am trying to execute the Parameters.Add() line however. This does not seem to be the proper syntax. I get a "Too many arguments to 'Public Function Add(value As Object) As Integer' error message at design time.