A bug in 8.5.1 Domino Designer causes the field list for a Document data source to not appear in the Domino Designer data tab in right hand sidebar.
I often use code such as the following to simply divide two integers and get the result as an integer, throwing away any remainder:
dim x as integer, y as integer, res as integer
x = 11
res = Fix (x / y)
The above code would return 2 in the integer variable res.
Of course, if I had used res = x/y, res would have the value of 3, since LotusScript will implicitly round any float when converting to an integer.
Simple, right? But there actually is an operand for performing exactly this type of “integer division”. You can use the backslash character ( \ ), as in:
res = x \ y
The backslash operand has been there forever (well, at least back to R5), but how rarely I see it used.
Well, this may be obvious for SQL DBA’s, but after completing a data migration effort tonight, I needed to rename a database in SQL Server. Well, you cannot just right-click the database name in SQL Server and choose rename. Instead, you need to get all users out of the database and then open the database in single user mode. At that point, you can run a system stored proc to rename the database. Pretty simple – the second time :)
Here are the steps:
- Kick any connected users out of the database.
- Open database in single-user mode by opening Enterprise Manager and right-clicking the database name, and opening the Properties dialog. In the dialog, go to the Options tab, and select the checkbox labeled Restrict Access and then select the radio button labeled Read-Only.
- (Important) Close Enterprise Manager, to be sure SQL Server does not count that session as a connected user.
- Open Query Analyzer and run the system stored procedure named “sp_renamedb”. The proc takes parameters of the old name and new name. For example: “sp_renamedb MyOldDatabaseName MyNewDatabaseName”
- Close Query Analyzer
- Open Enterprise Manager and undo the Restrict Access setting made earlier. (Your database should now be listed under the new name).
Yes, if you have 8.0.1 (or earlier), or apparently any version of Domino 7.x, on your server and use the ArrayUnique LotusScript function in a server-side agent, the code may crash the server. Specifically, if the array argument has over 4,085 elements, the server will consistently crash upon executing the ArrayUnique call. there is a recent technote documenting this known bug (which can be found here. (Of course, I learned of the bug the “harder” way).
Note that this is addressed in 8.0.2 and later.
I have finally finished reading through this great collection of essays on software development – The Best Software Writing 1, edited by Joel Spolsky. The books is an interesting collection of writing of interest to any software developer, covering a wide spectrum of topics. I guarantee, the writing in this book will make you think differently about software development and software developers.
A few of my favorite articles include Bruce Eckel’s Strong Typing vs. Strong Testing; Paul Graham’s Great Hackers; Eric Lippert’s How Many Microsoft Employees Does it Take to Change a Lightbulb?; and where the lucky stiff’s A Quick (and Hopefully Painless) Ride Through Ruby.
- Create a view with a selection formula which includes documents created with DocType of “RESOURCE”, and with a form formula which computes to the appropriate form based on the “Content Type” radio button.