dataAdapter.Update() help! (bis)

A

Ana Lindt

Hello,

I recently posted a message about this but the mentioned solutions didn't
help much. My problem is that i'm getting a syntax error upon calling the
dataAdapter.Update() method (OleDb/Jet, C#).
The SQL query in the dataAdapter.InsertCommand property seems OK, if I
copy/paste it to Access query designer and replace the parameters manualy it
executes successfuly.


In order to solve this problem I would need to see what's the *exact query*
that is being executed against the database.


I've been looking for a way to get that query but the only thing that I can
find is the error message "Syntax error...".
The OleDbException object does have a reference to the error but just the
message aswell, not the actual sql query that caused the error.

Thanks in advance for any help,

Ana L.
 
W

William Ryan eMVP

Ana:

There's a very VERY high probablity considering your symptoms that you have
an access or sql reserved word
http://www.knowdotnet.com/articles/reservedwords.html I don't think you can
get the exact value that's being sent and I'm not sure if you are referring
to my suggestions about OnRowUpdating but I don't think there's a Profiler
tool or similar thing in Access. This is the verbatim symptom that happens
when you use a reserved word so that's why I mention it.

HTH,

Bill

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 
A

Ana Lindt

Ok I had a reserved word, thank you for the list and for your help.
Fortunatly I'm gonna be switching to a SQL Server database soon. Not being
able to see the exact SQL queries made is a serious issue imho.

Again thanks for the help.

Ana L.
 
W

William Ryan eMVP

Hi Ana:

Considering that SQL Server MSDE is cheaper than access to buy (Free) and
that it has the same physical capacity, allows for much better (and
automated) backup and restore, allows for real stored procedures (which in
and of themselves can be a true windfall in terms of security and
performance), allows for real security etc. It's all upside and no downside
so I think it's a good choice.

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
 

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