telophase: (Mello - bite my ass)
telophase ([personal profile] telophase) wrote2005-09-29 01:41 pm

Yesterday's ASP question

For those of you who were on tenterhooks wondering what the error in yesterday's ASP question was, you can rest assures that it was not, in fact, anything you suggested, but due to either SQL Server or ASP not liking numbers as the first characters in a table name. Simply renaming the table from "2005FallSurvey" to "FallSurvey2005" in both SQL Server and the script made it work.

*headdesk*

[identity profile] thomasyan.livejournal.com 2005-09-29 06:46 pm (UTC)(link)
Lots of programming languages don't like names starting with digits. One of the things I like about Forth is that you can use punctuation as part of names.

[identity profile] telophase.livejournal.com 2005-09-29 06:51 pm (UTC)(link)
How am I supposed to sort things by human-readable dates, then? *arg*

I suppose I could name all the tables things like "Survey2005Fall" Or, since this particular database is nothing *but* surveys, "Library2005Fall" and "IC2005Spring" just to keep the library and Information Commons surveys separate.

[identity profile] thomasyan.livejournal.com 2005-09-29 07:13 pm (UTC)(link)
Right. Or, you could stick a single throwaway letter in front, "T2005FallSurvey" and "T2005SpringICSurvey", where I picked T for Table.

[identity profile] telophase.livejournal.com 2005-09-29 07:21 pm (UTC)(link)
Yah. I ended up going for "Library" and "IC" to start the table names,b ecause I could see a use for keeping them easily distinguishable.

Now all I have to do is figure out how to keep people from resubmitting the survey. I've got a redirect to a thankyou page so they can't refresh the page and resubmit, and using the Back button and then the Forward button doesn't resubmit either, but the Back button and then deliberately clicking the Submit button again will resubmit it.

I can, of course go trhough teh table in SQL Server and pull out duplicate entries and delete one, but I've got enough time left before it has to go live to code on it, so I'd prefer to do something that would eliminate duplicates entirely.