Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Update query doesn't update table

Reply
Thread Tools

Update query doesn't update table

 
 
David Shorthouse
Guest
Posts: n/a
 
      06-17-2005
Hello folks,

I have a problem with an update query on an asp not updating the table
in an Access db. The code runs, I have no errors, but when I examine the
table, nothing was updated. The query works as it should in Access. Could
anyone direct me to some sources that describe solutions to what is likely a
common problem? The strange thing is, I have another update query for a
different db on an asp that works just great. Is there something I may have
neglected to do for the db itself whose update query on an asp doesn't seem
to work? Security issue?

Thanks for any ideas,

David

______________________________
Remove "_SPAM" to reply directly.


 
Reply With Quote
 
 
 
 
CJM
Guest
Posts: n/a
 
      06-17-2005

"David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
news:(E-Mail Removed)...
> Hello folks,
>
> I have a problem with an update query on an asp not updating the table
> in an Access db. The code runs, I have no errors, but when I examine the
> table, nothing was updated. The query works as it should in Access. Could
> anyone direct me to some sources that describe solutions to what is likely
> a common problem? The strange thing is, I have another update query for a
> different db on an asp that works just great. Is there something I may
> have neglected to do for the db itself whose update query on an asp
> doesn't seem to work? Security issue?
>
> Thanks for any ideas,
>
> David
>


David,

I assume you are doing this in ASP? In which case, I would repost to
m.p.i.asp.db with a bit more detail, like some code for example.

As it stands we would be hard push to help you other than by guessing.

Chris


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-17-2005
David Shorthouse wrote:
> Hello folks,
>
> I have a problem with an update query on an asp not updating the
> table in an Access db. The code runs, I have no errors, but when I
> examine the table, nothing was updated. The query works as it should
> in Access. Could anyone direct me to some sources that describe
> solutions to what is likely a common problem? The strange thing is, I
> have another update query for a different db on an asp that works
> just great. Is there something I may have neglected to do for the db
> itself whose update query on an asp doesn't seem to work? Security
> issue?

Hard to say without seeing code. Do you have "on error resume next" anywhere
in your code? If so, comment it out - it may be masking the problem.

Bottom line, we need to see some code to allow us to reproduce the problem
for ourselves before we'll be able to comment on what's happening.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
Phill. W
Guest
Posts: n/a
 
      06-17-2005
"David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
news:(E-Mail Removed)...
> . . . an update query . . . not updating the table in an Access db.
> The code runs, I have no errors, . . .
> The query works as it should in Access.


Are there any wild-card characters in your SQL?
Something like :

Delete From X
Where KeyField Like 'Z*'

The wildcard character for just about everything /other/ than
Access is "%".

HTH,
Phill W.


 
Reply With Quote
 
David Shorthouse
Guest
Posts: n/a
 
      06-17-2005
In my fiddling around, I think I solved it by really scrutinizing my code. I
had no idea that the "Where" parameter should be at the end of the string of
parameters for the Data Connection to the update query.

Dave

--
______________________________
Remove "_SPAM" to reply directly.

>
> I have a problem with an update query on an asp not updating the table
> in an Access db. The code runs, I have no errors, but when I examine the
> table, nothing was updated. The query works as it should in Access. Could
> anyone direct me to some sources that describe solutions to what is likely
> a common problem? The strange thing is, I have another update query for a
> different db on an asp that works just great. Is there something I may
> have neglected to do for the db itself whose update query on an asp
> doesn't seem to work? Security issue?
>
> Thanks for any ideas,
>
> David



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-17-2005
If I understand you correctly, the key to determining the parameter order is
to test the query in Access. You should supply the parameter values in the
same order that Access prompts you for them when you test the saved query.
It has nothing to do with how you name your parameters (p1, p2, etc.) It's
all about the order in which they appear in your sql statement. The best way
to determine the proper order is to test the query in Access and keep track
of the order in which you are prompted for the values.

HTH,
Bob Barrows

David Shorthouse wrote:
> In my fiddling around, I think I solved it by really scrutinizing my
> code. I had no idea that the "Where" parameter should be at the end
> of the string of parameters for the Data Connection to the update
> query.
> Dave
>
>
>>
>> I have a problem with an update query on an asp not updating the
>> table in an Access db. The code runs, I have no errors, but when I
>> examine the table, nothing was updated. The query works as it should
>> in Access. Could anyone direct me to some sources that describe
>> solutions to what is likely a common problem? The strange thing is,
>> I have another update query for a different db on an asp that works
>> just great. Is there something I may have neglected to do for the db
>> itself whose update query on an asp doesn't seem to work? Security
>> issue? Thanks for any ideas,
>>
>> David


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
David Shorthouse
Guest
Posts: n/a
 
      06-17-2005
Gotcha. I had no idea that the order was important.

Thanks.

--
______________________________
Remove "_SPAM" to reply directly.
"Bob Barrows [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If I understand you correctly, the key to determining the parameter order
> is to test the query in Access. You should supply the parameter values in
> the same order that Access prompts you for them when you test the saved
> query. It has nothing to do with how you name your parameters (p1, p2,
> etc.) It's all about the order in which they appear in your sql statement.
> The best way to determine the proper order is to test the query in Access
> and keep track of the order in which you are prompted for the values.
>
> HTH,
> Bob Barrows
>
> David Shorthouse wrote:
>> In my fiddling around, I think I solved it by really scrutinizing my
>> code. I had no idea that the "Where" parameter should be at the end
>> of the string of parameters for the Data Connection to the update
>> query.
>> Dave
>>
>>
>>>
>>> I have a problem with an update query on an asp not updating the
>>> table in an Access db. The code runs, I have no errors, but when I
>>> examine the table, nothing was updated. The query works as it should
>>> in Access. Could anyone direct me to some sources that describe
>>> solutions to what is likely a common problem? The strange thing is,
>>> I have another update query for a different db on an asp that works
>>> just great. Is there something I may have neglected to do for the db
>>> itself whose update query on an asp doesn't seem to work? Security
>>> issue? Thanks for any ideas,
>>>
>>> David

>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
please help with optimisation of this code - update of given table according to another table Farraige Python 4 11-08-2006 07:58 PM
Trying to query the Address table data of AdventureWorks database from Query Analyzer - need help! Learner ASP .Net 1 01-30-2006 08:58 PM
trying to update a table after making a join select query on two tables rob merritt ASP .Net Datagrid Control 0 03-01-2005 10:33 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments