Go Back   Access World Forums > Microsoft Access Reference > Code Repository

Thread Tools Rate Thread Display Modes
Old 07-01-2014, 08:18 AM   #1
Nothing In Moderation
Rx_'s Avatar
Join Date: Oct 2009
Location: Denver, Colorado
Posts: 2,803
Thanks: 636
Thanked 337 Times in 307 Posts
Rx_ has a spectacular aura about Rx_ has a spectacular aura about Rx_ has a spectacular aura about
Exclamation ODBC 42S22 Error for SQL Server Native Client for GIS workstation

This is more of a tip than code.
Making a SQL View available, it was able to be consumed by Access, Excel, and Oracle DB.
However the GIS division had this error 42S22.
Note: I am listing 42522 because many people searching also mistyped the number, the error message is hard to read.

Searching the internet, there wasn't much useful information on this.
Turned out that a field name was Well Locations with a space. I typically use an underscore Wells_Locations.
Sure enough, the underscore fixed it.

The GIS ODBC drivers have had funny issues before. Like for Access, just adding a primary key of an autonumber field might make it consumable.
Again, this exact same view with SQL Server Security (user name, password) could be consumed by Access using DSN-Less connection with SQL Server Native Client, ODBC connection, as could Excel and Oracle Shared Servers.

Rule number 1, never create a view with a space in the name. It was a typo on my part. It was hard to see the space and cost me way too much time and effort.
Hopefully, this will show up on a search and help someone else.
Attached Images
File Type: png sQL Server Native Client error 42S22.png (60.4 KB, 166 views)

Were you lucky enough to get an answer? Please mark your question as [SOLVED] The original poster can go to Thread Tools to mark it as Solved.

Quotation Thomas Jefferson: "Peace is that brief glorious moment in history when everybody stands around reloading."

There are 2 Kinds of Countries on this Planet
1. Those that use the Metric System
2. Those that had a man walk on the moon

Denver, Colorado - The "Mile High City" - non-metric!
Rx_ is offline   Reply With Quote
The Following User Says Thank You to Rx_ For This Useful Post:
Frothingslosh (07-09-2014)

42s22 , error , gis , odbc , sql server native client

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Native Client installed but can't create ODBC connection sjdeetz SQL Server 2 09-19-2013 06:42 PM
Attach DSNLessTable for SQL Server Native Client 10.0 Rx_ Code Repository 0 04-05-2012 01:19 PM
SQL Server 2008 MDAC ODBC Native Client 10 Rx_ SQL Server 5 04-08-2010 11:32 AM
Changing connection to SQL Native client arichins General 9 11-24-2009 10:54 PM
ODBC Error in query (client/server SQLServer) ahjeck Queries 5 11-06-2007 08:31 PM

All times are GMT -8. The time now is 08:41 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World