473,327 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

DataAdapter.Update( )

Is there any way to see the final SQL that gets executed by the Update( )
method. I'm getting a syntax error for the SQL, but all looks OK as far as I
can see. I need to see the SQL with all the parameters replaced.

Connecting to a MS Access database.

Thanks,
Tom Costanza
Aug 28 '06 #1
4 1102
Tom,

Mostly is putting the update in a try and catch block much easier and than
show the exception.

If you tell what you are using VB, C# etc, than it is even possible to give
a sample for that.

I hope this helps,

Cor

"Tom Costanza" <ma*****@hotmail.comschreef in bericht
news:B7**********************************@microsof t.com...
Is there any way to see the final SQL that gets executed by the Update( )
method. I'm getting a syntax error for the SQL, but all looks OK as far
as I
can see. I need to see the SQL with all the parameters replaced.

Connecting to a MS Access database.

Thanks,
Tom Costanza

Aug 28 '06 #2
Well, you should be creating that code yourself.

If you want to see what was generated, just look in your code behind - it's
all there.

"Tom Costanza" <ma*****@hotmail.comwrote in message
news:B7**********************************@microsof t.com...
Is there any way to see the final SQL that gets executed by the Update( )
method. I'm getting a syntax error for the SQL, but all looks OK as far
as I
can see. I need to see the SQL with all the parameters replaced.

Connecting to a MS Access database.

Thanks,
Tom Costanza

Aug 28 '06 #3
Scott

Now I am using an answer from which I had to think about what you would have
written and than you write something else.

:-)

Cor

"Scott M." <s-***@nospam.nospamschreef in bericht
news:%2***************@TK2MSFTNGP03.phx.gbl...
Well, you should be creating that code yourself.

If you want to see what was generated, just look in your code behind -
it's all there.

"Tom Costanza" <ma*****@hotmail.comwrote in message
news:B7**********************************@microsof t.com...
>Is there any way to see the final SQL that gets executed by the Update( )
method. I'm getting a syntax error for the SQL, but all looks OK as far
as I
can see. I need to see the SQL with all the parameters replaced.

Connecting to a MS Access database.

Thanks,
Tom Costanza


Aug 28 '06 #4
If you set your Update CommandText into a variable, you can then check that
variable value, just prior to executing your command, by setting a
breakpoint on it and looking at the populated commandText stored in the
variable.
"Tom Costanza" <ma*****@hotmail.comwrote in message
news:B7**********************************@microsof t.com...
Is there any way to see the final SQL that gets executed by the Update( )
method. I'm getting a syntax error for the SQL, but all looks OK as far
as I
can see. I need to see the SQL with all the parameters replaced.

Connecting to a MS Access database.

Thanks,
Tom Costanza

Aug 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
6
by: Geoff Pennington | last post by:
I have a class method that returns a DataAdapter. I want to access the table(s) contained in the DataAdapter. Of course, accessing the DataSets would be good enough, because I could get the tables...
13
by: Doug Bell | last post by:
Hi, I thought I had this sorted this morning but it is still a problem. My application has a DataAccess Class. When it starts, it: Connects to a DB (OLE DB) If it connects it uses an...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
7
by: Max | last post by:
I've included the needed tables in the DataSource. Those tables that are bound to controls I can workwith. But how do you get access to the DataAdaptors that are not bound? me.Dataset1.table...
2
by: Franklin M. Gauer III | last post by:
I create a simple DATAADAPTER in a webservice project. It creates the UPDATE, INSERT, DELETE commands for me - no problem. In vS2005 it creates these commands as RESOURCES in the RESX file (i.e....
6
by: Rich | last post by:
Dim da As New SqlDataAdapter("Select * from tbl1", conn) dim tblx As New DataTable da.Fill(tblx) '--works OK up to this point da.UpdateCommand = New SqlCommand da.UpdateCommand.Connection =...
3
by: Rich | last post by:
What is the diffeence bewtween a dataAdapter.InsertCommand and dataAdapter.SelectCommand (and dataAdapter.UpdateCommand for that matter)? Dim da As SqlDataAdapter conn.Open da.SelectCommand =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.