The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
When I process CSV files this way I usually just do it all in SQL with temp tables. If you have to do a lot of string manipulation then procedural code might be better, but otherwise processing the CSV with a stored procedure is generally going to be fast and easy to maintain.
Otherwise I don't see much difference between a script and a compiled app, other than possibly speed. But if you can do it in set operations with SQL rather than with loops, that's going to be a huge speed gain right there.
For me, everything rounds to what would be easier, if the script language (or environment) have everything I need then I do a script, if the compiled app would be easier to create, then I go for the compiled app.
As a rule of thumb, if the script will end up with more than a hundred of lines, then a compiled app may be better.
I have several apps that do this and I have used scripts, console apps and now I pretty much create services.
1. Unless you control the box the script is on, some one is going to open up the script in a text editor just to look at it. Come you know you have. Ever think you can make it better with just a little tweak?
2. If people log into the box with different credentials and run your console app. Oops different results - must be a bug, not a security feature.
3. With a service I can control the user the app is executing under, and people are less likely to mess with it.
The issues that you expressed shouldn't have any thing to do with "script" or not unless the scripting language you have is severely limited in some way. It should still be able to log, recover from errors, etc.
I would prefer to do it in a compiled .NET application because I'm more familiar with C# than scripting languages and, as you pointed out in a later post, memory management is (IMHO) better in .NET.
However, whatever you choose to do, MAKE SURE THAT YOU WRITE TESTS FOR IT so that eight months down the line you can catch any bugs that the "tiny little small change" that you need to do might introduce.
Hi I've been searching awhile but haven't found what I was looking for. I am trying to upload a file to SQL database using HTML5 . I have the html5 side done but am looking for a resource or example of server side code that will upload the file to a SQL server. I know I'll using httpwebrequest. Do I use a webservice (asmx file)? a handler (axhx file)? or something else?
Well, here in the Land of Smiles, StarBucks put its mighty foot down on two brothers who operate a coffee street-cart in Bangkok who dared to use the name "StarBung" [^], with a logo that looks derivative, but which they claim reflects their Muslim heritage, and the fact their cart/stall is halal. fyi: one of the brothers goes by the nickname, "Bung."
The tempest-in-a-javapot is all over now; the brothers at first reportedly told StarBucks to shove off, and that they should pay them 3 million Baht (about $93K US) ... points for chutzpah !
But, this show of bravura didn't last long, and they folded; probably after they had an offer they couldn't refuse and still keep their heads on their shoulders from some local official.
fyi: StarBucks franchise coffee in Thailand could be used to tan leather, mummify road-kill, sterilize medical equipment, and open clogged drains; beyond that, I am not sure what it's good for.
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
A man in a Ford Pinto pulls up next to a guy in a Rolls Royce at a stop sign. Their windows are open and he yells at the guy in the Rolls: "Hey, you got a telephone in there?" The guy in the Rolls says, "Yes, of course I do." "I got one too... see?" "Uh, huh, yes, that's very nice."
Then the man in the Pinto says, "You got a fax machine?" "Why, actually, yes, I do." "I do too! See? It's right here!" "Uh-huh." The light is just about to turn green and the guy in the Pinto says, "So, do YOU have a double bed in back there?" And the guy in the Rolls says, "NO! Do you?" "Yep, got my double bed right in back here. See?" The light turns green and the man in the Pinto takes off.
Well, the guy in the Rolls is not about to be one-upped, so he immediately goes to a custom shop and orders them to put a double bed in back of his car. About two weeks later, the job is finally done and he picks up his car and drives all over town looking for the Pinto. He finally finds it parked alongside the road so he pulls his Rolls up next to it. The windows on the Pinto are all fogged up and he feels a little awkward about it, but he gets out of his newly modified Rolls and taps on the foggy window of the Pinto. The man in the Pinto finally opens the window a crack and peeks out.
The guy in the Rolls says, "Hey, remember me?" "Yeah, yeah, I remember you. What's up?" "Check this out - I got a double bed installed in my Rolls!" And the man in the Pinto says, "You got me out of the shower to tell me that?!!"