SAP B1 – Date Deviates from Permissible Range

On December 9, 2009, in Business One, by Jesper Angelo

End of the year… AH! Okay so you checked and the periods and entering you latest invoices, for instance the one from 12/9-09 with a due date on 1/8-10 should be a piece of cake. But now you get an error: “Date Deviates from Permissible Range [Document Name – Offending Date] [Message 173-11]“. What the…! [...]

PowerShell script to Backup a running DB

On December 3, 2009, in MICROSOFT, SQL 2005, SQL Server, by Jesper Angelo

For accounting, need a script to backup before changing stuff $conn = new-Object System.Data.SqlClient.SqlConnection("Server=nybba0sql;DataBase=Northwind;Integrated Security=SSPI") $conn.Open() | out-null $cmd = new-Object System.Data.SqlClient.SqlCommand("CustOrderHist", $conn) $cmd.CommandType = [System.Data.CommandType]‘StoredProcedure’ # This Parameter Line This will error if Parameters are not accepted by Stored Procedure. $cmd.Parameters.Add("@CustomerID","ANATR") | out-Null $rdr = $cmd.ExecuteReader() While($rdr.Read()){ Write-Host "Product Name: " $rdr['ProductName'] } $conn.Close() [...]