Question

ODBC--call failed on linked table

Asked by: DanielJohnson

I am trying to run a MS Access query on a linked table. On one of the fields I need to have a "empty" criteria that the user must specify when running the query. When I link the table and run the query I get an ODBC--call failed message. If I import the table and run the same query it works fine. Any help would be greatly appreciated.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-10-20 at 10:47:16ID20772248
Tags

failed

,

odbc

,

call

,

linked

,

table

,

Btrieve

Topic

4GL Databases

Participating Experts
1
Points
135
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ODBC
    I am currently now designing an application that is using ODBC as an interface. My database is MS Access. And i'm using Visual C++ to developed my front end application. I developed my front end application using the app wizard and connect it to the data source through the OD...
  2. ODBC
    What is ODBC and how do you use it. Do you know of any good web sites that I can get an overview of ODBC.
  3. ODBC
    I am trying to link a large Oracle table through an ODBC driver. I can create relationships with other tables and that all works okay. When I try to do a 'make table query' that should pull apprx. 100,000 records over to Access I get an 'ODBC Call Failure' error. I can pu...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mirtheilPosted on 2003-10-20 at 12:12:42ID: 9585526

A couple of questions:
-- What's the query you are running?  
-- What version of Pervasive/Btrieve are you using?  
-- Can you turn on ODBC tracing and find out exactly what error is being returned to Access (because Access isn't telling you the real error).  
-- Does the query run through the Pervasive Control Center or SQLScope or some other ODBC tool when accessing the Pervasive data?

 

by: DanielJohnsonPosted on 2003-10-21 at 03:51:22ID: 9589656

-- What's the query you are running?
Just a query to create a box label by pulling data from a .btr file.

-- What version of Pervasive/Btrieve are you using?  
Pervasive SQL7 ODBC driver v2.54.04.00

-- Can you turn on ODBC tracing and find out exactly what error is being returned to Access (because Access isn't telling you the real error).  
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
\viewkind4\uc1\pard\f0\fs20\par
}
 
Labels          61c-6c4      ENTER SQLAllocEnv
            HENV *              0012D970

Labels          61c-6c4      EXIT  SQLAllocEnv  with return code 0 (SQL_SUCCESS)
            HENV *              0x0012D970 ( 0x089e1540)

Labels          61c-6c4      ENTER SQLAllocConnect
            HENV                089E1540
            HDBC *              0012D97C

Labels          61c-6c4      EXIT  SQLAllocConnect  with return code 0 (SQL_SUCCESS)
            HENV                089E1540
            HDBC *              0x0012D97C ( 0x089e15e8)

Labels          61c-6c4      ENTER SQLSetConnectOption
            HDBC                089E15E8
            SQLINTEGER                 103 <SQL_LOGIN_TIMEOUT>
            SQLPOINTER          0x00000014

Labels          61c-6c4      EXIT  SQLSetConnectOption  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            SQLINTEGER                 103 <SQL_LOGIN_TIMEOUT>
            SQLPOINTER          0x00000014 (BADMEM)

Labels          61c-6c4      ENTER SQLSetConnectAttrW
            SQLHDBC             089E15E8
            SQLINTEGER               30002 <unknown>
            SQLPOINTER          [Unknown attribute 30002]
            SQLINTEGER                  -3

Labels          61c-6c4      EXIT  SQLSetConnectAttrW  with return code 0 (SQL_SUCCESS)
            SQLHDBC             089E15E8
            SQLINTEGER               30002 <unknown>
            SQLPOINTER          [Unknown attribute 30002]
            SQLINTEGER                  -3

Labels          61c-6c4      ENTER SQLDriverConnectW
            HDBC                089E15E8
            HWND                000801B8
            WCHAR *             0x089A9EF0 [      -3] "******\ 0"
            SWORD                       -3
            WCHAR *             0x089A9EF0
            SWORD                        8
            SWORD *             0x00000000
            UWORD                        0 <SQL_DRIVER_NOPROMPT>

Labels          61c-6c4      EXIT  SQLDriverConnectW  with return code 1 (SQL_SUCCESS_WITH_INFO)
            HDBC                089E15E8
            HWND                000801B8
            WCHAR *             0x089A9EF0 [      -3] "******\ 0"
            SWORD                       -3
            WCHAR *             0x089A9EF0
            SWORD                        8
            SWORD *             0x00000000
            UWORD                        0 <SQL_DRIVER_NOPROMPT>

            DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)

            DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                        9 <SQL_ODBC_API_CONFORMANCE>
            PTR                 0x0012D9A0
            SWORD                        2
            SWORD *             0x0012D998

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                        9 <SQL_ODBC_API_CONFORMANCE>
            PTR                 0x0012D9A0 (2)
            SWORD                        2
            SWORD *             0x0012D998 (2)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x0012D8B0
            SWORD                      200
            SWORD *             0x0012D998

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x0012D8B0 [      24] "W32BTINT.DLL"
            SWORD                      200
            SWORD *             0x0012D998 (24)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                       46 <SQL_TXN_CAPABLE>
            PTR                 0x0012D87A
            SWORD                        2
            SWORD *             0x0012D44C

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                       46 <SQL_TXN_CAPABLE>
            PTR                 0x0012D87A (1)
            SWORD                        2
            SWORD *             0x0012D44C (2)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                       23 <SQL_CURSOR_COMMIT_BEHAVIOR>
            PTR                 0x027E7ED8
            SWORD                        2
            SWORD *             0x0012D44C

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                       23 <SQL_CURSOR_COMMIT_BEHAVIOR>
            PTR                 0x027E7ED8 (2)
            SWORD                        2
            SWORD *             0x0012D44C (2)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                       24 <SQL_CURSOR_ROLLBACK_BEHAVIOR>
            PTR                 0x027E7EDA
            SWORD                        2
            SWORD *             0x0012D44C

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                       24 <SQL_CURSOR_ROLLBACK_BEHAVIOR>
            PTR                 0x027E7EDA (2)
            SWORD                        2
            SWORD *             0x0012D44C (2)

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                        1 <SQL_ACTIVE_STATEMENTS>
            PTR                 0x0012D880
            SWORD                        2
            SWORD *             0x0012D866

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                        1 <SQL_ACTIVE_STATEMENTS>
            PTR                 0x0012D880 (0)
            SWORD                        2
            SWORD *             0x0012D866 (2)

Labels          61c-6c4      ENTER SQLAllocStmt
            HDBC                089E15E8
            HSTMT *             0012D444

Labels          61c-6c4      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            HSTMT *             0x0012D444 ( 0x089e1bd8)

Labels          61c-6c4      ENTER SQLGetStmtOption
            HSTMT               089E1BD8
            UWORD                        0
            PTR                0x0012D3F0

Labels          61c-6c4      EXIT  SQLGetStmtOption  with return code 0 (SQL_SUCCESS)
            HSTMT               089E1BD8
            UWORD                        0
            PTR                0x0012D3F0

Labels          61c-6c4      ENTER SQLSetStmtOption
            HSTMT               089E1BD8
            UWORD                        0 <SQL_QUERY_TIMEOUT>
            SQLPOINTER          0x0000003C

Labels          61c-6c4      EXIT  SQLSetStmtOption  with return code -1 (SQL_ERROR)
            HSTMT               089E1BD8
            UWORD                        0 <SQL_QUERY_TIMEOUT>
            SQLPOINTER          0x0000003C

            DIAG [S1C00] [Pervasive Software][ODBC Interface]Driver not capable. (0)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D374 (NYI)
             SDWORD *            0x0012D3C0
            WCHAR *             0x027EBEB0
            SWORD                     4095
            SWORD *             0x0012D3AC

Labels          61c-6c4      EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D374 (NYI)
             SDWORD *            0x0012D3C0 (0)
            WCHAR *             0x027EBEB0 [      55] "[Pervasive Software][ODBC I"
            SWORD                     4095
            SWORD *             0x0012D3AC (55)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D374 (NYI)
             SDWORD *            0x0012D3C0
            WCHAR *             0x027EBF30
            SWORD                     4031
            SWORD *             0x0012D3AC

Labels          61c-6c4      EXIT  SQLErrorW  with return code 100 (SQL_NO_DATA_FOUND)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D374 (NYI)
             SDWORD *            0x0012D3C0
            WCHAR *             0x027EBF30
            SWORD                     4031
            SWORD *             0x0012D3AC

Labels          61c-6c4      ENTER SQLExecDirectW
            HSTMT               089E1BD8
            WCHAR *             0x1B0752D8 [      -3] "SELECT Config, nValue FROM MSysConf\ 0"
            SDWORD                    -3

Labels          61c-6c4      EXIT  SQLExecDirectW  with return code -1 (SQL_ERROR)
            HSTMT               089E1BD8
            WCHAR *             0x1B0752D8 [      -3] "SELECT Config, nValue FROM MSysConf\ 0"
            SDWORD                    -3

            DIAG [S0002] [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]The table is not defined in the dictionary. (204)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D384 (NYI)
             SDWORD *            0x0012D3D0
            WCHAR *             0x027EBEB0
            SWORD                     4095
            SWORD *             0x0012D3BC

Labels          61c-6c4      EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D384 (NYI)
             SDWORD *            0x0012D3D0 (204)
            WCHAR *             0x027EBEB0 [     110] "[Pervasive Software][ODBC Interface][Pervasive Software"
            SWORD                     4095
            SWORD *             0x0012D3BC (110)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D384 (NYI)
             SDWORD *            0x0012D3D0
            WCHAR *             0x027EBFA2
            SWORD                     3974
            SWORD *             0x0012D3BC

Labels          61c-6c4      EXIT  SQLErrorW  with return code 100 (SQL_NO_DATA_FOUND)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012D384 (NYI)
             SDWORD *            0x0012D3D0
            WCHAR *             0x027EBFA2
            SWORD                     3974
            SWORD *             0x0012D3BC

Labels          61c-6c4      ENTER SQLFreeStmt
            HSTMT               089E1BD8
            UWORD                        1 <SQL_DROP>

Labels          61c-6c4      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               089E1BD8
            UWORD                        1 <SQL_DROP>

Labels          61c-6c4      ENTER SQLGetInfoW
            HDBC                089E15E8
            UWORD                       17 <SQL_DBMS_NAME>
            PTR                 0x0012E11C
            SWORD                      200
            SWORD *             0x0012E1E6

Labels          61c-6c4      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            UWORD                       17 <SQL_DBMS_NAME>
            PTR                 0x0012E11C [      14] "BTRIEVE"
            SWORD                      200
            SWORD *             0x0012E1E6 (14)

Labels          61c-6c4      ENTER SQLAllocStmt
            HDBC                089E15E8
            HSTMT *             087E284C

Labels          61c-6c4      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8
            HSTMT *             0x087E284C ( 0x089e1bd8)

Labels          61c-6c4      ENTER SQLGetStmtOption
            HSTMT               089E1BD8
            UWORD                        0
            PTR                0x0012E16C

Labels          61c-6c4      EXIT  SQLGetStmtOption  with return code 0 (SQL_SUCCESS)
            HSTMT               089E1BD8
            UWORD                        0
            PTR                0x0012E16C

Labels          61c-6c4      ENTER SQLBindParameter
            HSTMT               089E1BD8
            UWORD                        1
            SWORD                        1 <SQL_PARAM_INPUT>
            SWORD                       -8 <SQL_C_WCHAR>
            SWORD                       12 <SQL_VARCHAR>
            SQLULEN                  510
            SWORD                        0
            PTR                0x087E3854
            SQLLEN                     0
            SQLLEN *            0x087E3850

Labels          61c-6c4      EXIT  SQLBindParameter  with return code -1 (SQL_ERROR)
            HSTMT               089E1BD8
            UWORD                        1
            SWORD                        1 <SQL_PARAM_INPUT>
            SWORD                       -8 <SQL_C_WCHAR>
            SWORD                       12 <SQL_VARCHAR>
            SQLULEN                  510
            SWORD                        0
            PTR                0x087E3854
            SQLLEN                     0
            SQLLEN *            0x087E3850

            DIAG [S1104] [Pervasive Software][ODBC Interface]Invalid precision value. (0)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012E0B0 (NYI)
             SDWORD *            0x0012E0FC
            WCHAR *             0x027EBEB0
            SWORD                     4095
            SWORD *             0x0012E0E8

Labels          61c-6c4      EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012E0B0 (NYI)
             SDWORD *            0x0012E0FC (0)
            WCHAR *             0x027EBEB0 [      60] "[Pervasive Software][ODBC Inte"
            SWORD                     4095
            SWORD *             0x0012E0E8 (60)

Labels          61c-6c4      ENTER SQLErrorW
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012E0B0 (NYI)
             SDWORD *            0x0012E0FC
            WCHAR *             0x027EBF3A
            SWORD                     4026
            SWORD *             0x0012E0E8

Labels          61c-6c4      EXIT  SQLErrorW  with return code 100 (SQL_NO_DATA_FOUND)
            HENV                089E1540
            HDBC                089E15E8
            HSTMT               089E1BD8
            WCHAR *             0x0012E0B0 (NYI)
             SDWORD *            0x0012E0FC
            WCHAR *             0x027EBF3A
            SWORD                     4026
            SWORD *             0x0012E0E8

Labels          61c-6c4      ENTER SQLFreeStmt
            HSTMT               089E1BD8
            UWORD                        1 <SQL_DROP>

Labels          61c-6c4      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               089E1BD8
            UWORD                        1 <SQL_DROP>

Labels          61c-6c4      ENTER SQLDisconnect
            HDBC                089E15E8

Labels          61c-6c4      EXIT  SQLDisconnect  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8

Labels          61c-6c4      ENTER SQLFreeConnect
            HDBC                089E15E8

Labels          61c-6c4      EXIT  SQLFreeConnect  with return code 0 (SQL_SUCCESS)
            HDBC                089E15E8

Labels          61c-6c4      ENTER SQLFreeEnv
            HENV                089E1540

Labels          61c-6c4      EXIT  SQLFreeEnv  with return code 0 (SQL_SUCCESS)
            HENV                089E1540

-- Does the query run through the Pervasive Control Center or SQLScope or some other ODBC tool when accessing the Pervasive data?
Not sure what you mean on this. I believe the query runs through the 32-bit ODBC Administrator to access the Pervasive data.

 

by: mirtheilPosted on 2003-10-21 at 06:54:12ID: 9590745

Perhaps I wasn't clear.  When I asked for the query, I actually wanted to see the sQL statement itself to see if there was something overtly wrong in the statement that could cause the error.  
Pervasive SQL7 ODBC driver v2.54.04.00 is a very old version of the engine.  There have been two major versions since (Pervasive.SQL 2000i and Pervasive.SQL V8).  Is there a reason you're still using the old version?
I only see one error in the trace that might be causing problems. The error is "DIAG [S1104] [Pervasive Software][ODBC Interface]Invalid precision value. (0)."  This error could indicate a problem with the DDFs or with the data itself.  Please post the SQL statement that's being used so that we can look at it.  
Also, is the Access query a SQL Pass-Through query or is it a standard Access query?  If it's a standard Access query, can you try it as a Pass-Through query?  
The 32-bit ODBC Administrator doesn't run any queries. It creates DataSource entries that can be used by other tools.  What I want to know is if you run that query outside of Access, does it work?  If it does, then the problem is in Access.  Because you're using Pervasive.SQL 7.0, the tool you are going to use is SQLScope.  

 

by: DanielJohnsonPosted on 2003-10-21 at 12:51:03ID: 9593431

Sorry about that, I'm fairly new with MS Access.

SQL Statement - SELECT INVEN1.itemno, INVEN1.descr, INVEN1.mfgr, INVEN1.skuum
FROM INVEN1
WHERE (((INVEN1.itemno)=[Item]));

The reason I am using SQL7 is because originally we were told that our distribution software was not compatible with SQL2000. Our distribution software contains the .btr files that I am pulling the data from. I am checking to see if our software is now compatible with SQL2000.

Confirmed with the software mfg that I have the latest DDF's, ran a BUTIL recover/load on the .btr table. This should have fixed any data problems that might have existed.

The Access query is a standard Access query. Tried it as a Pass-Through query and got the following error.
ODBC--Call failed, [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]The syntax for an expression or restriction clause is invalid. (#221) [Pervasive Software][ODBC Interface][Pervasive Software SQL Engione]The variable reference is invalid. (#807)

Tried running the query using SQL scope and got the same "The syntax for an expression or restriction clause is invalid. (#221)" error.

 

by: mirtheilPosted on 2003-10-21 at 19:04:19ID: 9595703

What happens if you change the query to:
SELECT INVEN1.itemno, INVEN1.descr, INVEN1.mfgr, INVEN1.skuum
FROM INVEN1
WHERE INVEN1.itemno=[i]itemno[/i]
This should work in Access,  Pass-THrough, and SQL Scope.

 

by: DanielJohnsonPosted on 2003-10-22 at 04:14:40ID: 9597841

When I try that in Access, I get "Syntax error (missing operator) in query expression 'INVEN1.itemno=[i]itemno[/i]'. Access is really the one that I need this query to work with.

 

by: mirtheilPosted on 2003-10-22 at 06:45:22ID: 9598690

Sorry about that.  I'm used to other boards where the [i] indicates italics.  What I was suggesting was to hard code the value of the itemno field, for testing.  If that works, then there's something in the way your query is written. If it also fails, then the query can be used in SQLScope to see the real error.

 

by: mirtheilPosted on 2003-10-22 at 06:46:08ID: 9598696

Sorry about that.  I'm used to other boards where the [i] indicates italics.  What I was suggesting was to hard code the value of the itemno field, for testing.  If that works, then there's something in the way your query is written. If it also fails, then the query can be used in SQLScope to see the real error.
One other thing that I just thought of.  Is the "Access/Jet Compatibility Mode" checked in the ODBC DSN? If not, check it, relink any tables and try the query again.

 

by: DanielJohnsonPosted on 2003-10-22 at 07:04:03ID: 9598845

Hard Coding a value works, also not using criteria works.

I checked the "Access/Jet Compatibility Mode" (it was unchecked), relinked table, but still get ODBC--call failed.

 

by: mirtheilPosted on 2003-10-22 at 07:52:51ID: 9599192

Where does the [Item] value come from in the original query?

 

by: DanielJohnsonPosted on 2003-10-22 at 07:57:25ID: 9599214

That comes in where the user must type/specify the "Item" that they would like to print a label for. Otherwise Access will print a label for every item in the database (over 15,000)

 

by: mirtheilPosted on 2003-10-22 at 08:04:54ID: 9599278

I tried in my test environment which includes Pervasive.SQL 2000 and Pervasive.SQL V8 and the Pervasive sample data and was not able to see any problems.  I also tried some of my data.  Can you try on another table and another database?  Does it return the same error?

 

by: DanielJohnsonPosted on 2003-10-22 at 08:11:55ID: 9599336

This is a problem that I have run into numerous times when trying to specify "Criteria". It works on most of the tables that I have tried it on. Unfortunatley I just have the 1 database. I am still waiting to hear from my software mfg on upgrading to Pervasive.SQL 2000.

I just don't understand why when I import the table rather than link to it everything works fine.

 

by: mirtheilPosted on 2003-10-22 at 09:19:47ID: 9599872

When you import, Access may actually change the data type to something it can handle.  When it's linked it's trying to convert the data type through ODBC.  

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...