?
Solved

MAS90 ODBC error - slash in table name

Posted on 2004-09-01
12
Medium Priority
?
684 Views
Last Modified: 2011-09-20
Hello,

I get a SQL Syntax error when I try to access a table with special character in its name. If I enclose it in square brackets, I get a different error for all tables - with or without special character in name. All tables can be accessed from MS Access.

MDAC 2.8
ODBC Driver Name: MAS 90 32-Bit ODBC Driver
Ver: 2.10.00.00
Company: ProvideX Technologies

Code:
            Set rs = New adodb.Recordset

            rs.Open tblName, con, adOpenStatic, adLockReadOnly, adCmdTable

Error: Syntax error

            rs.Open "[" & tblName & "]", con, adOpenStatic, adLockReadOnly, adCmdTable

Error: -2147217887 : ODBC driver does not support the requested properties

            If rs.Fields.count > 0 Then
                For i = 0 To rs.Fields.count - 1
                        list1.AddItem s
                Next i

                fldTable = tblName
            End If

Any solution?
0
Comment
Question by:vbdev04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 12

Expert Comment

by:geotiger
ID: 11956111

Have you tried to put in single quote such as

Set tblName = "'" & tblName & "'"


GT
0
 

Author Comment

by:vbdev04
ID: 11956353

Nope that didn't work

Thanks,
0
 
LVL 8

Expert Comment

by:Mourdekai
ID: 11957828
What is the name of the table you are trying to access?

Also, what is the connection string you are using for your recordset?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:vbdev04
ID: 11959221

I use DSN to access this table: SO1_S/OEntryHeade. There isn't any problem accessing other tables.

Thanks,




0
 
LVL 8

Expert Comment

by:Mourdekai
ID: 11965058
My TRSG for Mas90 reports the table name as: SO1_SOEntryHeader, maybe give that a try instead?

What version of Mas90 do you have?
0
 

Author Comment

by:vbdev04
ID: 11967365

Let me try that.

Thanks,
0
 

Author Comment

by:vbdev04
ID: 12249555

Mourdekai,

Using table name without slash didnt work :(

Still hoping ...

Thanks,
0
 
LVL 8

Expert Comment

by:Mourdekai
ID: 12252455
Try manually linking the table first like:

File -> Get External Data -> Link Tables...

Then select ODBC Databases from "files of type"

Then choose your Mas90 connection, and sign on if needed, then scroll through the list to find the table you want and link it.  Now what is the name that it gives to that table you just linked?  Try that one.
0
 

Author Comment

by:vbdev04
ID: 12252592

If I cant get the Mas90 ODBC driver to work directly with ADO, I will have to work with MS Access linked tables or pass-thru queries. But before that I want to see if I can get it to work directly without using Access as go between. It is likely that there isn't any direct access solution ...

So far I have tried:
 SO1_S/OEntryHeader
 [SO1_S/OEntryHeader]
 “SO1_S/OEntryHeader”
 ‘SO1_S/OEntryHeader’

Let me know if you have any other suggestions. Thanks for your help.

0
 
LVL 8

Accepted Solution

by:
Mourdekai earned 2000 total points
ID: 12252755
I just meant to use Access to check out what the name of the table is.  Sorry for the confusion.
0
 

Author Comment

by:vbdev04
ID: 12253494

Success! Using double quotes worked. I am not sure why it didnt work the first time around.

Anyways thanks for all your help
0
 
LVL 8

Expert Comment

by:Mourdekai
ID: 12253511
Sure thing, glad you got it working!
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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