On Tue, Oct 23, 2012, at 12:05 PM, Dave Crozier wrote:
> Oh, and just a reminder to anyone embarking on a similar quest that OLEDB
> can only accept CHARACTER parameters

Are you sure? This works fine for me:

            using (OleDbConnection operaConnection = new
            OleDbConnection(targetCompany.DataConnectionString))
            {
                operaConnection.Open();
                OleDbCommand operaCommand = new
                OleDbCommand(@"pgfnpgisnsetnew(?,?,?)",
                operaConnection);

                // -- Start a transactable update.
                OleDbTransaction operaTxn =
                operaConnection.BeginTransaction();
                operaCommand.Transaction = operaTxn;
                operaCommand.Parameters.Add("@lcAccount",
                OleDbType.VarChar, 8);
                operaCommand.Parameters.Add("@ltStamp",
                OleDbType.DBTimeStamp);
                operaCommand.Parameters.Add("@lcUsername",
                OleDbType.VarChar, 100);

                foreach (Customer ThisCustomer in updateCustomers.items)
                {
                    operaCommand.Parameters["@lcAccount"].Value =
                    ThisCustomer.accountcode;
                    operaCommand.Parameters["@ltStamp"].Value =
                    System.DateTime.Now;
                    operaCommand.Parameters["@lcUsername"].Value =
                    ThisCustomer.servoyusername;

<snip>


-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/1350993040.30071.140661144327053.57317...@webmail.messagingengine.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to