Slashdot Mirror


User: ssbssb

ssbssb's activity in the archive.

Stories
0
Comments
5
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 5

  1. Factual on Rivals Mock Microsoft's 'Native HTML5' Claims · · Score: 5, Funny

    Clearly this was not intended to be a factual statement.

  2. Re:Thrane & Thrane SAILOR 500 Fleet Broadband on Internet Access While Sailing? (Revisited) · · Score: 1

    Why would you need fax on a boat?

  3. Re:Parameterized SQL on Kaminsky Offers Injection Antidote · · Score: 1

    Correct. If you are building dynamic SQL as a string within a stored proc, simple parameters aren't enough.

    This kind of code is common when you need to build a dynamic where, select or order by clauses. Normally you would build this where clause in code and then, yes, use parameters. But some code shops insist that all SQL be in sprocs and ban inline sql. When you parametrize it, you only escape the first level. If you use that value in the dynamic sql string, it will again be treated as literal.

    Now before you jump in and say "well thats a stupid way to do it! Stupid code is stupid." ask anyone who has worked in a MS SQL shop or supported 3rd party apps that use MS SQL. Even the built in system sprocs use this kind of dynamic processing. The poster's Buchner's comment was only to show that just using parameters isn't always enough.

    Here is some code I wrote to prove it and tested in ms sql:

    --these two lines simulate what a parametrize query would do
    declare @firstname as varchar(30)
    set @firstname='test''' --note the escaped single quote

    declare @sqlQuery as varchar(2000)

    set @sqlQuery='select * from Employee where '

    if (@firstname is not null) begin
    set @sqlQuery = @sqlQuery + ' Firstname=''' + @firstname + ''''
    end

    print @sqlQuery

    exec(@sqlQuery)

  4. Re:Am I the only middle-aged geek who DIDN'T.... on The End of the Dr. Demento Show On Radio · · Score: 1

    Yes honestly I never found HIM to be that funny. The show was always about the songs and skits that he played. He was the host and the voice of the show, so it's natural if people liked his program, they would also like him.

  5. What is the motivation for power companies? on High-Temp Superconductors To Connect Power Grids · · Score: 1

    Won't increasing efficiency lower energy prices? Am I right in thinking that there really isn't any incentive for power companies to do this?