Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed, sed: -e expression #1, char 1: unterminated address regex, procmail + change subject, w2ksp4.exe download

Links

XODOX
Impressum

#1: Sporadic connect failures to Oracle

Posted on 2008-01-21 22:33:51 by Frank Burleigh

I thought I knew how to do this. But one, low-use web form occasionally
loses form submissions and I haven't been able to understand why. I
can't even duplicate the behavior.

The form's processor is in a JSCRIPT "class" so I'll pull out the
relevant bits below.

Several users report seeing the "cannot save" message "thrown" when the
test for this.aConnection.State!=1 fails.

No other place in the application presents that error, so I'd guess
that's the problem: either the test itself is invalid, or we're really
having trouble making connections.

Hints would sure be appreciated.

this.aConnection=null;

var sConnect="Provider=OraOLEDB.Oracle;Data Source=<>;User
Id=<>;Password=<>";

this.aConnection=Server.CreateObject( "ADODB.Connection" );
if( !this.aConnection )
throw "The application cannot access information.";

this.aConnection.Open( sConnect );
if( this.aConnection.State!=1 )
throw "The application cannot save your submission.";

this.aConnection.Execute( <insert DDL to add a record>, 0, 1 );

this.aConnection.Close();

Report this message