× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



But I don't have to for SQL server. Thus why I'm asking.

--
Mike Wills
http://mikewills.info

Sent from my mobile

On Oct 29, 2010, at 4:41 PM, Walter Hesius <walter.hesius@xxxxxxxxx> wrote:

don't forget to open the connection:
conn.Open();



2010/10/29 Mike Wills <mike@xxxxxxxxxxxxxx>

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.




--
--
Walter

Kind regards, Cordialement, Met vriendelijke groeten,

Walter Hesius
Gsm: +32 497 252749
--
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.