need help with update through C#

G

Guest

I have an update where I specify the following:
string updateSQL = "update Perform " +
" set venueCd = ?, " +
" performanceDTTM = ?, " +
" performanceDesc = ?, " +
" lotteryPerformance = ?, " +
" lotteryAsgnComplete = ?, " +
" performHandicapLogic = ?, " +
" maxNumOfCompTks = ?, " +
" maxNumOfAdditionalTks = ?, " +
" costOfEachAddTk = ? " +
" where venueCd = ? and " +
" performanceDTTM = ?"

the column performanceDTTM is a datetime column in the access table. I am
passing in a parm that is of OleDbType.Date parm type. The value of the parm
matches the value in the table but the db does not find the row therefore my
update command is not updating the row. Any help would be greatlty
appreciated.
 
S

Sylvain Lafontaine

You should ask in a newsgroup about C#; as this one is about ADP and has
nothing with the .NET Framework.

As to your question, first make sure that the DateTime values in the table
has not a time different from 0. Make that the everything is OK by trying
this query in Query Analyser or SSMS. If this doesn't work, then take a
look with the SQL-Server Profiler to see what it's sent or try to use a char
field instead to pass your date.

You can also replace your update with a Select statement to see what's the
value of the parameter; something like: Select ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top