Sunday, February 08, 2009

Model-Glue 3 (Gesture)

I can't believe I am so late to the party on this, but Model-Glue 3 has been out in Alpha for 8 or 9 months now and it has some really cool features. Features that are simply amazing and will surely save lots of people lots of time. Over the weekend I stumbled across a you tube video demo (Scroll down the page to theMG3 Feature Sneak: Event Generation Video) by Joe Rinehart. Really, the thing that I wanted to try out so bad was the auto-generated code. You have to be in development mode, but you type an event into the url and if it doesn't exist MG3 creates all the best practice code that you need to make that event work. It makes an entry in the modelglue.xml, controller and view files. It even creates the controller if it needs it. Very Cool. I also so a quick touch on SES url's in that video which was interesting. This is something I have needed for quite some time.

Ray Camden has a great blog post on these many features, I think he wrote it while siting in a presentation about this, so it isn't exhaustive but it gives you a great launching pad to find out more. His blog post is here http://www.coldfusionjedi.com/index.cfm/2008/5/2/ModelGlue-3--The-New-Frakin-Awesomeness.

One of the responses on that page shows exactly how to get SES url's working:






Forbidden You don't have permission to access / on this server

I have been using this mac more and more. In fact, I hooked up to the monitor,keyboard and mouse, that were attached to the docking station for my dell laptop (Which isn't working right now) and used the mac all day on friday. No problems other than the keyboard quirks that still drive me nuts.

Anyway, over the weekend I saw a demo by Joe Rinehart on the new Moldel-Glue 3 (gesture) that has been out for some time in alpha release. I really wanted try a couple of the features, so I continued something I had briefly tried a while ago, and that is setting up virtual hosts on my mac to point different urls to different directories on the computer. I found alot of information on that and made what I thought were the correct changes as indicated in the various articles. (this is a whole other blog post). But whenever I tried to pull the new site up in a browser I got the error: Forbidden You don't have permission to access / on this server. I probably spent 4 or 5 hours changed in my settings and stuff, until finally I just moved my files to /Websites/myweb. The problem all along had to do with accessing directories in the /users directories, which is where the files I originally wanted to access were located. There were some articles on making this work, but I didn't mind just moving them to a lower directory that would be easier to find anyway.

Thursday, January 22, 2009

Blackberry Storm Upgrade

I recently upgraded from a blackberry 8703e to the new storm, I did this around December 10, 2008. First, transferring contacts and calendar was awesome, easy, fantastic. I use google synch to synch my contacts and calendar with my google apps calendar and contacts, so All I did was install google synch on the new STORM, entered my credentials and it did take a try or two (there was alot to synch) all my stuff was there.

I was severely disappointed with the battery life of the storm. But after a few days, the battery life was fine. I attribute that to overusage cause it was new and maybe battery conditioning. At first it was only lasting about 12 hours, and since I unplug it between 5 and 5:30 AM, that means it was shutting off on my way home from work around 5 or 6 pm. It now consistently lasts until midnight which is when I usually plug it in. Sometimes I plug it in for the night earlier and once in a while later, but there is still juice left when I do.

I think it uses alot more juice when you actually use it, but when it is just in your pocket or the holster, it sleeps pretty good, if you are in a digital area.

I like this phone, I don't love it. It is slow and I often have to wait for it. My brother-in-law got one and traded it in for the curve, and to tell you the truth if I had that option now I would go with the curve. The new affect was fun and it is a pretty cool phone, but it lacks in functionality because of the slowness and usability of the interface. It has froze several times, even during a phone call twice.
Adding All Option CFSELECT

I am creating a web page that makes use of related cfselect's. This is a handy feature of coldfusion that allows the contents of one select box to be dependent on the contents of another. For me that means I have one select that lists areas that our company covers. Another box lists the counties we cover. Using the related selects the counties will only show for the area selected in the first box. Very nice. I also link a jurisdiction select to the counties select.

I wanted to add a default "All" option to these selects. Colfusion has an atribute for CFSELECT - queryposition which you can set to above or below. This works great if you are not using the bind attribute in CFSELECT. I was using bind to connect those cfselects so I had to find another way to add "All". I found a comment on Ben Forta's Blog by Matt Bennett that gave me sample code like the following which I adapted slightly for my own use:



sortArray = ArrayNew(1);
QueryAddColumn(qry, "sort_order", sortArray);
QueryAddRow(qry);
querySetCell(qry, "name", "All");
querySetCell(qry, "id", "0");
QuerySetCell(qry, "sort_order", "1");


SELECT *
FROM qry
ORDER BY sort_order desc, name asc



Works great, I just added that code after the qry I was already returning and boom, success.

Monday, December 01, 2008

Export to CSV with Coldfusion

I am trying to finally get a good export to CSV working, using coldfusion. There are alot of posts, many of them by Ben Nadel.

Ended up using the example from: Converting A ColdFusion Query To CSV Using QueryToCSV()

This worked great except there were lots of blank rows at the top of the file and at the bottom. The fix was found here: Extra white-space after page proccess

<cfcontent reset="yes"><cfoutput>#Trim (yourvar)#</cfoutput><cfabort>

It was important to put it on one line to, otherwise there was an extra line for each line return.

Thursday, November 27, 2008

CF 8 - "ColdFusion is not defined" JavaScript Error

I am trying to get ajax select dropdowns to work in coldfusion 8. I eventually want them to be related also. That is, the results of the second are based on the choice in the first. Well hit a wall and couldn't get the data to show up. using a test page I was able to return the correct results with a cfinvoke of the .cfc, but no data in the selects.

I didn't have firebug installed on this computer, so I went and got it and looking at the javascript error's I saw the error: CF 8 - "ColdFusion is not defined" JavaScript Error. Google that and I found the following that explained the cause:

CF 8 - "ColdFusion is not defined" JavaScript Error

The solution was to not only have a cf mapping to the cfide directory (which I already had) but also a web server virtual directory (which I didn't have). I added the virtual directory and it works.

Wednesday, November 26, 2008

How to restart Apache on the Mac

Made a change in the httpd.conf file and wanted to restart the Apache server to pick up the changes. How did I do that?

Open up the terminal window (/applications/utilities/terminal)
Then Type: sudo apachectl restart

Seems to have worked for me.
Location of httpd.conf for Apache on the mac

It is hard for me to find things on this mac still. Some of the stuff is hidden and it always takes me a while to get around. The last thing I was looking for was the httpd.conf file for the apache web server configuration. I wanted to see where the webroot was. Then maybe change it.

Anyway, it was at /private/etc/apache2/httpd.conf.

Amazing how many posts I saw asking this same questions.

Monday, November 24, 2008

Start and Stop ColdFusion and othe services.

One of those little nuggets that I picked up at the adobe conference was leaving services you don't always use stopped until you need them. Like coldfusion for instance. I will get developing and use coldfusion locally for development for days at a time. But, I don't always use it, so there is no need for it to be running if I am not using it.

Quick search and I found this: Batch files for Starting and Stopping ColdFusion.

In Vista I had to use "Run as Administrator" for those to work, but they did work like a charm. Took a long time on the main CF service the first time, but it did eventually work.
Dreamforce, Adobe MAX, and BIS in Long Beach

I have been out of town 4 days each of the last 3 weeks attending one show and 2 conferences.

First was Dreamforce. Salesforce.com's annual big event. This was fantastic. I am amazed at what salesforce.com has been able to do with their platform. We have been using salesforce.com since April and I can't imagine being without it. They really have a fantastic vision and have been able to grow their business and keep most of their customers happy.

One of the Big announcements was salesforce sites. Public facing web pages that your customers can access without loggin in. Before, any access to salesforce was via controlled login access. Now you will be able to design pages for the public based on your salesforce data. This does have tremendous possibilities, especially if I was to ever move my data entry app into salesforce. We will see. But all the other stuff was cool. I learned alot and they treated us like royalty. Tons of food all the time. Free shirts, books and more. I have never before been treated so good as we were treated at Dreamforce. They seem to really care about their customers.

The second week I was at BIS in Long Beach. This is a builders show where we buy a booth and market our magazine. We also walk around and speak with other booths. This show is a good place for us to get our name out and we had pretty good success with it last year.

The 3rd week (last week) was the Adobe MAX user conference. I went to this one when it was in Salt Lake about 4 or 5 years ago. This conference was great also. They had decent food, although not as good as dreamforce and the content was above average. I learned alot and got to shake hands with and meet some of the top coldfusion guys. I am sure there a great minds in everywhere, but I feel we have some great ones in the coldfusion community.

Both these conferences where held at the Mascone Center in San Francisco. This made it easy for me because I was a little familiar with the area since I went there in late Sept for a salesforce.com administrator test.
Mac drives me crazy 1/2 the time and I love it 1/2 the time.

I have not posted forever. Probably because this macbook pro drives me absolutely nuts sometimes. After slowly getting use to the different key combinations I can actually get around ok, although I still have alot to learn.

The battery lasts for about 3 hours, maybe slightly more, depending on what I am doing. This is great. It does run fast. But to be fair a new pc laptop with the same config would probably do the same. It wakes up from sleep mode faster than I think a pc with windows ever could. And it is sleek and cool.

But, I can't beleive how hard it is to use some of the dvd/movie features. I have tried to create dvd's from a panasonic mini-dv camera and it has been a frustrating nightmare. Even once you learn how to do it there are quirks that drive me nuts. If you don't catch some of the subtle things, it just fails and you don't know why. Thank goodness for my daughter's basketball coach, she figures it out, even thought it sometimes takes her a while too.

Anyway, my macbook pro isn't going away. But it won't be my main machine anytime soon.

Oh, one huge plus is the touchpad. Dragging 2 fingers scrolls. 2 Finger touch is like a double click (Although Steve Jobs is crazy for not just putting 2 stupid buttons on there in the first place). With the pc I ALWAYS pull out the wireless notebook mouse. With the macbook pro I am more comfortable with the trackpad because it is so responsive and nice. I catch myself trying to 2 finger drag back on the pc and it doesn't work.

Thursday, August 28, 2008

Installing mySql on Mac OSX Leopard

Just got done installing mysql on my macbook pro. Installation went just fine. Followed the same document that also had php installation instructions. Click here to view that document again.

I accepted all the defaults and have not yet gone through the instructions for connecting to php. A couple of places I stumbled only briefly. As mentioned in the article I downloaded the MySQL GUI Tools. This gives a visual interface and will definately work better for me as I still have no clue to all the command line stuff on this mac. After installing the gui and clicking on the MySql Administrator app in the applications folder I was given the option for a server and username and password. Server Hostname can be set to "localhost" and username to "root". Then you can change the password when you get in there.

Very simple. Now I gotta learn the interface.
Installing Coldfusion 8 on Mac OSX Leopard

I just installed coldfusion 8 on my macbook pro and didn't have any problems. I read through this post first and it had instructions, but all the settings in that article were the defaults so I just clicked through and it installed no problem.

I am, once again, not sure about the directory structure. Not sure if the default /library/documents/webserver is the best place but it does work, at least the CF administrator does.

I installed the 64 bit version. The way I understand it is that with the core 2 duo processors you can get the 64 bit versions of the files

Now on to mySql.
Viewing Hidden Files

I Figured out how to view hidden files, but it wasn't easy and I am still not 100% comfortable with it. I followed the instructions here: http://guides.macrumors.com/Viewing_hidden_files_on_a_Mac but that did not seem to work. I wanted to just use finder to see the hidden files. When I typed in the suggested commands, I didn't get an error but it is definitely not working. So I resorted to downloading a couple of additional programs. Textwrangler and Coda.

I actually downloaded Textwrangler first and struggled a little so I began to download coda. Before it finished I had figured out Textwrangler so that is what I ended up using. From the textwrangler menu you choose "File/Open Hidden". After that it still isn't easy as I still am learning to understand directory navigation on the mac. I was able to find the private directory by clicking on the "Macintosh HD" in finder. It would be more intuitive at this point if it would have been under Desktop, Home, Applications or Documents which is where most stuff seems to be.

I haven't got back to using this (modifying hidden files) yet, but I will and I think I will be alright now. I still need to install mysql and coldfusion.

I did get php working by just modifying one line as instructed here: http://reverbisnotalie.com/code/php-mysql-apache-mac-osx-leopard

Sunday, August 24, 2008

Apache, ColdFusion 8

I want to install apache and coldfusion 8 on my mac so that I have a complete development environment on this machine. I enabled web sharing which I think is apache and It works. But I can't find the apache directories. It looks like you have to make hidden directories and files viewable and I did that as instructed here:

Viewing hidden files on a Mac

But I still can't figure out where the http.conf apache file is. This is not easy so far, unless I am just missing it.

Thursday, August 21, 2008

Gmail on a Mac

This one is going to drive me nuts. On a pc using gmail you can type an email, press tab and then enter and it sends the email. When you press tab it moves focus to the send button. On this mac that doesn't happen. Tab never performs like I expect, at least on web pages. Driving me nuts. Funny how such a little thing can make such a difference. But I at least need a comparable key combination so I don't have to touch my mouse in gmail.

----------------
Just found the answer to this. System Preferences/Keyboard & Mouse/Keyboard Shortcuts then at the bottom you see "Full Keyboard Access". Make sure you choose the "All Controls" option and it works like a charm. Wahoooo!

Wednesday, August 20, 2008

Touchpad greatness

Just reading through the little white booklet that was the only documentation that came with the macbook pro. The info from that booklet that I liked the most was the info on the touchpad. Two fingers sliding will scroll up and down or side to side. Two fingers and click is like a right mouse click. I also enabled touch click in system preferences because I prefer to just tap the touchpad instead of having to use the button, which can be awkward for my thumb. Three fingers does something too, but I can't remember what.
Mac Spaces

Just started using spaces. This is a cool feature where essentially you have 4 desktops and can easily switch between them. I will probably use this more as I get use to it. I might have email in one, eclipse for coding in another etc...

Even with this 15" screen there is not alot of screen real estate available with the dock and a few desktop icons you don't want to cover up. Spaces will make this easier to deal with.
Lighted keyboard

The macbook pro's lighted keyboard is sweet. With my dell I always had to angle the monitor down to be able to see the keyboard in the dark. Not with my mac.
Save pdf to web receipts folder

My Macbook pro has a cool feature. When you print a web page you can click on the pdf button and there are several cool choices. The one I just used "Save pdf to web receipts folder" is a great time saver and very convenient. How many times do you just want to do that. In windows there are a few extra steps and I think you have to have adobe acrobat pro in at least some cases.

Tuesday, August 19, 2008

unable to load default svn client

Installed Eclipse no problem. Although I did install the latest version, Ganymede first. But I installed the latest Europa (3.3) once I found out that CFEclipse doesn't yet work with Ganymede (3.4). I then installed the SVN client and it seemed to go well. But I was getting an error "unable to load default svn client" error.

Found a little help here: http://subclipse.tigris.org/servlets/ReadMsg?listName=users&msgNo=12087

But I already had installed JavaHL and still I was getting the error. But after installing SVNKit (there were 2 and I chose both, a client and something else) it worked. Another problem solved.
No Docking Station

It looks to me like there is not a docking station available for this macbook pro. That is a shame. Apple seems to have it all going on and then they don't have docking stations. I currently use my dell latitude laptop primarily between 2 different offices. At each of these offices I have docking stations with external monitors, power, network and other accessories hooked up. It is VERY simple to just drop the laptop onto the docking station and I am off and running. This is a big minus for the mac.
Cool Power Adapter Connector

This is one of those little things that don't matter much, but I notice. The way the power cord hooks into my mac is pretty cool. It is magnetic so once you get close it kind of grabs it and inserts right to where it needs to be. Makes it easy to plug it in.

That's lost a little in the enormity of the whole power aparatus itself. I am use to the dell power adapters that have a nice way to wrap both sides of the cord around itself.

Monday, August 18, 2008

Mac Crash

So, I am a little confused about if I can just shut the lid and this mac will go into sleep mode, or what. I have no idea how to tell what it is doing. So far, this is one big deficiency. I have no insight into the workings of this machine. I even find myself missing the disk actvity light, even though it doesn't mean much, at least I know something is going on.

Anyway, I left my house to go over to the in-laws and chose sleep from the apple menu. When I opened it back up at the in-laws it just froze. Wouldn't do anything for 3-5 minutes. Finally just held the power button down until it restarted.

So I had a mac crash in my first day owning my first mac. I am loving the experience so far, but I think that is mostly the newness of the whole thing.
Copy a DVD

I had to copy a DVD today, something I rarely do. I had no clue how to do that on the Mac. A quick google search found: http://www.kenstone.net/fcp_homepage/making_dvd_copies.html.

That article gave me enough info to copy the DVD. I actually got it going and forgot it was running. The mac is much better at copying a DVD and allowing my to work unhindered while that is happening.
VMWare Fusion

Ok, now this is cool. I bought VMWare Fusion at the same time I bought the macbook pro. I just got done installing Windows Vista as a virtual appliance. So essentially now, I can switch over to windows vista at any time. Very cool. I plan to install Windows XP and Ubuntu also. Windows XP just to support my clients, and Ubuntu for fun.

I think I can take a snapshot of my pc and install a virtual machine that is just like my pc, with all programs and everything, but this time I did a fresh vista install for testing. It was slick.
CTRL-End and CTRL-Home

I didn't realize how much I use these two quick key combinations until they weren't there on the mac. The mac version of these is cmd-LeftArrow and cmd-RightArrow. Cmd stands for the key labeled "command" on my macbook pro. I think this is also referred to as the apple key. cmd-uparrow and cmd-down arrow seem to move you to the top and bottom of a document.

Good to have these committed to memory. They are very useful. Now if I could just figure out the tab key in gmail. That is a big one for me.
Performance Monitor for Mac

What started this was my desire to make sure they really gave me the 4gig memory that I paid for. I was trying to find out the easiest way to get that information on the Mac. In windows you simply right click "My Computer" and get alot of that information right there. Ctrl-Alt-Del / Task Manager also gives you that stuff.

Google lead me to this: http://www.mac-forums.com/forums/showthread.php?t=120126. Which essentially mentions the activity monitor in Applications/Utilities and also the free download from apple.com called istat: http://www.apple.com/downloads/dashboard/status/istatpro.html.

This little app was free, installed very easily and is accessed by clicking on the dashboard icon 2nd from the left on the dock, or whatever that line of apps is called.

I still struggle getting around on the Mac. I installed VMWare and was confused, although I can tell it will be fine after a couple shots at it.

I got a message from VMWare that there was a newer version, but I clicked away the error and for the life of me I cannot find the mac version of Help/About. I just want to see specific versions so that I can identify upgrades.
I bought a MAC!

For years I have been considering purchasing a Mac computer. I am a laptop guy, so usually my thoughts have been for a macbook pro. I finally did it. Today, it arrived and I am already using it. I type this blog entry from that new laptop.

I am going to try and document stuff as I learn. I don't plan on completely switching to mac, but I do want to make sure that I have personal experience with both types of computers. But if I love it, who knows!

The first problem was that I wanted to highlight the whole URL in the browser window. In Windows I click the end of the URL and then I could press ctrl-home. I searched for ctrl-home for mac, but came up with cmd-L. This will jump to the URL and highlight the whole thing.

I still need to figure out the equivalent of ctrl-end and ctrl-home. Plus the tab key doesn't seem to work the same, especially in gmail.

Tuesday, June 24, 2008

Even My Wife has a blog.

My wife said that her Sister set her up with a blog today. We will see. She even acted like she was going to post. We will see. If she starts posting then I will have to be better about posting to my own blog.

Tuesday, October 09, 2007

Citi sends unrequested credit cards - USATODAY.com

Citi sends unrequested credit cards - USATODAY.com

My wife just got a new credit card in the mail. I was stunned. I asked her if she had requested it and she said no. This is just bad business. Very upsetting that a company could get away with this. How will this affect our credit? Is there an opportunity for identity theft? Maddening. This shouldn't be allowed. The name Citi will now take a position on my "bad" list of companies I will not have anything to do with.

Thursday, September 27, 2007

I want to be able to connect to the computers on my network. And I
want to do this even from outside the firewall. SBS 2003 has a great
web interface to launch this at http://yourdomain.com/remote.

But it wasn't working. I was getting the error: "Connectivity to the remote computer could not be established. Ensure that the remote computer is on and connected to the Windows Small Business Server network."

I found the solution here: http://techrepublic.com.com/5208-6230-0.html?forumID=101&threadID=227304&messageID=2263999

"Remote Connections
I've seen this error too many times when I don't enable remote
coneections on workstations. The connection is being made, otherwise you would not get that error. Check and make that "Allow users to connect remotely to this computer" is enabled. This is found on the Remote tab of my computer. As soon as I tenable it, I can remote login to workstation. This has worked for me every time without fail. "

This worked great and now I can connect to the machines that I want to connect to.

--
----------------------------
David Mineer Jr
Construction Monitor
435-586-1205 x101
----------------------------------------------------------
The critical ingredient is getting off your butt and doing
something. It's as simple as that. A lot of people have ideas,
but there are few who decide to do something about them now.
Not tomorrow. Not next week. But today. The true entrepreneur
is a doer.

Wednesday, August 29, 2007

iGoldmine and Log On Local Rights.

After getting iGoldmine configured and allowing access through the firewall, I had a problem with regular users loggin in. I could, as an administrator, but my other users could not.

The first article I saw had me pull up the local Security settings Management console. I can't remember how they had me do that. But, when I clicked on "Allow log on Locally", the option to "Add user or group" is grayed out.

I found another article here. Here are the steps to use the Default Domain Controller Security Settings instead. This gave me the choice to add users or groups.
  1. Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.
  2. Double-click the Security Settings folder, double-click Local Policies, and then click User Rights Assignment.
  3. Under the Policy column, click Allow Log on Locally, and then click Add.

I created a group called iGoldmine and added it to this policy. Now any user I add to that group can use iGoldmine.

ISA 2004 and iGoldmine

A few months ago I moved my sales staff to a new server. This put them on a seperate network with it's own internet connection. I have needed to get iGoldmine up and working but I had not done that. Until today. And it was a pain, which I actually started day before yesterday. The first nightmare was that my machine wouldn't reboot after installing iGoldmine. Turns out they have an incompatibility with one of the microsoft updates.
This is always a problem with goldmine. I am not real pleased with igoldmine but I have no other options owing to the fact that we use goldmine and want remote access. Anyway, the solution was to apply the iGoldmine patch in safe mode. Then I had to remove an icompatible windows patch after that. Pain in the but. This is a patch from back in April, 4 months ago. You would think they would get it fixed.
Anyway, after getting it installed, it worked from inside the firewall, but not outside. Goldmine tech support of course was of no assistance and said they dont' support firewall configurations, which is typical of their support, they are extremely unhelpful even though I am sure they have thousands of customers with the same issues. I didn't find much, other than people asking the same questions, in the forums.
So here is how I finally got iGoldmine working through my ISA 2004 firewall(I know you might think it so much more than a firewall and it may well be, whatever).
I am on Small Business Sever 2003, if that makes any difference to you
  1. Open "Microsoft Internet Security and Acceleration Server" Management Console.
  2. Click on your server
  3. Click on "Firewall Policy"
  4. Right click and chooose New/Access Rule (or click "Create a New Access Rule" int he task menu.
  5. Name it what you want, I chose "iGoldmine". Click Next
  6. Choose "Allow". click next.
  7. For "This rule applies to" choose "Selected Protocols"
  8. Click Add
  9. Now you are at the "Add Protocols" Window.
  10. You will notice at the top of the protocol "type" list there is 3 menus. New, Edit Delete. Edit and Delete may be grayed out if you haven't selected a protocol
  11. Click New, then Choose Protocol
  12. Give it a name, I like to confuse myself so I called it "iGoldmine". Same name, but this is a protocol and not an access rule.
  13. Choose New in the "New Protocol Definition Wizard"
  14. You want the following: Protocol Type:TCP, Direction:Outbound:Port Range from 491 to 491. Probably the only changes you need to make are to the port range values, the rest are probably defaulted correctly.
  15. Click Ok
  16. Click new again
  17. This was the one that got me. You need an inbound filter for port 80.
  18. Protocol Type:TCP, Direction:Inbound, Port Range From 80 to 80. If you don't use port 80 you will need to change this in the iGoldmine cluster manager, but you do have that option
  19. Click ok
  20. Click Next
  21. Choose No on Secondary Connection, Click next.
  22. Click Finish
  23. No to add them you will need to find them in the "Add protocols" window. Probably the easiest is to choose All protocols and find them in alphabetical order. You ned to choose the ones you just added and click add to add them to the protocols section of the New Access Rule Wizard.
  24. Click close once you have done that.
  25. Click next
  26. Access Rule Sources. Choose External. Click next
  27. Access Rule Destinations. Choose "Local Host"
  28. Click next
  29. Leave default "All Users", Click next
  30. Click Finish.
That should do the trick. It should work immediately.
The next problem I had was giving users log on local rights. I was able to logon immediately after the above as an admin on the iGoldmine server, but regular users could not until I made some changes. I will talk abou that in my next post.

Monday, August 06, 2007

"Error 15023: User or role '%s' already exists in the current database."

Got this error recently when I downloaded a clients database from a shared host to my local machine. Tried to add the same user.

This article resolved it for me: http://www.codeproject.com/database/OrphanedSQLUsers.asp.

Here is the SQl that I ran "sp_change_users_login 'auto_fix', 'user'"

Friday, August 03, 2007

Tethering my Blackberry to my Laptop

When I first got my blackberry one of the things that interested me was the fact that I could "Tether" myh blackberry to my laptop. Which means that I could use my blackberry to get high speed internet access from anywhere I could use my cell phone(blackberry) Well the software to allow that didn't work with Windows Vista, so I kind of forgot about it for a while. Until today. I figured out that the motel my wife had got from hotwire didn't have high speed internet(I always try to remind her how important that is for me).

Anyway I called verizon and had them add the $15 a month thing that I needed for this to work and got instructions on how to download the software that I needed. The told me to go to http://www.vzam.net/. After driving around for about an hour I finally found an open wireless connection and was able to download the VZAccess Manager that I needed.

Wow. Here I am sitting in the middle of a big parking lot at some factory stores near Park City Utah, checking email and doing other tasks. And it was fast. I had a full bar EVDO connection and it screamed. The connection back at the motel is only 2 bars and it is bearable for email and surfing, although noticeably slower.

Turns out this "Motel" is actually condos and there was a DSL modem sitting on the floor unplugged. I plugged it in and I have DSL so I didn't even really need to set up the Broadband access with verizon, but hey I will be getting stuff done while the family is school shopping so I am going to stick with it for at least this month. Where I live, we don't have the EVDO towers. I wish verizon would get that rolled out to all their towers.

David Mineer

Thursday, August 02, 2007

Ten ColdFusion 8 OneLiners

Ten ColdFusion 8 OneLiners

Blog entry about some of CF8's best new features.

Wednesday, August 01, 2007

Importing Outlook Email into Google Apps (Gmail)

Here is an article about different ways to import existing email into your new Google Apps account.

http://www.hanselman.com/blog/MigratingAFamilyToGoogleAppsFromGmailThunderbirdOutlookAndOthersTheDefinitiveGuide.aspx

This is mentioned in that article, but looks like a tool to make some migrations very simple: http://www.limitnone.com/products.php

Maybe not free, but what is your time worth?

Saturday, July 28, 2007

Yslow for Firebug

As mentioned in Sean Coorfield's Blog. Yslow for firebug is a great little utility to use on your own web site.

Friday, July 27, 2007

The proper way to ask questions in newsgroups and other forums

Sean Corfields blog had a great post about blunt to the point article about posting quesitons to newsgroups, email lists and other forums for technical answers. I am one that is always nervous to ask a question, but this does not offend me, yet instead offers some good insight on the effort we should all take before we expect someone else to spend their valuable time helping us. There are alot of people that offer alot of help and to them I am grateful. The article:

http://www.catb.org/~esr/faqs/smart-questions.html

Tuesday, June 26, 2007

Problem Rotating Images

Several Times my users have complained to me that they were unable to rotate images using windows picture and fax viewer. This seems odd to me because they can rotate other pictures, just not some.

Anyway I found an article that provided the fix for this:

http://groups.google.com/group/microsoft.public.windowsxp.photos/browse_thread/thread/bf93b6a7f38c2520/68e7606cddf2dd30%2368e7606cddf2dd30

Just click the ctrl and X button in windows picture and fax viewer and it will reset the warning message, which, if you choose yes to go ahead anyway will rotate the picture.

Yep, as simple as getting the dialog box back. I guess you just have to answer the dialog box each time.

Tuesday, May 29, 2007

Next N records, paginated sql server results

I have several places on my web site where I let the user page through search results and recordsets. Usually this is inneficient because your return all resulsts and essentially hide everything but the rows they want to see. This is very inneficient and the only examples of doing this correctly were difficult at best.

Well, with SQL Server 2005 there is a new feature - ROW_NUMBER() that makes this simpoler to implement. Not 100% intuitive but I was able to figure it out. The following link is a good tutorial that helped me:

http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx

Thursday, May 24, 2007

Dynamic SQL Where statements

I was trying to figure out how to use an if statement in the where clause of a sql statement. I came across this article that explains the use of coalesce. This is a great way to handle this.

http://www.sqlteam.com/item.asp?ItemID=2077

SELECT Cus_Name,
Cus_City,
Cus_Country
FROM Customers
WHERE Cus_Name = COALESCE(@Cus_Name,Cus_Name) AND
Cus_City = COALESCE(@Cus_City,Cus_City) AND
Cus_Country = COALESCE(@Cus_Country,Cus_Country)

Read the article to understand it. Basically if there is a value provided to the stored procedure then the comparison is done. If there is no value it essentially includes all records or (matches itself). I know, that doesn't make sense.

Thursday, May 17, 2007

Setting Parameters in Crystal Reports .NET

Well, I missed the post about setting parameters. That was one of the puzzle pieces too and I got lazy and didn't post about it. Here it is.

Setting Parameters in Crystal Reports .NET

A number of methods out there use the CrystalReportViewer control to set parameters. That's great unless you need to export your report to PDF (or XLS or RTF). This is a code snippet I use, it comes from Business Objects tech support:

rptCount = New ReportDocument
rptCount.Load(Server.MapPath("reportname.rpt"))

''Get the collection of parameters from the report
crParameterFieldDefinitions = rptCount.DataDefinition.ParameterFields
''Access the specified parameter from the collection
crParameter1 = crParameterFieldDefinitions.Item("Param1")
crParameter2 = crParameterFieldDefinitions.Item(“Param2")

''Get the current values from the parameter field. At this point
''there are zero values set.
crParameter1Values = crParameter1.CurrentValues
crParameter2Values = crParameter2.CurrentValues

''Set the current values for the parameter field
crDiscrete1Value = New ParameterDiscreteValue
crDiscrete1Value.Value = Request.Form(“param1value“)

crDiscrete2Value = New ParameterDiscreteValue
crDiscrete2Value.Value = Request.Form(“param2value“)

''Add the first current value for the parameter field
crParameter1Values.Add(crDiscrete1Value)
crParameter2Values.Add(crDiscrete2Value)

''All current parameter values must be applied for the parameter field.
crParameter1.ApplyCurrentValues(crParameter1Values)
crParameter2.ApplyCurrentValues(crParameter2Values)

Crystal Reports Database Login

The last major piece of my puzzle. This code lets me pass database and login information.

http://diamond.businessobjects.com/node/134

VB.NET
---------

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared


Dim crtableLogoninfos As New TableLogOnInfos()
Dim crtableLogoninfo As New TableLogOnInfo()
Dim crConnectionInfo As New ConnectionInfo()
Dim CrTables As Tables
Dim CrTable As Table
Dim TableCounter

'If you are using a Strongly Typed report (Imported in
'your project) named CrystalReport1.rpt use the
'following:

Dim crReportDocument As New CrystalReport1()

'If you are using a Non-Typed report, and
'loading a report outside of the project, use the
'following:

Dim crReportDocument As New ReportDocument()

crReportDocument.Load("c:\myReports\myReport.rpt")

'Set the ConnectionInfo properties for logging on to
'the Database

'If you are using ODBC, this should be the
'DSN name NOT the physical server name. If
'you are NOT using ODBC, this should be the
'physical server name

With crConnectionInfo
.ServerName = "DSN or Server Name"

'If you are connecting to Oracle there is no
'DatabaseName. Use an empty string.
'For example, .DatabaseName = ""

.DatabaseName = "DatabaseName"
.UserID = "Your User ID"
.Password = "Your Password"
End With

'This code works for both user tables and stored
'procedures. Set the CrTables to the Tables collection
'of the report

CrTables = crReportDocument.Database.Tables

'Loop through each table in the report and apply the
'LogonInfo information

For Each CrTable in CrTables
CrTableLogonInfo = CrTable.LogonInfo
CrTableLogonInfo.ConnectionInfo =
crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)

'If your DatabaseName is changing at runtime, specify
'the table location.
'For example, when you are reporting off of a
'Northwind database on SQL server you
'should have the following line of code:

crTable.Location = "Northwind.dbo." &
crTable.Location.Substring(crTable.Location.LastIndexOf(
".") + 1)
Next

'Set the viewer to the report object to be previewed.

CrystalReportViewer1.ReportSource = crReportDocument

Thursday, May 10, 2007

Crystal Reports Export to PDF

Well, I finally did it. The code below is what lets me export a crystal report to a pdf file. Previous entries outline some of the steps I have taken to get here. Not sure if all were necessary but it works. No I have to figure out how to pass parameters, datasource and login information. On to figure that out.

Option Strict On
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class _Default
Inherits System.Web.UI.Page
Private exportPath As String
Private myDiskFileDestinationOptions As DiskFileDestinationOptions
Private myExportOptions As ExportOptions
Private myReport As ReportDocument
Private selectedNoFormat As Boolean = False
Private Sub ConfigureCrystalReports()
myReport = New ReportDocument()
myReport.Load("C:\websites\rpt\report1.rpt")
'myCrystalReportViewer.ReportSource = myReport
End Sub

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
ConfigureCrystalReports()
ExportSetup()
myExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
myDiskFileDestinationOptions.DiskFileName = exportPath & "PortableDoc.pdf"
myExportOptions.DestinationOptions = myDiskFileDestinationOptions
myReport.Export()
End Sub
Public Sub ExportSetup()
exportPath = "C:\Exported\"
If Not System.IO.Directory.Exists(exportPath) Then
System.IO.Directory.CreateDirectory(exportPath)
End If
myDiskFileDestinationOptions = New DiskFileDestinationOptions()
myExportOptions = myReport.ExportOptions
myExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
End Sub
End Class

Tuesday, May 08, 2007

Use a javascript confirm box to ask the user if they want to delete.

Found this here: http://psacake.com/web/iw.asp

Monday, April 30, 2007

Crystal Reports XI on Windows Vista

http://support.businessobjects.com/downloads/service_packs/crystal_reports_en.asp

Talked to tech support about this and this was the link he gave me for the new build that is vista compatible.
Crystal Report Viewer missing images

I think I mentioned in a previous post that I had done the server install for the .net crystal report viewer appication or whatever you want to call it. Everything worked except for the images on the toolbar weren't showing up. I found this post concerning that which fixed my issue:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=566717&SiteID=1

Look at the post marked as the answer.
Tutorial: Exporting to Multiple Formats

I have been eager to get back to the office and continue my quest to get Crystal reports exporting to .pdf. Today I worked on a tutorial to export to different format. I am mainly interested in .pdf but the tutorial went through exporting to many different formats. The link to the tutorial is below.

http://msdn2.microsoft.com/en-us/library/ms227606(VS.80).aspx

I didn't hit many roadblocks. This tutorial does not show you the exported file, it only gives you a message of success or failure. You have to browse to the location of export (Default: C:\exported\) to see the file that was created. I am sure a redirect wouldn't be too dificult, but I can do that later.

Now, on to passing parameters to the reports.

Dave

Friday, April 27, 2007

Crystal Reports and the Web Part 2

Here I am 7 hours later and I have been pretty good today to focus on the issue at hand. Deploying crystal reports to my web server. I had to learn .net from almost scratch cause I have never used it before.

I did it. Got it working. If I had to do it over again, I could do it alot quicker. I hope these notes will benefit somebody.

My Setup:
Dell Lattitude D820 Windows Vista Business
Server: Windows 2003 (Hosted)

  1. Install Visual Studio 2005. I got a free 90 day trial from Microsoft. After today I am almost positive I will buy it. Seriously, The time I saved on this one project will pay for the $700 or so that it costs. Without it I could have spent week(s). In fact I did spend several days without success last year on this.
  2. Installed SP1 for Visual Studio
  3. Installed SP1 Update for Visual Studio for Windows Vista(I first tried to install just this file, but come to find out you need the main Service Pack installed first.
  4. Installed SP2 for MSSQL Server Express
  5. Then I found the tutorial here: http://msdn2.microsoft.com/en-us/library/ms225276(VS.80).aspx
  6. I followed the developer link.
  7. Next I clicked on the link "Persisting the ReportDocument Object Model Using Session" This seems a little strange, I know but it has a good step by step tutorial which I followed.
  8. You will notice all the resources on the left under the Crystal Reports heading. 80% of the information I found was from this MSDN site.
  9. Some search results from the MSDN Site: http://search.msdn.microsoft.com/search/Default.aspx?brand=msdn&locale=en-us&query=crystal+reports
  10. One thing I got sidetracked on was installing IIS on my laptop (Dev Machine) That is unnecessary. Visual Studio has a development web server built in. The way I found to use it was to right click on the "default.aspx" file in the solution explorer and choose "View in Web Browser". This starts the devel0pment web server and lets you view the page.
  11. The tutorial was detailed enough that I didn't really stumble to much in that section.
  12. On the server side I had a few problems. Yesterday I had installed Crystal Reports XI SP 2. This, I think is unnecessary. I didn't uninstall it since I already had it, but the key to making it work on the server was downloading this file: http://support.businessobjects.com/communityCS/FilesAndUpdates/crXIr2_net_server_install.zip.asp
  13. The page with the link to that file is here: http://support.businessobjects.com/downloads/merge_modules.asp#06
  14. I used this download: "Crystal Reports XI Release 2 for Visual Studio .NET Server Install - This file contains the Server Install file for Crystal Reports XI Release 2 for Visual Studio .NET."
  15. That worked great, after I installed that on my server, it was working.
  16. The only problem left was the icons on the toolbar for the crystal report viewer are not showing up. I will troubleshoot that later.
  17. I created a simple test report with no datasources and just a little text to test it and it worked.
  18. Other Helpful links:
  19. http://www.businessobjects.com/products/dev_zone/net/2005.asp
  20. http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf
  21. http://msdn2.microsoft.com/en-us/library/ms225593(VS.80).aspx
  22. There was alot of talk about building an msi installation package. I played with that in different sorts of ways until I finally found the server install package listed above. I think that if you just install that, you won't need to try and package the crystal report stuff, you get them from that install.

Monday I work on passing parameters and programatically outputting to .pdf. And I have to figure out why the toolbar icons don't show up.

Dave

Crystal Reports and the Web

For years I have been using crystal reports to output the contents of our database to a nice newsletter format. I use coldfusion for most programming and I started by using a web viewer that came with version 8 or something. Then I found an .asp page that would pass parameters to the report and export it to .pdf. This was perfect, although it felt very "kludgy". Well now I am faced with an upgrade of Crystal reports and a new server. It just seems impossible to find anything that will let me use coldfusion to directly call a report and output it to .pdf.

So, I start my first trip into the .net world. I only know that crystal reports integration with .net is fantastic. Now we see how fast I can get up to speed on .net.

I will try and keep you posted. I just downloaded 90 day trial of visual studio 2005. Service packs are downloading now. We will see if this is as easy as they say.
New Blackberry

Last friday I ordered a new blackberry phone with Verizon. They messed up that order so yesterday I finally just went downt ot the store casue it is only an hour anyway. Well they set me up in a hurry and now I am the proud owner of a blackberry 8703e. This phone is cool. It just acts the way you would expect it to.

I mostly wanted this phone for the calendar and tasks, along with some email. I once had a dell axim, which was nice but I never used it because it was an "Extra" thing to take with me. This blackberry just combines the axim with a phone so I always have it with me. Maybe now I will use it.

I decided on the blackberry over the Motorola Q or Treo mainly because two different guys at Verizon said the blackberry was better. I haven't regretted the dicision yet.

Thursday, April 26, 2007

Recover Admin password for Google Apps

I set up a google app account for a buddy some time ago and he called because he couldn't log on. I tried with the admin info I used to set up the account, and I couldn't get on either, even though I swear I had the right info. Well If ound a solution to resetting it.

You can follow this link:

https://www.google.com/hosted/replaceDomain/forgetAdminPassword

You need to replace "replaceDomain" with the the domain with the forgotten password and then use the login for the account that you used to set up the google app account in the first place.

This is just for admin password. If it is just a user password, you can login as admin and reset that for them.

Tuesday, April 24, 2007

Cannot open/design report in MSAccess

I just had a recent issue come up where all of the sudden I could not open any of my reports in an access database that I use.

Turns out that it had to do with a printer that I just installed. After searching and finding a comment about that, I changed my default printer and that fixed the problem. I had just hooked up an HP Laserjet 1012 to my Dell Lattitude via the docking station.

Friday, April 20, 2007

Where to put Transfer code

There was a great email sent to the transfer list about design and architecture in your apps using transfer ORM. I put alot of my stuff in my controller. So essentially I follow the first example, when everyone else seemed to agree that the second example was better.

Have a look:

http://groups.google.com/group/transfer-dev/browse_thread/thread/1574d19bfad50946?hl=en

Thursday, April 19, 2007

Mcafee Security Suite Blocks Hotel Internet Access

I have blogged about my new Dell laptop before. I love it. I figured out running programs in windows xp compatibility mode and my only problem (not being able to run some programs) is not as bad anymore.

Anyway, over Easter the family went to Phoenix for the weekend. We left thursday night because the kids were out of school. First stop, Flagstaff. After a ruckus at the hotel we had reservations at, we ended up at the days inn.

Booted up the old laptop at 5:00 A.M. the next morning. NO INTERNET ACCESS! I tried everything. Got dell tech support on the line(North American Based). Nothing. Well I was ticked, but figured it was the motel. Next night, Super 8 in Gilbert AZ. Same thing. Finally, saturday morning I took a shot and uninstalled 3 of 4 components of the Mcafee security suite that came on the computer. Spam(I use gmail anyway), privacy control, and one other I can't remember. I left only virus scanning. BINGO. It worked. I don't know why I didn't try this in the first place. I have never used the "Security Suites" cause I have problems with clients who use them all the time. Something about the security suite and the internet access at the hotels didn't jive. I assume it was something to do with that redirection that happens when you first login. You go to the motel web site and have to click the agreement or whatever.

I should send Mcafee and email. Maybe I will

Friday, March 09, 2007

How do I use a variable in a TOP clause in SQL Server?

http://sqlserver2000.databases.aspfaq.com/how-do-i-use-a-variable-in-a-top-clause-in-sql-server.html

I have a web page that runs a script which is so slow that it will time out if the number of records is too great. The temporary solution is to split the records into two subsets and then process those sets seperately. Doing that manually was not too big of a deal, but I wanted a better way.

I calculate the number of rows / 2.
Then I needed to use that value to automatically split the set. The only thing I needed to change was the brackets around the variable. So it turned out to be this:

Select top (@myvar) from mytable.

The article goes way more into depth

Sunday, March 04, 2007

Dell Latitude D820

I am just one month shy of the 3rd birthday of my existing laptop, a Dell inspiron 8600. It still runs ok, but takes forever to boot up and is slow enough that I knew I needed to get a new one.

So, I ordered a Dell Latitude D820 that arrived last thursday on Mar 1. I love this computer. Of course it was a huge upgrade from the 3 year old laptop It replaced. It has Windows Vista Business on it, 2 gig of ram, 15.4 in monitor and I added a port replicator to it.

I am testing the waters with this machine to be a desktop replacement. I don't know how it will work but I would love to be able to sit down anywhere and be just as productive as I am sitting at my desk in the office. With our recent subscription to google apps, and buying a dedicated hosted server, we are really trying to go in a direction that supports remote users.

We really don't buy anything but dell and I have always been very pleased with the equipment we have received from them. This laptop is no exception. It is screaming fast and I am loving it. I have installed most of the essential software that I use and it handles it all no problem and still is fast.

David Mineer
Windows Vista

I purchased a dell latitude D820 that arrived last thursday on March 1(more on the new computer later). It came with Windows Vista Business. I thought I would share some of my first impressions about Microsofts new operating system.

I like it. It is intuitive and just seems to click for me. I haven't had too much trouble finding my way around. This laptop is awesome so of course speed doesn't seem to be a problem. The start menu is probably what has given me the most grief, but after I figured out that I could find what I was looking for simply by searching, that has been ok. I still need to take some time and figure out the start menu without searching.

Searching seems to be greatly improved in vista. Most programs have run ok, but there are a few that won't.

Overall I am impressed. The more I understand it the more It will be ok. I am not sure but I think I am using the upgraded "Halo" version and it is visually appealing and everything seems to flow pretty smoothly.

Wednesday, February 28, 2007

java.net: ColdFusion for JSP Developers

java.net: ColdFusion for JSP Developers

A great article that explains why Java developers should consider Coldfusion for some of their development. It has some advantages and since it is written in Java, the skill set of Java Developers is not lost.

I don't know Java at all, but, nice to feel a little like coldfusion is in the family, if only distant.

Remote Synthesis: Mach II or ColdSpring? Understanding the Differences Between ColdFusion Frameworks

Remote Synthesis: Mach II or ColdSpring? Understanding the Differences Between ColdFusion Frameworks

This is a super article that does what the title says. I wish this would have been written when I was first trying to understand all this.

Installing IIS 7.0 on Windows Vista Business or Vista Ultimate

Installing IIS 7.0 on Windows Vista Business or Vista Ultimate

I just got a new laptop and I need to install IIS and Coldfusion. Here is a simple, to the point article on installing IIS 7.

Monday, February 26, 2007

Refreshing web services

Are you trying to create web services with CFMX, but for some reason when you make a change it is not picked up. One of those things that can frustrate you to no end. Coldfusion makes a list of web services you create and you can view them in the administrator. You can also create them in the administrator. But the key here, is you can refresh them in the administrator also.

Open your administrator for the server that publishes the web service, login, and go to Data & Services > Web Services. There you will see the services and you can refresh, delete or add.

A good article with more about it and how to do refresh web services without opening up the administrator can be found here, by Charlie Arehart.

Tuesday, February 06, 2007

Hosting

About a month ago I bought a shared server account at hostmysite.com. They come highly recommended by the Coldfusion community and I definately want Coldfusion support, especially some tags that most providers prohibit, such as cfobject.

I first moved my ftp site over to this hosted account. I have users that send images back and forth to each other. Now, instead of all fighting for bandwidth on my DSL link to servers inhouse they now share a Huge pipe of bandwidth at my hosts site. I don't see a downside to this.

A few weeks ago I made the jump to a dedicated server. I haven't moved the ftp over to that site yet, but i am planning to host as much as I can. Hostmysite is awesome and for not much money I feel like we just hired a 24/7 systems admin. We also get security, backups, redundancy and many more features.

Having private company information off-site may seem scary to some but they are much better equipped to protect my data than I am. One guy can only do so much. Our company has grown to a point where we needed to hire additional IT staff. Hosting is a much more cost effective and reliable way of doing this. I am pleased so far.
Goldmine and Gmail

I want to move my main domain to a hosted email service, Google apps for domains. I know this domain generates a lot of email traffic so how nice not have to worry about that.

Our sales department uses goldmine. This means they use the email interface inside goldmine to allow them to attach email communications to the prospects they are associated with. Goldmine does not support SSL in their email client. The work around can be found at this site:

http://www.castellcomputers.com/index.php?p=2. Be sure to read comment #1 as it includes an important change to the stunnel.conf file.

Also, Don't click on the link to the stunnel.eze file. Go to the page and get the latest. I noticed that the newer versions have the ability to install stunnel as a service and I am not sure some of the older versions have all those features.

I tested this on my machine and it worked great. No I am one step closer to being able to host my email.

Tuesday, January 30, 2007

Transfer ORM

ORM stands for object relational Mapping. I am not sure I understand everything it does yet but I do know that it automatically creates CRUD DAO objects. I use to spend hours writing beans, DAO's and gateways. Well, Transfer does the beans and DAO's automatically and even some of the simple gateway queries.

Previously I had been using http://rooibos.maestropublishing.com/ to generate beans and then I would cut and past generic DAO code for the CRUD methods. CRUD stands for Create-Read-Update-Delete. The standard things you do to an "object" or row in a database.

Setup is probably the most difficult, as anything else, especially the first time you attempt it. In Transfer you have to download the open source code from: http://www.compoundtheory.com/?action=transfer.download or you can get the latest BER (Bleeding Edge Release) via SVN at http://svn.riaforge.org/transfer .

You place this code in your root directory. You will then have a "transfer" directory under web root.

you need to initialise the transfer object, which I did for my test in my application.cfc file. You can just do it on a page if you want. You can get further instructions here: http://www.compoundtheory.com/?action=displayPost&ID=112. This page also offers examples of using Transfer for the basic CRUD operations.

Once you define your datasource and your table in datasource.xml and transfer.xml. It is this easy to get a row from the database:

transfer.get("user.user", userid).

Want a query of all users:

transfert.list("user.user")

It took me about as much time to figure out how to use the basics of transfer as it would have to generate all the DAO, Bean and simple Gateway methods for 1, maybe 2 projects, but now I can save my self tons of time not having to create those anymore.

I am amazed at the creators of such "frameworks" as transfer. They are wicked smart and provide a real value to me. Thanks to Mark Mandel and any others who devote their time and smarts.

Wednesday, January 17, 2007

Invalid Color Space error in Acrobat Reader

Had a user that was getting this error when trying to read an acrobat attachment that I sent her:
 
"Invalid Color Space"
 
This prevented her from seeing some of the images I had put in the document.
 
http://www.abcteach.com/help_topic.php?id=134 mentioned that this error would be resolved by upgrading your acrobat.

Tuesday, January 09, 2007

Google Apps for Your Domain

You can host your email for free using google Apps for your domain. This is awesome. You set up an account, point your MX DNS record for your domain as per the instructions and wallah! Google handles all your email for you and your users.

I set up one of my domains to use it and it works great. It did take one of my networks 3 days to get the dns changes but when it kicked in it worked just as I hoped. Check out the benefits:

Google Apps for your Domain

The have a few other things than just email, and I am sure they will add more.

There are a couple of downsides to this. Your email is hosted outside your company. I currently don't have a way to connect to gmail using CFMAIL.

The upsides are huge though. They take care of software, bandwidth, spam filtering, administering etc.. Lots of reasons to take advantage of this.

Friday, January 05, 2007

156 Useful Run Commands.

Interesting article about run command you can issue in windows. As it states, most are available via the GUI interface of windows, but there are some nifty ones that you may find usefull.

http://www.fixmyxp.com/content/view/20/42/
I have been using subversion for a few months now and I love it. It has been my first real run at source code control. I installed subversion locally on my development machine. This was a little difficult but I haven't had a moments problem with it since I installed it. The one drawback is accessing the code repository from remote locations. And there is also the matter of backing up and updating.

Several times I have thought about finding a subversion host online, but the meager attempts I made were not succesfull. But I came across one a few days ago and took the plunge. It was a peice of cake. For testing I started a new project. I just sent support and email about importing the existing project I had. Everything is the same. Only know I don't have to worry about backups of my code and updates of the subversion software. And best of all I can access the code from my latpop at home or wherever. It is $15.00 a month. I price I feel is fair. I had I small issue I sent to tech support and the resonded very quickly

So far so good. The site:

http://www.wush.net/
A site I came across when looking for ftp hosting. Looks like the offer other stuff too and great prices and functionality.

http://www.siteground.com
Here is a great link that explains mapping network drives when a user logs in to small business server.

http://msmvps.com/blogs/kwsupport/archive/2004/11/03/17830.aspx

Tuesday, January 02, 2007

We have some fields that we want to default to a certain value in Platypus. The main one is the suppress receipts filed. A while back, platypus support sent a script to make this work. It never did. Turns out they had a slight error in the script. The sent me the corrected script last week:

insert into options (name, value, descriptio, category) values ('Default Suppress Receipt','Y','The default Suppress Receipts option for new customers.','Customer Defaults')

This worked, but not until I deleted to old incorrect value out of the options table. I also restarted platypus. One of those two things made it work.

This gave me the idea for another field also. On my own I did the following:

insert into options (name, value, descriptio, category) values ('Default Suppress Statements','I','The default Suppress Statements option for new customers.','Customer Defaults')

This now enters the correct default value for the Suppress Statements field. I am not positive how it works, but it appears that you can add a row to the options table to cause default values. Just have to use the word "Default" in front of the actual field name. Should work for any field, at least on the general tab.

Friday, December 22, 2006

I am in Las Vegas to see the Vegas Bowl. BYU vs Oregon. The first quarter was ok. Neither team scored. Both made offensive errors. BYU dropped several easy passes, and Beck had some bad passes. After that it was all BYU. Oregon just didn't play well tonight. They finally scored in the 4th quarter on a long TD pass. They really didn't do anything all night.

The highlight was at the beginning when volunteers from Nellis Air Force base rolled out a football field size American Flag. Then the during the National Anthem, 2 air force jets flew over and hit the afterburners right above us. COOL! Definately the highlight of the evening. I want to take my boys next year so they can experience this.

Wednesday, December 13, 2006

My users have been requesting a seemingly simple feature for a while now and I could not get it to work.
 
When they enter a value, they are prompted with a javascript confirm (Ok/Cancel) box if the value is over $1,000,000.  If the choose "OK", no problem.  But when they choose cancel, they wanted to be put back in that same field.  I should just be able to do the following:
 

function checkValue(){

if (document.getElementById('valuation ').value >= 1000000){

if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){

}

else {

document.getElementById('valuation').focus();

}

return false;

}

}

I was able to set focus to any field, except the one I just came from.  The only hack I was able to find was to set focus first to another field, then the field I came from and then use the follwing in my <input> statement.  

onFocus="this.select()"

Here is the javascript function I had to use:

function checkValuation(){

if (document.getElementById('valuation').value >= 1000000){

if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){

}

else {

document.getElementById('otherfield').focus();

document.getElementById('valuation').focus();

}

return false;

}

}

 
-------------------------------
David Mineer

Tuesday, December 12, 2006

I just found out that I can have the contacts on my cell phone backed up automatically. Not only that, it provides a web interface for adding, updating and deleting the contacts on my phone. I have a verizon phone and you can find out about it at:

http://www.verizonwireless.com/backupassistant

It does const $1.99 a month. But as often as I drop phones in a glass of milk, it is worth it to me.

Several of my users have been complaining that iGoldmine was not working for them. I am not sure when it quit because iGoldmine sometimes doesn't get used for weeks at a time. But I was pretty sure it was working until sometime in November maybe even towards the end of November.

Anyway, I started researching this and came to find out that I could not run the goldmine executable which is on a network share, from the machine running my iGoldmine server. The iGoldmine server is W2K 2003 server and is just a member server of my domain. The error I was getting when trying to run the goldmine executable was:

"windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

I decided to try and run some other .exe files on different network drives and sure enough, same error on all of them.

Goldmine tech support is usually awesome, but this time they just pooped out on me and had me so mad I had to go get a Dr Pepper to settle down. They didn't want to help at all.

Turns out the issue was with the Internet Explorer Enhanced Security Configuration. You can get to this in Control Panel-Add/Remove Programs/Windows Components/. After that you can check or uncheck the two options: "For administrator Groups" and "For all other user groups". Both were checked, so I unchecked them and then I was able to access files over the network.

I didn't have the same problem logged in as myself. I was able to run those files, other users, however could not and hence the problem. There must have been a windows update that changed the IE config and hence caused this problem. I would have thought the Goldmine folks would have encountered this already, cause it has probably been a month or so.

Friday, November 03, 2006

I was changing around some javascript on one of my pages and came to a piece where I wanted to access a variable several times. I remembered using a "with" statement when doing some programming Visual Basic for Access. I looked up the with statement and found out that it is not recommended to use.


alert(document.title);
alert(document.body.tagName);
alert(document.location);


Here is the with Statement:


with (document) {
alert(title);
alert(body.tagname);
alert(location);
}



"It is another scope. When you use the with statement, you are forcing the interpreter to not only look up the scope tree for local variables, but you are also forcing it to test each variable against the object specified to see if it's a property" - "Professional Javascript for Web Developers, Nicholas C Zakas, p 581

Monday, October 30, 2006

I have a dynamic region and I wanted blank lines to not show. I have owners listed with companies, but sometimes there isn't an owner name, just the company name. I use the /br/ to go to the next line to get a "Mailing Label" type layout, if there was no owner then there would be a blank line.

The solution would normally be to use a /cfif len(fieldname) = 0/ Since this is a dynamic spry region, that doesn't work. I found the solution in the forums:

spry:if examples

My version of the code is:

-span spry:if="'{FIRSTNAME}' != '';"-

Friday, October 27, 2006

Trying to a seemingly simple thing before going live with the AJAX code I have been working on. I don't want pressing the enter key to submit the form when a field is in a particular field. This turned out to be harder than I thought. But here is the code that does it:

Include the following element into the head part of your document:

/script type="text/javascript"/
function noenter() {
return !(window.event && window.event.keyCode == 13); }
/script/

Add the following attribute into each input type="text" tag(s) in your form:
onkeypress="return noenter()"

The function has to go in the header on the page. It didn't work for me putting it in an included .js file.
Still struggling with the grouping thing. The interim sort-of workaround was to just flatten the whole thing out. Like this.

here is what I want

company1
contact1
contact2
company2
contact3
company3
contact4
contact6
contact7
company4

This is what I have to do for now.

company1 contact1
company1 contact2
company2 contact3
company3 contact4
company3 contact6
company3 contact7
company4

Redundancy and not what I want but it does allow me to go live with the ajax portions of the code and not break the app. We will see what the users think.
Spry and grouping. I have a spry dynamic region that returns a list of companies that my user searches for. Well, each one of these companies can have 1 or more contacts attached to them. Currently, when they search, a popup page is presented with a list of companies that match their search value. As I Output the query, I use a contact object that gets all contacts for that company. (contact.getContact(companyid)). This is easy in Cold Fusion.

In spry however, I cannot figure out how to do it. I can output the list of companies, and I can write an onclick so that when I click on their name, the associated contacts are listed, but I can't list those contacts below the name of the company, I can only create the dynamic region for the contacts outside the company dynamic div.

I am still researching this and hoping to find a workaround. I did notice that there are some posts about grouping the spry forums, but all that is said is that it will be added to the list for future upgrades. This was back in the beginning of August. Maybe there is something available now.

Thursday, October 26, 2006

This was a post I found on the labs forums site at adobe, but I can't find it for the life of me right now. Before the IE caching problem neither firefox or ie were loading the new data after I updated the database and it turned out to be an internal spry caching problem. The following comes for the posting in the forum. The key for me was the useCache:false part that you stick at the end of the Spry.Data.XMLDataSet call.

If you're going to be updating the data set by re-loading the same URL, make sure you turn caching off:



After that, you'll want to define a function callback that will be triggered *after* your server request to update the record:


function UpdateRecordCallback(req)
{
// We just finished updating a record, force myDataSet to
// reload the data from the server so our regions auto update.

myDataSet.loadData();
}


Then use the loadURL() utility function to send your request. You'll have to pass your callback function to loadURL so that it gets called when the request succeeds:

function UpdateMyRecord(recordID)
{
Spry.Utils.loadURL("GET", "closetesrecord.php?id=" + recordID, true, UpdateRecordCallback);
}

...

While I was having the problem with caching, I was also in a not so bad problem. IE was giving me errors when Firefox was not. I was getting two different errors on an href onclick event.

When you call dynamic fields in a spry dynamic region you format them like this: {FIELDNAME}. So I had an href like this:



Firefox had no problem with this. IE, however, was having a problem and I couldn't figure it out. Finally figured out that I had to have single quotes around the spry dynamic vars like this:



That was only needed inside the onclick event, not outside. Small thing and the error didn't seem to effect the functionality, but you hate for users to get the little error each time the page loads. Makes everything seem just not right.
Building an AJAX interface for my data entry app. Was stuck trying to get a dynamic region to refresh. Turns out IE has some caching issues. I found the following page that, if you read the comments gives a pretty thorough explanation of the problem that I was having.

http://ajaxian.com/archives/ajax-ie-caching-issue

Of course I am using cold fusion and the answer was to put the following line at the top of my xml page.



I spent several hours trying different things. I had just upgraded to ie 7 and thought that could have been part of the problem. It was working just great in firefox. Glad it was an easy fix, wish I would have figured it out quicker.

I am using the adobe spry framework for AJAX. It is still in prerelease but I have really enjoyed it as it is my first serious foray into AJAX.

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