Sunday, June 13, 2004

Some time ago I added a feature to my data entry application (Written in Microsoft Access 2000) that backs up the main table to an excel file when you close the data entry form.

Well, at the time I couldn't figure out how to delete files after they were so old, like 30 days or so. This was a safety feature because the whole access files are sometimes deleted when a file is sent ftp or something overwriting the original.

Anyway, I left the delete portion for later and forgot. So my users have been having excel files pile up on their hard drive and I didn't realize it until know. Some users would have to have upwards of 1 gig of files from this feature.

I realized this 2 days ago and finally figured out how to delete files in that backup directory that are older than 30 days. Here is the code:

On Error GoTo Err_Command1_Click

Dim ss As String
Dim strPath As String

strPath = "c:\cm\backup\"
ss = Dir(strPath & "*.*")

If ss <> "" Then
While ss <> ""
If DateDiff("d", FileDateTime(strPath & ss), Now()) > 30 Then
Kill (strPath & ss)
End If
ss = Dir()
Wend

End If

Exit_Command1_Click:
Exit Sub

Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

One day I hope to grow up and not be such a careless programmer. I hard a hard time finding this code, mainly because I couldn't figure out how to search for it. Works like a charm though. Tested it myself and also on an employees computer. We will see if there are problems next week.

Friday, May 28, 2004

CSS - Cascading Style Sheets

I read a great article last night about CSS. I have been using CSS only a little in the last little while and I need to use it more. It seems to be difficult to understand. The article was great and gave me some great ideas including help on an issue I had already struggled with. The article is at http://sys-con.com/story/?storyid=44901&DE=1.

div.clear {
clear: both;
height: 0;
margin: 0;
line-height: 0;
font-size: 1px;
}

This has to do with making the parent element expand to contain float. Anyway check out the article for more info. Great stuff. I now longer have the magazine because my youngest child spilled a large glass of milk all over the table which had the magazine on it. Thank goodness for the web site.

Tuesday, May 25, 2004

MSSQL 2000 running on my laptop

I am trying to set up everything to run on my laptop so that I can develop when away from desktop. I was trying to add cold fusion datasources throught the Cold Fusion Administrator and it was failing with some error which I have now forgotten.

The trick was to go the SQL Server Enterprise Manager, right click on the server, then select the Network configuration button at the bottom. Then I had to enable tcpip. This immediately fixed the datasource problem and everything is running good now. Don't know why that wasn't on by default. Maybe because it is an MSDE installation running locally.
More Linksys RV016

Well, I was in at the office until 12:30 last night on the phone with Linksys tech support trying to get this router working. The dynamic dsl has no problems. Even when I hook up to the static dsl I can get a connection to the internet from my lap top (Lan port 1), but the server with the static ip address does not get out to the internet. I did however, have the server being seen from the internet for a short while, but I do not know why that happened.

I got on the phone with tech support yesterday morning, and then again at 6:30. In the morning they gave me some things to try and I didn't want to bring the server down during the day, so I tried all variations of those things and then called back at 6:30. Had to go to softball at 7:15 so I hung up after being on hold for a level 2 excalation for about 10 minutes. Got back at 9:30 and called, only to work with the guy for over an hour and then get hung up on while being transferred to level 2. Then I called back and the new guy told me I needed to call linksys customer service and ask to be sent directly to level 2. All of these people I talk to speak poor english and are not one bit familiar with the RV016. This makes it very difficult and frustrating.

The last tech couldn't figure it out, so she said she would test it in a lab and get back with me with 48 hours.

So far this is a nightmare, I will keep you posted.

Monday, May 24, 2004

Linksys RV016.

We just got a new switch from linksys the RVO16. This was suppose to be a dream for us. Being easily able to combine up to 7 DSL connections and Load Balance all of them. We can add another dsl line for only $28.00/month now so bandwidth is cheap. Only problem is that it is only that cheap if you get 1.5 meg. Seems extra expensive from there on up.

Anyway, we got this router and I have been having a hard time setting it up. I have two dsl connections right now. One, we have had for years, is hooked in to a cisco 675 modem. The bandwidth is 940 down and 860 up or right around there. We have 5 static Ip addresses on this line. Line #2 is connected to an actiontec GT701-WG. No static IP's and the bandwidth is 1.5 down and 1024 up. More bandwidth but currently not used that much. My hope is to share the bandwidth on those two lines.

Plugging in line 2 was not much trouble. By default the linksys is set to dhcp an ip address. As long as the private range is different between the dsl modem and the rv016 then there should be mo problem. Changing the LAN ip on the rv016 is no problem and can be done from the setup tab on the web configuration screen. By default this screen is located at http://192.168.0.1 with password admin and username admin.

Thursday, May 20, 2004

Goldmine & Crystal Reports

We have been wanting to create some reports for goldmine and the internal report writer is awful. We have really struggled to use it. Finally I decided to give crystal reports (9.0) a try and it was heavenly. I am familiar with cr 9 and it took me only minutes to do what we had been strugglin for days to do with the built in report writer.

I could not however, figure out how to make the crystal reports available from within goldmine. There is an option in "Print Reports" to choose Crystal Reports, but it doesn't work. A search of the newsgroups confirms that this is a pain in the rear to set up. Lots of talk of having to find the exact dlls from the cr 9 cd and having to put them on the machine running goldmine. Versions vary by goldmine version and maintenance is a nightmare. Since I can easily deploy the cr reports to the web I am not going to worry to much about having them avialable in GM.

Friday, May 14, 2004

Just ordered the RV016 router from linksys. This is suppose to let you share multiple internet connections (Up to 7) and use them either for redundancy or load balancing. Our main dsl line gets so saturated once in a while that we are hoping to be able to utilize the bandwidth of a second line to help allevaite the burden. I will let you know how it works.

One of our DSL lines has static ip's which point through to our server. The other dsl has no static ip's but more available bandwidth. I talked to linksys tech support and they said this would be easy to set up.
These blogs suck. YOu can see how bad the last one was. I wanted to post sample code and none of it came through at all. That always deters me from continuing, cause it is a pain.

Been working alot with mach-ii trying to understand more and also trying to familiarize myself with the Object Oriented world. Found some free books on-line written by Bruce Eckel. They are located at: http://mindview.net/Books. I skimmed through some of the Objects chapter (2, I think) and it appears to be a good book.

I also ordered Head First Java based on a reccommendation by Hal Helms.

I really wish I could attend a class on OO programing, but at $2500 a wack I just can't do it. Alot of money, but it would probably pay for itself in increased productivity. Oh well, hopefully the books will suffice for now.

Tuesday, April 06, 2004

I am trying to use mach-II to dynamically display a page which includes a state map for all of the states we serve. Naturally I wanted this to be dynamic. The suggestion back from the newsgroup was to use the following filter in combination with the following code:


This all worked great, but it is not recommended that you use the above arguments.eventContext.displayView.

Sean coorfield recommended:

> I have read in two places how arguments.eventContext.displayView is
> part of the framework and therefore shouldn't be used by me. Is that
> true?

It is true. EventContext.displayView() should really be
access="package" (very, very few methods in the framework should be
access="public" - 1.0.9 tidied up a lot of this but not all of it).

> If this is bad practice, what would be an alternative approach.

See the thread mentioned above for one option.

Another option is to have a stateView.cfm that does:

cfinclude template="#event.getArg('stateID')#.cfm"

and that's *all* it does - so it's just an indirect view. That's how I
handle the C++ section of my website and also how I wrapped the Movable
Type blog in Mach II.

Regards,
Sean

Tuesday, February 17, 2004

Friday, February 13, 2004

Alan Greenspan

Watching C-Span the other night when Alan Greenspan was testifying before congress. I don't know why Mr Greenspan was even there. The dems used their time to bash Bush and the repubs used their time to defend Bush. If they are going to call Mr Greenspan to testify they ought to use the time with this brilliant Man to find out what he knows. Some independent guy, can't remember the name, seems like it was Barney or something, anyway he went on a rampage, like a little kid throwing a tantrum. I couldn't believe it. He was denigrating and negative to Mr Greenspan. He ought to be spending more time helping his constituents find jobs then blaming Mr Greenspan for that lack.

I tried to focus on the remarks of Mr Greenspan and ignore the worthless rhetoric coming from both sides of congress and I was impressed with one thing in particular that he said, and had to repeat many times for the sake of the mindless bickersons he was testifying to, was that the jobless rate is being affected by an extroardinarily high productivity rate gain. He is farily confident that we will not be able to maintain the current level of productivity gain. Interesting. This makes sense to me, as someone who works in technology. But I am not so sure it will come to an end. Just thinking in my own business I know there is lots more I can do to increase productivity. In fact, I don't see an end to it anytime soon.

So, the better we do our jobs at increasing productivity, the worse the job market is going to be.

Another point I appreciated from Mr Greenspan is his comments on training the work force. When he says that there has been a fundamental shift from manual labor to more technical oriented jobs he is right on. Many manual jobs are being automated. He also said that if we can train more people for these jobs then there will not be so many people in the market for "manual" types of jobs, which will in return raise wages as the supply of workers for those jobs decreases. He, of course makes this point brilliantly
Facade

I see alot of talk about "facade's". I don't really have a clue as to what they are so I presented that question to the mach-ii mailing list. Got a response that pointed out an article written by Sean Corfield. Sean is a major contributor to the community. He went on vacation last week and it felt like the world was falling apart without him. The article is at Facades
Mach-ii FAQ Site

There is a new site about Mach-II. A "FAQ" site. I just can't get enough info about Mach-II right now so I am glad to see yet another resource. The site is located at www.mach-ii.info