B
Brian
Hey everyone, I'm struggling here...
I have the following in my Page_Load method of my code-
behind file:
if (IsPostBack)
{
OdbcConnection mkConn = new OdbcConnection
(Global.IngresConnectionString);
mkConn.Open();
OdbcTransaction trans = mkConn.BeginTransaction();
OdbcCommand mkCommand = new OdbcCommand(sqlString,
mkConn);
mkCommand.Transaction = trans;
...rest of code
}
When the page posts, I get a big fat "Server Error"
screen, with the following error:
ERROR [HY011] [CA][Ingres ODBC Driver]Operation invalid
at this time
The error is on the BeginTransaction line. The kicker is
that if I hit the browser's Refresh button at this time,
the page re-posts and goes on its merry way, creating the
transaction, running the sql statements, and commiting
the transaction.
So my question is, why on earth does it fail on a normal
posting of the page, but work on the refresh? This is
driving me bonkers!
Thanks in advance,
Brian
I have the following in my Page_Load method of my code-
behind file:
if (IsPostBack)
{
OdbcConnection mkConn = new OdbcConnection
(Global.IngresConnectionString);
mkConn.Open();
OdbcTransaction trans = mkConn.BeginTransaction();
OdbcCommand mkCommand = new OdbcCommand(sqlString,
mkConn);
mkCommand.Transaction = trans;
...rest of code
}
When the page posts, I get a big fat "Server Error"
screen, with the following error:
ERROR [HY011] [CA][Ingres ODBC Driver]Operation invalid
at this time
The error is on the BeginTransaction line. The kicker is
that if I hit the browser's Refresh button at this time,
the page re-posts and goes on its merry way, creating the
transaction, running the sql statements, and commiting
the transaction.
So my question is, why on earth does it fail on a normal
posting of the page, but work on the refresh? This is
driving me bonkers!
Thanks in advance,
Brian