If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Problem Inserting data with ADO.Net and Compact Framework

I'm having a wierd problem with ADO.NET in the Compact Framwork on a Pocket PC running Windows Mobile 2003. The code below shows my attempt to insert a record into a SQL Server DB using parameters. For most of my database activity I've just used SQL statements and ExecuteNonQuery, but one of the fields in this table is a binary file, so I'm using parameters. If there's another way to do that, I'm open to that as well.

Anyway the error I'm getting is 'Incorrect Syntax near 'woNumber'' on the Update statement. I can't see anything wrong with the SQL statement as I wrote it. I don't know what this means, but I changed the case of some of the letters in 'WONumber' in the three places it shows in the CommndText statement and the Parameter.Add statement. The one that's showing in the error message is the first instance in the Parameter.Add statement. I guess I assumed ADO.NET constructed a standard SQL INSERT statement, which would only have the word 'WONumber' in there once. I don't get it. By the way, this code was copied from a standard VB.NET app that I wrote to maintain this database and it works fine there. I only changed the SQLClient stuff. Can anyone help? I've been struggling with this for two days.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.