Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ODBC Problem From Access97 to SQL 6.5

Posted on 1998-02-12
4
Medium Priority
?
375 Views
Last Modified: 2010-05-18
I continually receive ODBC Error 3146 in an Access97 app linked to SQL 6.5. I recently had to reinstall SQL after a struture change. I am afraid I missed some configuration option. I get this error when running INSERT INTO state ments to local temporay tables within the Access App.
DB - 4GB

The primary table has 1.4 million rows. 8 of 27 fileds had to be indexed.

256 MB Ram, 2Ppro, 16GB raid 5. 100baseT connections

0
Comment
Question by:shoebob
  • 2
4 Comments
 
LVL 1

Expert Comment

by:kuk010998
ID: 1090245
"ODBC Error 3146" is insufficient info. Go to debug mode after the error and list the Errors Collection: Ctrl-G to get the immediate window, for i=0 to Errors.Count-1:? Errors(i).Number,Errors(i).Description:next - Errors(0) usually contains the interesting stuff.
0
 

Accepted Solution

by:
KirkGray earned 200 total points
ID: 1090246
I Know of an Access - SQL Server Problem that involves The ANSI standard NULL comparision syntax.

The problem is that Access Tests the previous state of an updated
record (Optimistic Locking) to see if the data has changed.  and if it has you get an error.

The BUG is in that if a column is null during this comparision. Access tests Like So:

AField = NULL

SQL Server Will not report an error if you do this, but it will return incorrect results.  ie (afield = NULL) = False even when afield is null.

The correct ANSI syntax is:

afield IS NULL, but I have found no way to force Access to do this.

You will know if this is the problem if only records containing null fields cause the error.

Hope this helps,

    Kirk.

 


0
 

Author Comment

by:shoebob
ID: 1090247
I still feel the problem may lie in a configuration option. I'll look at the lock settings. I have a feeling it is something in indexing. I don't think it's a NULL problem because all valuse are defulated to '0'. Thanks
0
 

Author Comment

by:shoebob
ID: 1090248
Kuk - here are the errors
 3265
jeterr35.hlp
 5003265
DAO.Errors
Item not found in this collection.

Could this be a DAO problem? I run the query via a module with DAO.

The error description does not make sense. I can do this at certain times and with other Indexing structures.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question