Daily Archives: March 30, 2004

can’t hide that javascript

About 1 1/2 years ago, I wrote an ASP.NET Timesheet application for a client of mine. One of the things that I had a murderous time doing was making  start and end time text boxes that validated against each (on the client side) other checking for all kinds of things and including even a checkbox to indicate “overnight”. This was my first time doing any serious javascript so you can imagine how much effort it took. I encapsulated the code into a .js file and call it from three separate pages. Knowing that nobody can ever hide .js, I  added this comment at the top of the file this evening (just for fun):

//EndTimeValidator
//written by Julia Lerman www.thedatafarm.com
//this was my first time doing javascript, not bad, eh?
//if you are, ahem, “borrowing” this code, you might be better off
//spending $50 and buying a MUCH better solution by www.peterblum.com which
//I wish I had known about before I killed myself writing this

Of course that $50 is for this and many many other wonderful asp.net controls. I don’t always “roll my own”, but I was determined and also I learned a TON.

“exec sp_executesql” = NOT a Stored Procedure

This has bitten me in the rear twice in the last few days while working on some webmethods. I was erroring out on a sql ExecuteNonQuery with the only message being that there was an error on line 1 of my command. Looking in my SQLProfiler I see my query as

exec sp_executesql N’MySprocName’, N’@myparam char(20)’, @myparam = ‘3/30/2004 1:48:22 PM’

“exec sp_executesql” is used for commands that are text, NOT stored procedures. The problem here is that I forgot to set my sqlcommand type to StoredProcedure and it was being sent to SQL Server as a query string and therefore failing.

This is a good indicator of the problem so that you don’t have to go around and around trying to figure out what is wrong with your stored procedure (as I did – once but not twice!)

Be a Judge at a local Imagine Cup!!!

I was just looking at the list of many schools that could still use volunteer judges that is on the INETA Website. The best way to see is on this page http://inetaacademic.com/imaginecup/matrixmatches.aspx

  • About 15 in California
  • Boulder, CO
  • Storrs, CT
  • Dayton Beach, FL
  • Athens and Kennesaw, GA
  • 2 in Honolulu (sorry you have to get yourself there)
  • in Indiana at Purdue and Bloomington
  • In Boston – M.I.T, Boston Univ, UMASS Boston (Dorchester) and Amherst
  • Townson U in Maryland
  • 4 in Michigan
  • Rolla and St. Louis, Missouri
  • Greensboro , NC
  • 4 in New Jersey
  • New Mexico
  • Columbia University in NYC, Baruch, and Stonybrook and Binghamton, NY
  • 3 in Ohio (Oxford, Bowling Green and Cincinnati)
  • Pittsburgh, PA
  • Columbia, South Carolina
  • Middle State Univ in Tennessee
  • Texas A&M and Univ. of North Texas Dallas
  • Salt Lake City, Utah
  • Old Dominion and James Madison Universities in Virginia
  • Seattle (that shouldn’t be TOO hard!)
  • Wisconsin: Marquette, Univ. of Wisc at Madison
  • Univ of Wyoming in Laramie