473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ODBC Refresh Interval

We are using SQL Server as a back end to an Access front end on a LAN using
ODBC linked tables. Users are periodically getting the "data has been
changed by another user" error, and it's causing them to have to re-enter a
lot of data.

The ODBC refresh interval has been left at the default (1500 sec) on all
computers. I'm wondering if maybe changing that to a much smaller number
(150 seconds?) would help alleviate the problem. Also, I'm wondering if
there are other settings that could be tweaked to help with this problem.

Thank you for any assistance.
Sep 25 '07 #1
8 8962
Rich P <rp*****@aol.comwrote in
news:46**********************@news.qwest.net:
If you have major plans with your sql server, I would steer away
from ODBC and start focusing on ADO (ADO.Net being the best).
I don't quite understand your advice for two reasons:

1. ADO.NET cannot be used with an Access front end (that's what the
OP said he was using).

2. Microsoft is recommending MDB + ODBC over ADP + ADO. You seem to
be recommending MDB + ADO, but that causes a number of problems
(e.g,. no linked tables).

Why is MS not recommending MDB + ADO if it's better than what they
*are* recommending? Seems to me that MDB + ODBC is the future of
Access development, at least for now.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 27 '07 #2
"Phil Reynolds" <ph*******@msn.comwrote in
news:hW***************@newssvr14.news.prodigy.net:
I had heard that ADO was
supposed to be better than ODBC in theory, but that Microsoft
never really brought it to maturity, and that it's still full of
bugs. Not having ever used it, I don't know. But that's what I
heard.
ADO is dead, of course.

MS is now recommending MDB + ODBC for SQL Server back ends.

That brings with it certain problems with Jet which ADP + ADO did
not have (ADPs are now deprecated by MS, though still supported, but
the main selling point was that they bypassed Jet), but ADO brings
its own set of similar problems (it often guesses wrong about what
you want to do, just like Jet does). Usually, Jet + ODBC problems
can be overcome by balancing your work between Jet and the SQL
Server, whereas it's often not so easy to work around ADO's wrong
guesses (from what I've heard -- I never "drank the Kool Aid"
myself, but the people who had the problems were pretty vocal about
them).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 27 '07 #3
Not to dispute anything, but let me establish my position: I am an
enterprise programmer by trade, although I started out with Access but
have moved on (well, expanded my horizons). Access is not an Enterprise
tool. Visual Studio 2005 Enterprise is an enterprise tool. Sql Server
is an enterprise tool. I am responding to users who try to use Access
in the enterprise environment. If you are going to be doing enterprise
level programming - you should use an enterprise level tool like VS 2005
enterprise (or VS professional). But as long as people are going to try
to use Access in an Enterprise environment, I am just sharing my
experiences with that.

I spent a few years with ADP's - which are ODBC based - continuous
connections. I had more problems with that than I did using an MDB with
ADO and sql server.

For non enterprise operations and a sql server back end, ODBC is fine
with Access. But once you get more than one user using the application
at the same time - you are migrating into enterprise country and will
have the issues that is being posted about here.

Access is a great tool when used in its element (non enterprise). But
with time, everything is migrating to enterprise operations for which
Access was not really designed. Thus, enterprise tools like VS 2005
have been developed (by the same company - Microsoft).

For a non enterprise tool, Access has remarkable capabilities. But for
hard core enterprise operations, there just isn't any getting around
using an enterprise tool like .Net or Java.

Example: this week I had to create a custom graphical search program to
search harddisks for various files and open them (to validate records on
a sql server...interface with the sql server...). The program uses
delegates, interfaces, and .Net 2.0 framework GUI controls, ADO.Net. I
probably could write the code part in Access with a bunch of API's, but
I would not be able to use the GUI controls from the .Net framework
because Access is not .Net compatible. Even so, it would have been much
harder to implement the API's in Access (and a ton more code) than to
create this thing in .Net.

I share my com experience with the Access crowd because people shared
their experience with me when I was starting out, and it also keeps me
up to speed on new developments in com/Access. But for the folks who
need to do more than Access was designed for, I share my experience
their also. Obviously you can't use ADO.Net with Access, and I really
don't see why people say that ADO is dead. It may not have the
capabilties of ADO.Net, but it has way more capabilities than ODBC for
those people who need to use Access in an Enterprise setting.

If this thread is not about enterprise operations and Access, then my
discussion is pretty moot.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Sep 27 '07 #4
Thanks, David. One of the biggest (and most frustrating) problems I've had
with the ODBC approach (apart from the inability to lock a record, which
isn't a huge deal most of the time), is that I can't rely on FindFirst! With
a form bound to an ODBC linked table, I'll use FindFirst on the
RecordsetClone object to go to a particular record, and, even though I
always check the NoMatch property, oftentimes my user finds themselves at
the wrong record. MS has said in KB articles that this problem was fixed
with Jet x.y, or Jet y.z, or whatever. But I found that it hasn't gone away.

To work around this problem I implemented a routine which does the
following:

1) Perform a MoveLast on the recordsetclone (which creates a significant
delay, of course; but it seems to help the situation greatly).

2) After executing DoEvents, perform the FindFirst on the RecordsetClone
object.

3) If not NoMatch, then go to the recordsetclone record.

4) Explicitly check the value of the record you're at, to make sure it
actually is the right one.

5) If not in the right record, then requery the form, and go back to step 1.

This seems to have resolved the problem. But it sure is a pain to have to do
this for a simple Go To (and it presents delays in the process).

Have you ever had this problem with FindFirst bringing you to the wrong
record? Any tips/ideas/suggestions?

Thanks.
"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@216.196. 97.142...
"Phil Reynolds" <ph*******@msn.comwrote in
news:hW***************@newssvr14.news.prodigy.net:
>I had heard that ADO was
supposed to be better than ODBC in theory, but that Microsoft
never really brought it to maturity, and that it's still full of
bugs. Not having ever used it, I don't know. But that's what I
heard.

ADO is dead, of course.

MS is now recommending MDB + ODBC for SQL Server back ends.

That brings with it certain problems with Jet which ADP + ADO did
not have (ADPs are now deprecated by MS, though still supported, but
the main selling point was that they bypassed Jet), but ADO brings
its own set of similar problems (it often guesses wrong about what
you want to do, just like Jet does). Usually, Jet + ODBC problems
can be overcome by balancing your work between Jet and the SQL
Server, whereas it's often not so easy to work around ADO's wrong
guesses (from what I've heard -- I never "drank the Kool Aid"
myself, but the people who had the problems were pretty vocal about
them).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Sep 28 '07 #5
"Phil Reynolds" <ph*******@msn.comwrote in
news:g8*****************@newssvr19.news.prodigy.ne t:
Have you ever had this problem with FindFirst bringing you to the
wrong record? Any tips/ideas/suggestions?
I mostly don't use FindFirst like that in any but the smallest
recordsets. Sounds like you're opening a whole table and doing finds
with FindFirst. I don't do that, but instead filter to the requested
record.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 29 '07 #6
Yes, that's better. But the users like to scroll through records. Still,
it's encouraging to know that perhaps with smaller recordsets this problem
won't exist.

"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@216.196. 97.142...
"Phil Reynolds" <ph*******@msn.comwrote in
news:g8*****************@newssvr19.news.prodigy.ne t:
>Have you ever had this problem with FindFirst bringing you to the
wrong record? Any tips/ideas/suggestions?

I mostly don't use FindFirst like that in any but the smallest
recordsets. Sounds like you're opening a whole table and doing finds
with FindFirst. I don't do that, but instead filter to the requested
record.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Oct 1 '07 #7
Oh, one other thing I forgot to mention. When FindFirst would go to the
wrong record (which is why I implemented that loop), it would be off by
*exactly* 100 in the PK value. So it definitely was a bug in the ODBC
driver. But hopefully working with smaller recordsets will resolve the
issue.

"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@216.196. 97.142...
"Phil Reynolds" <ph*******@msn.comwrote in
news:g8*****************@newssvr19.news.prodigy.ne t:
>Have you ever had this problem with FindFirst bringing you to the
wrong record? Any tips/ideas/suggestions?

I mostly don't use FindFirst like that in any but the smallest
recordsets. Sounds like you're opening a whole table and doing finds
with FindFirst. I don't do that, but instead filter to the requested
record.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Oct 3 '07 #8
I am a bit late on this one but I had a bit of problems with this error
previously, especially when the user updates the Text or NText Field (SQL
Server 2000 BE / Access 2003 FE).

My fix was to add a timestamp Field to each of the Table. This seems to
help SQL Server tracks whether a row update being sent from Access FE has
been changed since the row was fetched by the same Access FE. In fact, this
error has not recurred on my database for over 18 months since the timestamp
Field was added.

--
HTH
Van T. Dinh
MVP (Access)


"Phil Reynolds" <ph*******@msn.comwrote in message
news:Ye****************@newssvr25.news.prodigy.net ...
We are using SQL Server as a back end to an Access front end on a LAN
using ODBC linked tables. Users are periodically getting the "data has
been changed by another user" error, and it's causing them to have to
re-enter a lot of data.

The ODBC refresh interval has been left at the default (1500 sec) on all
computers. I'm wondering if maybe changing that to a much smaller number
(150 seconds?) would help alleviate the problem. Also, I'm wondering if
there are other settings that could be tweaked to help with this problem.

Thank you for any assistance.

Oct 8 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bernard André | last post by:
Hi All, I am getting crazy.... This code work fine in step by step but at execution time, it looks like a delay to refresh the A2K table from VB is resulting in some records being treated more...
0
by: Conax | last post by:
Hi, It's me again asking about IFRAME. With UncleWobby, Steven Burn and Roland Hall's help, I was able to create a proper IFRAME section on my page. Now I come to the next problem. I'd...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
2
by: AJ | last post by:
Hi, I have a materialized view in oracle which is a complex view of 4 tables which belongs to different schemas.. create materialized view materialized_sum refresh complete start with...
1
by: David Codding | last post by:
I am using ODBC 4.51 and mySQL 4.0.1-NT. I have an app that is written in vb6 with msAccess 2000 that was converted to mySQL. Everything is working great except for one thing. I have a grid...
7
by: Willem | last post by:
Can someone tell me how I can get a page(any page) on the Internet to refresh automatically every 5 minutes. I was thinking along the lines of having a HTML file on my C-drive with JavaScript to do...
11
by: DraguVaso | last post by:
Hi, I want to make a small application in VB.NET that relinks all the query's and tables in an Access database that are linked via ODBC to an SQL Server. It must be able to relink all the tables...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
3
by: marik | last post by:
Hi, people. I have a question: Can somebody link me to a simple javascript piece of code, that allows me to get input from a combo box and set the refresh interval of the page to be that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.