PC Review


Reply
Thread Tools Rate Thread

ADP Update Query does NOT update !

 
 
prideaux
Guest
Posts: n/a
 
      19th Aug 2009
I have a (very simple and standard) UPDATE statement which works fine either
directly in Query Analyser, or executed as a stored procedure in Query
Analyser.

UPDATE A
SET
A.field1 = B.col1
, A.field2 = B.col2
FROM
tblA AS A INNER JOIN tblB AS B
ON A.pk1 = B.pk1 AND A.pk2 = B.pk2

Problem is when i execute the same stored proc via microsoft ADP (by
double-clicking on the sproc name or using the Run option), it says "query
ran successfully but did not return records" AND does NOT update the records
when i inspect the tables directly.

Before anyone even says "syntax of MS-Access is different than SQLServer
T-SQL", i remember that with ADP everything happens on the server and one is
actually passing thru to T-SQL.

What's going on here?
 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      19th Aug 2009
Which version of ADP/Access are you using and what's exactly the full code
of the SP? Also, take a look with the SQL-Server Profiler, maybe this will
put some light on it.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)


"prideaux" <(E-Mail Removed)> wrote in message
news:33E2CD0A-CF58-4E18-8D27-(E-Mail Removed)...
>I have a (very simple and standard) UPDATE statement which works fine
>either
> directly in Query Analyser, or executed as a stored procedure in Query
> Analyser.
>
> UPDATE A
> SET
> A.field1 = B.col1
> , A.field2 = B.col2
> FROM
> tblA AS A INNER JOIN tblB AS B
> ON A.pk1 = B.pk1 AND A.pk2 = B.pk2
>
> Problem is when i execute the same stored proc via microsoft ADP (by
> double-clicking on the sproc name or using the Run option), it says "query
> ran successfully but did not return records" AND does NOT update the
> records
> when i inspect the tables directly.
>
> Before anyone even says "syntax of MS-Access is different than SQLServer
> T-SQL", i remember that with ADP everything happens on the server and one
> is
> actually passing thru to T-SQL.
>
> What's going on here?



 
Reply With Quote
 
prideaux
Guest
Posts: n/a
 
      19th Aug 2009
Ok found my own answer.

Tools / Options / Advanced / Client-Server Settings / Default max records
set at 10,000. Change this to 0 for unlimited.

My table had 100,000+ rows and whatever set of 10,000 it was updating was
difficult to find ( among a sea of 90,000+ un-updated ).

"prideaux" wrote:

> I have a (very simple and standard) UPDATE statement which works fine either
> directly in Query Analyser, or executed as a stored procedure in Query
> Analyser.
>
> UPDATE A
> SET
> A.field1 = B.col1
> , A.field2 = B.col2
> FROM
> tblA AS A INNER JOIN tblB AS B
> ON A.pk1 = B.pk1 AND A.pk2 = B.pk2
>
> Problem is when i execute the same stored proc via microsoft ADP (by
> double-clicking on the sproc name or using the Run option), it says "query
> ran successfully but did not return records" AND does NOT update the records
> when i inspect the tables directly.
>
> Before anyone even says "syntax of MS-Access is different than SQLServer
> T-SQL", i remember that with ADP everything happens on the server and one is
> actually passing thru to T-SQL.
>
> What's going on here?

 
Reply With Quote
 
mustafa Turkoglu
Guest
Posts: n/a
 
      18th Sep 2009
Don't use alias name for the updated table. This is an SQL issue.
Better use Query designer in SQL server Managment Studio.

UPDATE tblA
SET field1=B.Col1 , field2=B.col2
FROM tblA inner join tblB as B ON tblA.Pk1= B.pk1


"Sylvain Lafontaine" wrote:

> Which version of ADP/Access are you using and what's exactly the full code
> of the SP? Also, take a look with the SQL-Server Profiler, maybe this will
> put some light on it.
>
> --
> Sylvain Lafontaine, ing.
> MVP - Windows Live Platform
> Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
> Independent consultant and remote programming for Access and SQL-Server
> (French)
>
>
> "prideaux" <(E-Mail Removed)> wrote in message
> news:33E2CD0A-CF58-4E18-8D27-(E-Mail Removed)...
> >I have a (very simple and standard) UPDATE statement which works fine
> >either
> > directly in Query Analyser, or executed as a stored procedure in Query
> > Analyser.
> >
> > UPDATE A
> > SET
> > A.field1 = B.col1
> > , A.field2 = B.col2
> > FROM
> > tblA AS A INNER JOIN tblB AS B
> > ON A.pk1 = B.pk1 AND A.pk2 = B.pk2
> >
> > Problem is when i execute the same stored proc via microsoft ADP (by
> > double-clicking on the sproc name or using the Run option), it says "query
> > ran successfully but did not return records" AND does NOT update the
> > records
> > when i inspect the tables directly.
> >
> > Before anyone even says "syntax of MS-Access is different than SQLServer
> > T-SQL", i remember that with ADP everything happens on the server and one
> > is
> > actually passing thru to T-SQL.
> >
> > What's going on here?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running an UPDATE query in code to update a subform that reflects anunderlying Table nouveauricheinvestments@gmail.com Microsoft Access Forms 0 10th Nov 2008 07:40 PM
Using an update query to update amount in stock automatically seagulls soaring Microsoft Access 1 27th Feb 2008 07:07 PM
Update local table with Sybase ODBC data in update query ragtopcaddy via AccessMonster.com Microsoft Access 4 26th Nov 2007 03:17 PM
Problem with Update Query Returning Message Re Single Row Update =?Utf-8?B?Q2hhcmxlcyBBbGxlbg==?= Microsoft Access Queries 1 6th Dec 2006 06:14 AM
Run Update Query from Macro witout displaying Update Warning Box Jasper de Bruin Microsoft Access Queries 2 21st Oct 2003 11:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:09 AM.