November 26, 2007 at 5:31 pm
· Filed under annoying, mssql, rails, ruby
Spent too much damn time debugging the database layer in rails again today. This was the error:
OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed transaction mode.
This was getting thrown after an insert, and the problem was very non-obvious. I found one potential solution on Occasionally Useful Software’s post about Ruby and SQL Server, but that seemed a little heavy-handed.
Somewhere in the bowels of ActiveRecord, dbi.rb, ADO.rb, and the SQLNCLI driver, something expected one result-set per SQL command. My insert was firing a database trigger, and so the ruby stack saw two result-sets, one saying “1 row affected” for the original insert, one saying “0 rows affected” for the trigger. I’m still a little confused, as I thought those “rows affected” messages were separate from proper result-sets (the results from a SELECT, for example), but apparently those little buggers count enough.
Adding a “SET NOCOUNT ON” to the top of the trigger fixed it.
Permalink
November 20, 2007 at 3:33 pm
· Filed under flash, open source, windows
There are several tutorials out there on how to do this, but they all differed a little, and figured I might as well note mine. I’m replicating the setup I have at work onto a home computer, so this is my second time around.
- Download and install Eclipse, the java version should be just fine
- Pick a directory for your flash projects. For this guide, I’m using the Eclipse default, “C:\Documents and Settings\Ryan\workspace”
- Download the Flex 2 SDK, unzip it into a “Flex 2 SDK” folder in your project directory
- Download the Flex Ant tasks, and unzip the file into a directory in your project directory
- Install whatever version control tools you prefer
- Open Eclipse, get to the workspace view
- Make a new “General” project for the Flex 2 SDK
- Go to Window->Preferences, select the Ant->Runtime node in the tree
- Go to the “Classpath” tab, select “Ant Home Entries (default)”, and then click “Add External JARs”
- Select the flexTasks.jar from the flex ant folder.
- Click OK
- Go to the “Tasks” tab, select “Add Task”
- Name it “mxmlc”, and choose the flexTasks.jar from the dropdown
- In the tree view, navigate to / -> flex2 -> ant, and then select MxmlcTask.class from the right pane
- Click OK
- Go to the “Properties” tab, select “Add Property”
- Name it “FLEX_HOME”, and make the path to your Flex 2 SDK folder
- Click OK
- Click OK
Now you’re ready to start the hard part, actually making your flash program.
Permalink
November 13, 2007 at 10:22 am
· Filed under bored
I played around with the new wigflip toy, automotivator:

Permalink