|
It appears to me that a going standard now is to use "using" for DB
connections. Similar to:
using (iDB2Connection conn = new iDB2Connection(_connString))
{
using (iDB2Command cmd = new iDB2Command(sqlStatement,
conn))
{
cmd.Parameters.Add("@YEAR",
iDB2DbType.iDB2Decimal).Value = year;
cmd.ExecuteNonQuery();
}
}
I am trying to use this for some code I am writing, but I keep getting an
error when I try to run ExecuteNonQuery(). Is this not supported on 5.4 of
iSeries Access?
--
Mike Wills
http://mikewills.me
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.