Re: what is wrong with this statement



"CTG" <BadMullah@xxxxxxxxx> wrote

1-however to pinpoint the problem even this would fail, the select
statements however have no problem with it.

"UPDATE SIMTAB SET UPDFLAG=1 WHERE ICCID='I1' "

I am doing this in a C# application .

What are you doing to _execute_ the SQL? It is not, repeat NOT, just a
program statement.

In Access VBA, using Data Access Objects, it would be something like:

CurrentDB.Execute strMyQuery

where strMyQuery is a string/text variable containing the query you want to
execute.

2-I have not been able to figure out how I can do thsi query by typing
command in Access to speed up the resolution to thsi problem.

You must, of course, have access to the tables... either by testing your
query in the Jet database where the tables actually reside, or linking to
those tables -- on the File Menu, "Get External Data" and "Link" and then
follow the prompts (that's on Access 2003 or earlier... someone else would
have to tell you the details of the commands to link on Access 2007).

On the Database Window, click the Queries tab, then click "New" to open the
Query Builder. I'd suggest learning at least enough to use the Query
Builder, but with the Query open in Design View, you can click View on the
menu, choose SQL and type in the SQL directly.

Larry Linson
Microsoft Access MVP


.



Relevant Pages

  • Re: creating and executing queries in VBA.
    ... Execute it into what? ... You can't just "execute" a select query. ... When you execute sql it has to go into a report, or a form or a record set. ...
    (microsoft.public.access.modulesdaovba)
  • Re: UPDATE query in Access 2003 raising error
    ... Runtime error 3066 Query must have at least one destination field. ... The SQL works fine if I use it in the QBF Design mode. ... Set qdfTemp = db.CreateQueryDef ... Elsewhere in the code I use the same technique to execute an SQL ...
    (microsoft.public.access.formscoding)
  • Re: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT I
    ... This statement causes ADO to create a recordset to receive the results ... of the query being executed and assign that recordset to your qryAddProj ... You should use the ExecuteOptions argument of the Execute ... string containing a sql statement to be executed. ...
    (microsoft.public.data.ado)
  • Re: ADO.NET query execution much slower than SQL Management Studio
    ... A stored procedure uses a query plan that's created when the SP is first executed and reuses that plan regardless of the suitability of the plan from that point forward--until it's replaced. ... Something that would affect the .NET SqlClient but not SQL Mgmt Studio? ... takes less than one second to execute. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: UPDATE query in Access 2003 raising error
    ... Doug Steele, Microsoft Access MVP ... Runtime error 3066 Query must have at least one destination field. ... The SQL works fine if I use it in the QBF Design mode. ... Elsewhere in the code I use the same technique to execute an SQL ...
    (microsoft.public.access.formscoding)

Loading