Re: Update problem ADO vbnet 2005
- From: admspam@xxxxxxxxx
- Date: 7 Aug 2006 11:58:19 -0700
Agreed, Cor...but to paraphrase Bill Clinton, "It depends on what the
meaning of 'doesn't work' is." I for one am interested to find out. :-)
Cor Ligthert [MVP] wrote:
Adm,
But than he should in my opinion get an error instead of non updating.
Cor
<admspam@xxxxxxxxx> schreef in bericht
news:1154974685.512842.157300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
just for fun, let me take a wild guess and suggest that this is perhaps
due to optimistic record locking.
scotty, before executing the .Update command, determine what the SQL
text of the command is. See if the 'WHERE' clause is really long and
includes every one of the fields in your table. In such cases, the
Where clause is so specific that it fails to find the record to update,
thus triggering an error much of the time. If this is the case, perhaps
you can simplify that command by including only the primary key in the
Where clause. This might introduce some concurrency issues (i.e., last
one in will always win), but it may also resolve your error.
If this isn't the situation and my shot in the dark missed the mark,
please post more details on the error and your code.
adm
Scotty wrote:
Hi Cor,
Thanks for willing help me,
This evening (Belgium time)I will send you more info about my code
Best regards
Marc,
Action-Data
"Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx> schreef in bericht
news:O9p1K4fuGHA.5084@xxxxxxxxxxxxxxxxxxxxxxx
Marc,
A sample would not help you there are millions of sample on Internet,
can
you show the code where you do the update.
Cor
"Action-Data" <Marc@xxxxxxxxxxxxxxx> schreef in bericht
news:%23wVUGyeuGHA.5056@xxxxxxxxxxxxxxxxxxxxxxx
Hi Cor,
Thanks for answering,
I don't have any adea why it does not work sometimes
The connection is coded in ADO (I did not use the grafical way)
Do you have a good sample for me?
Many thanks in advance,
Marc.
"Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx> schreef in bericht
news:OvhwOnduGHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
Can you tell why it "Sometimes doesnt work?, in other words does it
gives no others or what does not work.
Cor
"Scotty" <xxxxx2@xxxxxxxxxx> schreef in bericht
news:utIvT3UuGHA.1296@xxxxxxxxxxxxxxxxxxxxxxx
I like to have a good insert, update and delete code
The code below sometimes workl ok sometimes doesnt work, what i am
doing wrong??
Sub SaveAny()
Dim command_builder As New
OleDb.OleDbCommandBuilder(daOrders)
' Save any changes.
daOrders.Update(dsOrders, "tblOrders")
End Sub
Thanks for helping
Marc.
.
- Follow-Ups:
- Re: Update problem ADO vbnet 2005
- From: Scotty
- Re: Update problem ADO vbnet 2005
- References:
- Update problem ADO vbnet 2005
- From: Scotty
- Re: Update problem ADO vbnet 2005
- From: Cor Ligthert [MVP]
- Re: Update problem ADO vbnet 2005
- From: Action-Data
- Re: Update problem ADO vbnet 2005
- From: Cor Ligthert [MVP]
- Re: Update problem ADO vbnet 2005
- From: Scotty
- Re: Update problem ADO vbnet 2005
- From: admspam
- Re: Update problem ADO vbnet 2005
- From: Cor Ligthert [MVP]
- Update problem ADO vbnet 2005
- Prev by Date: Re: Get Application EXE name in VS.2005
- Next by Date: VB Access to Excell
- Previous by thread: Re: Update problem ADO vbnet 2005
- Next by thread: Re: Update problem ADO vbnet 2005
- Index(es):
Relevant Pages
|