tag:blogger.com,1999:blog-54311572783509021972024-03-12T17:36:39.677-07:00Littley Computer Services Inc.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-5431157278350902197.post-31375544560971625182015-01-07T12:10:00.004-08:002015-01-07T12:10:48.780-08:00Loan / Savings CalculatorI've been playing around with the latest Visual Studio web development tools. I've made a loan calculator that has options to include additional fees both up front and periodically. You can use it to figure out what the equivalent interest rate is if there were no fees, but you paid the same amount. I also added a compound interest calculator, because, well, it was easy to do. I'll eventually get charts on there, but for now it just calculates the total.<br />
<br />
It's at <a href="http://www.actualinterestrate.com/" target="_blank">http://www.actualinterestrate.com/</a>Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-1384420010326858862014-12-23T13:31:00.001-08:002014-12-23T13:31:49.639-08:002014 ReviewNot too sure if I'm going to keep the GoDaddy site, so will be continuing my blog here. 2014 was a fairly typical year. Most of my time was devoted to 4 main clients in the following industries:<br />
<ul>
<li>Financial: 57%</li>
<li>Mining: 20%</li>
<li>Forestry: 9%</li>
<li>Pulp Mill: 9%</li>
<li>Everything Else: 5%</li>
</ul>
As for tools, MS Access still played a majority role in my work, followed by SQL Server and ASP.NET.<br />
<br />
Back in September, I got my first Microsoft Certification.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ4SXjPaxVnExh-F1W_Gjp55KtgEwy5w9sbUKbKzb9remNJGi854zohlsf8CcxigmfnEQ1hyaRsodprccC2ytyX_-jkJRLdbui5ROpN7ldfUh5-Fs6WWrZpqz8upe87Tk-gpHgDDfV-ao/s1600/MCP_2013(rgb)_1519.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ4SXjPaxVnExh-F1W_Gjp55KtgEwy5w9sbUKbKzb9remNJGi854zohlsf8CcxigmfnEQ1hyaRsodprccC2ytyX_-jkJRLdbui5ROpN7ldfUh5-Fs6WWrZpqz8upe87Tk-gpHgDDfV-ao/s1600/MCP_2013(rgb)_1519.png" /></a></div>
I passed exam 70-461 Querying Microsoft SQL Server 2012. That gives me the title of Microsoft Certified Professional. The plan is to pass two more SQL Server exams to get a <a href="https://www.microsoft.com/learning/en-us/mcsa-sql-certification.aspx" target="_blank">MSCA: SQL Server</a> status.<br />
<br />
<br />
<br />
<br />
<br />
<br />
Looks like in 2015 I'll be doing quite a bit more work for a local pulp mill. Their main programmer moved to Alberta so I was asked to take over his responsibilities. I'm not sure how much work that will entail long term, but I'm excited to be able to help. Looks like I'll be doing a lot more work in the ASP.NET field, rather than MS Access which will be a nice change. Also, being able to visit a client regularly instead of remotely is a plus.<br />
Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-24661002573544586662014-10-21T07:17:00.002-07:002014-10-21T07:18:00.273-07:00New Blog / Project Web SiteI signed up for a WordPress site over on GoDaddy. I'm going to try to get my blog going over there, as well as some more detailed project pages.<br />
<br />
It's here: <a href="http://www.littleyblog.com/" target="_blank">http://www.LittleyBlog.com</a>.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-26263624699263726702014-03-03T20:36:00.001-08:002014-03-05T17:54:33.054-08:00Hey! I have a blog!I had very good intentions when starting this blog - it was going to be updated regularly. Ah well. Looks like I haven't really done a review of any kind since 2012. So here's a quick review of 2013:<br />
<br />
Did project work for 6 different clients, and minor maintenance work for 3 others.<br />
<br />
The project work was broken down into the following industries:<br />
<ul>
<li>Financial - 22%</li>
<li>Mining - 14%</li>
<li>Engineering - 27%</li>
<li>Pulp/Paper - 27%</li>
<li>Forestry - 6%</li>
<li>Airport - 4%</li>
</ul>
It was a moderately busy year - not quite as busy as the previous year, but not too bad.<br />
<br />
This year is shaping up to be a good one if the first two months are any indication. I've done about as much work in the last two months as I normally do in three. If I were able I'd probably take March off, but the task list beckons...Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com1tag:blogger.com,1999:blog-5431157278350902197.post-41800267391552348742013-02-14T09:55:00.003-08:002013-02-14T09:55:40.100-08:00SQL Update Trigger ErrorI was creating a trigger in SQL Server today and encountered an odd error. The trigger was in a purchase order table and I wanted it to update a value in each row of the purchase order line table for the po when a vendor date was changed.<br />
<br />
The error I was getting was:<br />
<br />
No row was updated.<br />
The data in row 1 was not committed.<br />
Error Source: Microsoft.SqlServer.Management.DataTools.<br />
Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows).<br />
<br />
Much Google searching later...<br />
<br />
To fix, add the following line above your UPDATE statment<br />
<br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;">SET NOCOUNT ON</span><br />
<br />
That fixed the problem for me.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-72856182833208338202012-10-01T09:52:00.001-07:002013-01-24T09:42:36.231-08:00September (and summer, and fiscal year) ReviewThe last three months were a little lighter than usual, but I did work on a few things:<br />
<ul>
<li>Access database that converts sales data to resource requirements by employee position</li>
<li>Database maintenance utility to purge old data from a program that's been running a number of years</li>
<li>Maximo related program that automatically emails vendors to remind them of outstanding purchase orders.</li>
<li>Client ranking function from an EMS system to help determine which clients are the most profitable.</li>
<li>Maximo related program to generate RFQ spreadsheets to email to clients and then upload the returned data from the clients.</li>
<li>SQL function to return written off totals for the year in an EMS database.</li>
<li>Plus a number of minor requests and edits to existing programs.</li>
</ul>
My fiscal year ended yesterday. 2011/2012 was a good year. Got a new client at the beginning of it and it looks like they are going to be a long term one.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-34457830689755978162012-08-06T11:09:00.001-07:002012-08-06T11:10:40.025-07:00Restoring SQL Server Database with Change Data CaptureJust upgraded my SQL Server to version 2012. I needed to because a client had upgraded and some features were making it difficult to restore their database to my computer. Still, I got an annoying error when trying to restore the database via the wizard:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Mylk1Cqj3eDUXA2OV6vTQj9iM0xtld-6sYqqgY-7p4rYiqisyi4KLQUA0j1OWMkNQtfsQ8TTHOG9yonJOsrr8LlaTz3JUdW8cXN-TsRXo24N85qaJ4PO_4c-dqioPW8zvhnW-w6BZ3I/s1600/cdc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Mylk1Cqj3eDUXA2OV6vTQj9iM0xtld-6sYqqgY-7p4rYiqisyi4KLQUA0j1OWMkNQtfsQ8TTHOG9yonJOsrr8LlaTz3JUdW8cXN-TsRXo24N85qaJ4PO_4c-dqioPW8zvhnW-w6BZ3I/s320/cdc.png" width="320" /></a></div>
<br />
<span style="font-size: x-small;"><em>"</em>System.Data.SqlClient.SqlError: Could not update the metadata that indicates database DBNAME is not enabled for Change Data Capture. The failure occurred when executing the command '[sys].[sp_MScdc_ddl_database triggers] ' drop". The error returned was 15517: 'Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.'. Use the action and error to determine the cause of the failure and resubmit the request. (Microsoft.SqlServer.SmoExtended)<em>"</em></span><br />
<br />
I love cryptic error messages.<br />
<br />
Anyway, after a bit of research I was able to restore the database by using the following line:<br />
<br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">restore</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">database</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: teal; font-family: Consolas; font-size: x-small;"><span style="color: teal; font-family: Consolas; font-size: x-small;"><span style="color: teal; font-family: Consolas; font-size: x-small;">DBNAME </span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">FROM</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">DISK</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: grey; font-family: Consolas; font-size: x-small;"><span style="color: grey; font-family: Consolas; font-size: x-small;"><span style="color: grey; font-family: Consolas; font-size: x-small;">=</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">'c:\data\BackupFile.bak'</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">with</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: teal; font-family: Consolas; font-size: x-small;"><span style="color: teal; font-family: Consolas; font-size: x-small;"><span style="color: teal; font-family: Consolas; font-size: x-small;">keep_cdc</span></span></span><span style="color: teal; font-family: Consolas; font-size: x-small;"></span> <span style="color: teal; font-family: Consolas; font-size: x-small;"></span><br />
<br />
The important bit was the '<span style="font-size: x-small;"><span style="font-family: Consolas;"><span style="color: blue;">with</span> <span style="color: teal;"><span style="color: teal;"><span style="color: teal;">keep_cdc</span></span></span></span></span>' option.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-84162425569267639862012-07-03T23:06:00.000-07:002012-07-03T23:06:12.071-07:00June ReviewJune was a bit slower, as is often the case just before summer. There was one small SSRS project and a bunch of changes and enhancements to existing programs.<br />
<br />
Going to attempt to keep July and August light on the work, as my oldest son is home from school. Also, I'm turning 40 this month, so as reward for making it to the life half-way mark intact, I'm going to try to take as much time off as possible and enjoy the summer.<br />
<br />
September will be the awe-inspiring time of both my kids in school (My youngest turned 5 this year). Looking forward to it. Hopefully I'll be able to find myself some largish projects.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-72911032331089534932012-05-31T12:52:00.001-07:002012-05-31T12:52:24.235-07:00May ReviewMay involved a lot of <a href="http://www.littley.com/lcs/Maximo.aspx">Maximo</a> work. I wrote a program to automatically email purchase orders that were generated in the Maximo re-order process. The program is in Access and it generates a PO report that is printed as a PDF. It automatically attaches the PDF file to an Outlook email message and then puts it into the user's outbox. Got a lot of complements on this one - the main user said they didn't realize how much time they were spending manually on this task until they didn't have to do it anymore. Aside from that, did some revisions on some of the custom java classes and minor changes to other items I had done previously.<br />
<br />
The rest of my time in May was spent writing some stored procedures and SSRS reports for one client, and revisions to Access programs for a couple of other clients.<br />
<br />
The fiscal year of 2011/2012 is turning out to be a good one. So far I've billed more than last fiscal year and I've still got 4 months to go.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-2534600208722327302012-05-08T15:41:00.001-07:002012-05-08T15:41:42.901-07:00Spring ReviewWell, it appears regularly contributing to a blog is more difficult than originally thought, especially when things are busy. Here's a quick re-cap of what I've been working on these last few months.<br />
<ul>
<li>Wrote a program to track a company's inventory of forestry certification credits.</li>
<li>Wrote some SQL Server stored procedures to take a snapshot of data in an EMS system. Also created some SSRS reports to view the data and compare the historic data with live data.</li>
<li>Added a bunch of changes to a Ministry of Forests database I had written a few years back.</li>
<li>Wrote a function to upload data from a spreadsheet to a Great Plains Dynamics SQL Server database.</li>
</ul>Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-9448512474325254552012-02-04T12:40:00.000-08:002012-02-04T12:42:00.951-08:00January ReviewThe first month of 2012 was fairly busy. <br />
<br />
A lot of it was SQL Server work. I worked on a script to merge a couple of databases together, another smaller SQL script to copy some data within the same database, and wrote a stored procedure and SSRS report for a management system.<br />
<br />
Also did some work on a Maximo / Great Plains Dynamics interface, programming a means to let the user edit some of the data before it was copied over.<br />
<br />
The plan for February was to work on a new project for a forestry client. That's still the plan, but in the first three days of the month, four different clients sent me requests as well. It's going to be a busy month.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-19293941962478343992012-01-10T10:39:00.000-08:002012-01-10T10:40:26.688-08:00Comment SpamI've had this blog up for less than a month and I've gotten a couple comments on my original post. I welcome comments, but these are obviously spam, complete with a link to another company's web site.<br />
<br />
They're kind of funny as it's obvious they were written by someone with a poor grasp of the English language. Check this one out:<br />
<blockquote class="tr_bq"><span style="font-family: Verdana, sans-serif; font-size: x-small;">Computer is world most used device of technologies. It provide well services in different way that known as IT solution work. It is one of the most effective device of technologies.</span></blockquote>It's like they picked a bunch of keywords and randomly put them into a sentence without any regard to it making sense.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-88994216689839586632012-01-06T13:14:00.000-08:002012-01-06T13:15:00.163-08:00Use T-SQL to restore a databaseWay quicker than using SQL Server Management Studio, especially if you have to repeat often.<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">RESTORE DATABASE [Database Name]</span><br />
<span style="font-family: Courier New;">FROM DISK 'c:\data\client\project\backupfile.bak'</span><br />
<span style="font-family: Courier New;">WITH FILE = 1</span>Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-73031681058630795962012-01-02T14:02:00.000-08:002012-01-02T14:02:17.112-08:00Happy New Year!Hope everyone has a happy and prosperous 2012.<br />
<br />
2011 was a good year for LCS. I kept fairly busy, mostly through one mining client, but also various small jobs for other clients. But it wasn't so busy I felt overwhelmed. I like it when my workload is that nice happy medium between not enough and too much.<br />
<br />
January and February look like they're going to be pretty busy, so time to get at it...Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-71366636631281988992011-12-20T13:39:00.000-08:002011-12-20T13:39:06.634-08:00SQL Server Restore - Filestream feature is disabledI was trying to restore a database in SQL Server 2008 and got the error: Restore failed... FILESTREAM feature is disabled. It was annoying because I was able to restore another database no problem, but this particular one I couldn't restore.<br />
<br />
After much Googling, I figured out how to enable the file stream. There are two steps:<br />
<ol><li>Open SQL Configuration Manager, click on SQL Server Services on the left hand pane, and then right-click SQL Server on the right hand pane. Select properties. On the FILESTREAM tab, check off all three options. OK out of the dialog and restart SQL Server. (Right-click and select restart).</li>
<li>Run the following in SQL Management Studio:</li>
</ol><blockquote dir="ltr" style="margin-right: 0px;"><div>EXEC sp_configure filestream_access_level, 2</div>RECONFIGURE</blockquote>After that, I was able to restore the database.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com3tag:blogger.com,1999:blog-5431157278350902197.post-38256202650175270782011-12-16T18:12:00.000-08:002011-12-16T18:12:00.814-08:00Web TemplatesI'm always on the lookout for good web templates. A lot of the ones on the Internet I've found to be either really primative (the free ones), or way too busy (the expensive ones). My current web site was a free template, though I don't recall where I found it. It's not bad, and it's served me well for a while. Even so, I think I'll be replacing it, mostly to get rid of the flash component in the header. A lot more people are using Safari (via IPhones or IPads) and that browser doesn't support flash.<br />
<br />
I recently found this site: <a href="http://andreasviklund.com/templates/" target="_blank">http://andreasviklund.com/templates/</a>. It looks like it has some really nice templates. The pages seem really 'clean' and also look professional. And they're free. What's not to like?Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-34413315367095140372011-12-13T11:15:00.000-08:002011-12-16T18:13:17.856-08:00Combo box changing background colourI had an odd thing happen in one of my Access databases. On one of the forms, a bunch of the combo boxes were changing colour when they lost the focus. It worked fine in Access 2003, but the problem appeared when running the program in Access 2007.<br />
<br />
To fix, open the form in design view and view the properties of the detail section (assuming that's where the controls are). There will be a property called 'Alternate Back Color'. It's likely set to 'No Color'. Set it to white, or whatever you want the colour of your combo box to be. That should fix the problem.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0tag:blogger.com,1999:blog-5431157278350902197.post-5611679877784744192011-12-13T11:05:00.000-08:002011-12-13T11:05:48.156-08:00LCS BlogWelcome to my business blog. I plan to use this blog to both give current and prospective clients an idea of the work I'm currently doing, and to give tips to fellow developers. There have been numerous occassions where a quick search of Google has revealed an answer to a tricky problem, so I'm going to try to give some of that information back to help others out.Davehttp://www.blogger.com/profile/17186790257610044370noreply@blogger.com0