Perl: Read ODBC data src (Win32)

use Win32::ODBC;

$Data = new Win32::ODBC("DSN=XXX;UID=YYY;PWD=ZZZ;");
die "can't open data source: $!" unless defined($Data);

$Data->Sql("SELECT a,b FROM sometable;");

print "a;b\n";

while( $Data->FetchRow())
    print $Data->Data("a") . ";" . $Data->Data("b") . "\n";



Another IE gotcha

When including script files, do:


..instead of:


Otherwise IE will render a blank page, only background is visible. "..feature applies to IE6 SP2 and IE7 Betas. IE6 SP1 and earlier are unaffected." (see link post).


Sarissa: XML parsing (take 2)

Use the .getText() method goddamnit! Bit of a glitch there earlier.. Parsing and then (re-)serializing does not make that much sense in retrospect. 8-]

var oDomDoc = Sarissa.getDomDocument( );
oDomDoc = ( new DOMParser()).parseFromString( responseText, "text/xml");
if( oDomDoc.parseError != 0)
    alert( "Virhe. Palvelin lähetti epäkelvon vastauksen. (parse error)");
    critical( );

oDomDoc.setProperty( "SelectionLanguage", "XPath");
var oElem = oDomDoc.selectSingleNode( "//@some_attribute");

var str =Sarissa.getText( oElem);