Re: Command sent to Access Database using OleDbDataAdapter

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ben de Vette (Ben.de.Vette.news1_at_profiler.nl)
Date: 05/24/04

  • Next message: Mario T. Lanza: "Re: Capture SQL print output + result set rows?"
    Date: Mon, 24 May 2004 22:34:07 +0200
    
    

    Thanks for the clear answer.
    Unfortunaltly, I already used OnRowUpdating/Updated to check for command and
    values. I added all the values according to the parameters and the command
    did not fail when given in Access itself.

    The errormessage given is "Syntax error in UPDATE statement."
    Exception thrown is "System.Data.OleDb.OleDbException"

    With kind regards,
    Ben de Vette

    "William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
    news:%23C0riNcQEHA.640@TK2MSFTNGP09.phx.gbl...
    > In SQL Server you can use Profiler, but AFAIK, Access provides no similar
    > functionality.
    > You can check the Parameters collection, check the ColumnMappings to
    verify
    > the columns are mapped correctly and consequently use
    OnRowUpdating/Updated
    > to verify the values at any given time.
    >
    > Those need to correspond to the ? signs. So if you had two columns where
    > your parameters were mapped to , Column1 and Column2 the First ? would
    map
    > to Column1 and the second to Column2. Incorrect positions are a very
    common
    > place where things go wrong.
    >
    > How is it telling you that the command is failing? Are you getting a
    > specific exception or is it just going back and not updating anything?
    >
    > If it works by when you add them by hand, I'd verify my postions b/c
    that's
    > the most likely cause. Check the column mappings as well. You may be
    > getting a ConcurrencyException for instance which really isn't a parameter
    > issue (indirectly it is b/c the parameters are causing the conflict but
    were
    > those values not already there or there but apparently changed, then it
    > would work). I think a routine trapping OnRowUpdating is the closest you
    > can get with MS Access but I'm no access expert.
    > http://www.knowdotnet.com/articles/efficient_pt4.html
    > --
    >
    > W.G. Ryan, eMVP
    >
    > http://forums.devbuzz.com/
    > http://www.knowdotnet.com/williamryan.html
    > http://www.msmvps.com/WilliamRyan/
    > "Ben de Vette" <Ben.de.Vette.news1@profiler.nl> wrote in message
    > news:10b4b206frenp6e@corp.supernews.com...
    > > Hi,
    > >
    > > is it possible to see the actual SQL command which is sent to Acces when
    > > using an OleDbDataAdapter?
    > > Al I can see now is that an update command failed.
    > > Why, is not told.
    > >
    > > I already found the command string, but it is filled with the question
    > mark
    > > sign which still has to be filled with the parameters. I am looking for
    > the
    > > way to see the actual command sent.
    > >
    > > Because, when I replace the ?-signs (by hand) with the provided
    parameters
    > > in Access itself, everything goes well.
    > >
    > > Thanks in advance,
    > > Ben
    > >
    > >
    > >
    >
    >


  • Next message: Mario T. Lanza: "Re: Capture SQL print output + result set rows?"

    Relevant Pages

    • Re: Command sent to Access Database using OleDbDataAdapter
      ... In SQL Server you can use Profiler, but AFAIK, Access provides no similar ... You can check the Parameters collection, check the ColumnMappings to verify ... How is it telling you that the command is failing? ... If it works by when you add them by hand, I'd verify my postions b/c that's ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Exchange 2007 Anti-Spam
      ... You can verify by sending an email from an address that is on a user's Safe Senders List and looking at the antispam headers. ... the Update-SafeList command should be run on a schedule to continue updating. ... when I enter in the compand "UPDATE-SAFELIST" it doesnt work in the powershell. ... I love Exchange 2007 and at first I was recommending everyone to jump on it, but the lack of documentation beyond just the vanilla commands are extremely lacking, especially on the anti-spam and powershell stuff. ...
      (microsoft.public.exchange.setup)
    • Re: 0x800A0046 error
      ... > Here are a few suggestion you may try and verify the wuauserv service ... > Verify the security descriptor: ... > 3.If the security descriptor for the wuauserv service is different then ... At the command prompt type sc sdset wuausrv ...
      (microsoft.public.windowsupdate)
    • Re: Copy with Verify?
      ... "VERIFY ON, COPY /V, XCOPY /V Commands Do Not Compare Data ... source and destination files to determine whether they are identical. ... When you use the VERIFY ON command, or the /V switch with the COPY or XCOPY ...
      (microsoft.public.windowsxp.general)
    • Re: Exchange 2007 Anti-Spam
      ... I add users to the whitelist in the command shell, and add domains and they still get flagged as spam. ... I love Exchange 2007 and at first I was recommending everyone to jump on it, but the lack of documentation beyond just the vanilla commands are extremely lacking, especially on the anti-spam and powershell stuff. ... For instance, even if update-safelist did work, how in the HECK can i verify it? ...
      (microsoft.public.exchange.setup)