msvcrtl.dll Crash

J

Jim Hicks

Several Access Front End databases connected to MS SQL
Server. Created in Acces97. Processed thru MS COnversion
tool and found no issues.

COnverted to Access 2003 in the 2000 table format and
about every 2 or 3rd time the database opens we get a
message that the database needs to be repaired - send
error to MS etc. Looking at the error in detail it is
ALWAYS centered around msvcrt.dll and a memory address.
Have this on a couple of hundred PC running Win XP Pro
SP1a with current MDAC and Office 2003 SP1. PLEASE if
anyone has this issue or knows of the problem/solution,
get in touch directly. Some machines are upgrades some
are fresh installs ... makes not difference. HELP!!!
 
T

Tony Toews

Jim Hicks said:
Several Access Front End databases connected to MS SQL
Server. Created in Acces97. Processed thru MS COnversion
tool and found no issues.

COnverted to Access 2003 in the 2000 table format and
about every 2 or 3rd time the database opens we get a
message that the database needs to be repaired - send
error to MS etc. Looking at the error in detail it is
ALWAYS centered around msvcrt.dll and a memory address.
Have this on a couple of hundred PC running Win XP Pro
SP1a with current MDAC and Office 2003 SP1. PLEASE if
anyone has this issue or knows of the problem/solution,
get in touch directly.

1) Are you sharing the FE among the users? If so you really, really
want to put the FE on each machine or place in a user specific
directory on the server. This will help avoid some weird error
messages when users are changing the same forms record source, filters
and such as well as corruptions.

A97 worked ok with sharing the FE, although not great. However A2000
and newer don't like it at all.

I specifically created the Auto FE Updater utility so that I could
make changes to the FE MDE as often as I wanted and be quite confident
that the next time someone went to run the app that it would pull in
the latest version. For more info on the errors or the Auto FE
Updater utility see the free Auto FE Updater utility at
http://www.granite.ab.ca/access/autofe.htm at my website to keep the
FE on each PC up to date.

In a Terminal Server or Citrix environment the Auto FE Updater now
supports creating a directory named after the user on a server. Given
a choice put the FE on the Citrix server to reduce network traffic and
to avoid having to load objects over the network which can be somewhat
sluggish.

2) Current MDAC isn't important if you are not using ADO. Given that
you've just converted from A97 you are likely still using DAO. Do you
have Jet 4.0 SP8 or newer installed on all the workstations?

What I've done is use the various API calls available and am checking
the version number and date/time of a crucial dll, msjetxx.dll, to
ensure it matches what I have on my system. See the Verify
Appropriate Jet Service Pack is installed page at my website for more
details including sample code:
www.granite.ab.ca\access\verifyjetsp.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
T

Tony Toews

jhicks52 said:
FE is on local machines.
Good.

While I am prety good with Access Applications - not real great with the
code. How can I check for DAO vs ADO?

Do you have any references besides the basic three or four? Are you
sure you need them? Write down the path and name of the extra ones,
delete from the references list and Compile and Save All. Keep any
necessary references and ensure they are distributed to the target
system.

For a very detailed page on reference problems see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

Ctrl+G will take you into the Debug/Immediate window. Then click on
Tools on the menu bar and References.

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
I was using WZMain80.mde but removed
that refernce and replaced with the new libraries.

Hmm, you likely didn't need that reference at all.
And I did install Jet 4 sp8

However are you using code to double check that Jet 4.0 SP8 or newer
is on all the client systems and is the identical version.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
J

jhicks52

Here are my references

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3
acwsmain
acwzlib
awztool

Should I activate
Microsoft ActiveX Data Objects 2.1 Library

Next I HAD (have deactivated in testing) the following module to relink the
SQL Tables via of the autoexec macro. Seems to be working much better now.
The crash was happening during this process. Is this the problem?

Function CreateODBCLinkedTables() As Boolean
On Error GoTo CreateODBCLinkedTables_Err
Dim strTblName As String, strConn As String
Dim db As Database, rs As Recordset, tbl As TableDef
' ---------------------------------------------
' Register ODBC database(s)
' ---------------------------------------------
Set db = CurrentDb
Set rs = db.OpenRecordset("tblODBCDataSources")
With rs
While Not .EOF
DBEngine.RegisterDatabase rs("DSN"), _
"SQL Server", _
True, _
"Description=" & rs("DSN") & _
Chr(13) & "Server=" & rs("Server") & _
Chr(13) & "Database=" & rs("DataBase")
' ---------------------------------------------
' Link table
' ---------------------------------------------
strTblName = rs("LocalTableName")
strConn = "ODBC;"
strConn = strConn & "DSN=" & rs("DSN") & ";"
strConn = strConn & "APP=Microsoft Access;"
strConn = strConn & "DATABASE=" & rs("DataBase") & ";"
strConn = strConn & "UID=" & rs("UID") & ";"
strConn = strConn & "PWD=" & rs("PWD") & ";"
strConn = strConn & "TABLE=" & rs("ODBCTableName")
If (DoesTblExist(strTblName) = False) Then
Set tbl = db.CreateTableDef(strTblName, _
dbAttachSavePWD, rs("ODBCTableName"), _
strConn)
db.TableDefs.Append tbl
Else
Set tbl = db.TableDefs(strTblName)
tbl.Connect = strConn
tbl.RefreshLink
End If

rs.MoveNext
Wend
End With
CreateODBCLinkedTables = True
MsgBox "Refreshed ODBC Connection to CPAS Data Sources", vbInformation
CreateODBCLinkedTables_End:
Exit Function
CreateODBCLinkedTables_Err:
MsgBox err.Description, vbCritical, "MyApp"
Resume CreateODBCLinkedTables_End
End Function

'***************************************************************
'The DoesTblExist function validates the existence of a TableDef
'object in the current database. The result determines if an
'object should be appended or its Connect property refreshed.
'***************************************************************

Function DoesTblExist(strTblName As String) As Boolean
On Error Resume Next
Dim db As Database, tbl As TableDef
Set db = CurrentDb
Set tbl = db.TableDefs(strTblName)
If err.Number = 3265 Then ' Item not found.
DoesTblExist = False
Exit Function
End If
DoesTblExist = True
End Function

THANKS
 
T

Tony Toews

jhicks52 said:
Here are my references

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library

Above are good.
Microsoft Visual Basic for Applications Extensibility 5.3
acwsmain
acwzlib
awztool

Above four are almost certainly not required. Remove them and Ctrl+G
to open the immediate window >> Debug >> Compile. Although being the
pessimist that I am I'd say make a backup first.
Should I activate
Microsoft ActiveX Data Objects 2.1 Library

No. You're not using ADO so don't bother.
Next I HAD (have deactivated in testing) the following module to relink the
SQL Tables via of the autoexec macro.

I'm not at all familiar with the dbengine.registerdatabase as I use
DSN less connections to SQL Server. Less stuff for the user to muck
with.

Using DSN-Less Connections
http://members.rogers.com/douglas.j.steele/DSNLessLinks.html
ODBC DSN-Less Connection Tutorial Part I
http://www.amazecreations.com/datafast/GetFile.aspx?file=ODBCTutor01.htm&Article=true
HOWTO: Use "DSN-Less" ODBC Connections with RDO and DAO
http://support.microsoft.com/?id=147875
ODBC DSN Less
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm
Seems to be working much better now.
The crash was happening during this process. Is this the problem?

Possible.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Top