472,353 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

A97: Linking tables to SQL Server 2K

Hi,

I'm having problems with attaching two tables stored in an SQL Server
2000 to an Access 97 database. It worked well for all other tables
except those two.

This is what I did: Choose the data source from the ODBC dialog, choose
the database on SQL Server login, select all tables in the SQL Server
database. All tables were attached except the two, it says something[1]
like "database module can't find 'dbo_<tablename>'".

The name is not exceptionally long, a table with a 33-char name was
attached, the name of first table that was not attached was 26 chars.

I also tried it in code via CreateTableDef using SourceTableNames
"<database>.dbo.<table>", "dbo.<table>" and "<table>". All thre gave the
same error message as above, runtime error 3011 for the record.

Funny thing is that using MS Query or a pass-through query works.
(SELECT * FROM <database>.dbo.<table>).

I did check permissions on the tables in SQL Server.

I there something I missed or a workaround?

Some figures:
Access 97, SR-2 (German),
Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
ODBC driver SQLSRV32.DLL version 2000.81.9042.00

TIA,
Chris

[1] Sorry if I didn't quite get the right words, I'm using german
versions here.

Nov 12 '05 #1
5 3652
On May 16 2004, 06:40 pm, Christoph Sticksel <sp***************@gmx.net>
wrote in news:c8**********@news2.rz.uni-karlsruhe.de:
I'm having problems with attaching two tables stored in an SQL Server
2000 to an Access 97 database. It worked well for all other tables
except those two.

This is what I did: Choose the data source from the ODBC dialog, choose
the database on SQL Server login, select all tables in the SQL Server
database. All tables were attached except the two, it says something[1]
like "database module can't find 'dbo_<tablename>'".

The name is not exceptionally long, a table with a 33-char name was
attached, the name of first table that was not attached was 26 chars.


Are there any indexes on these tables with the names that are longer than
64 characters? If there are, this would cause a problem with linking,
although I don't recall the particular error message you would get in that
case.

--
remove a 9 to reply by email
Nov 12 '05 #2
Dimitri Furman <df*****@cloud99.net> wrote:

I'm having problems with attaching two tables stored in an SQL Server
2000 to an Access 97 database. It worked well for all other tables
except those two.

This is what I did: Choose the data source from the ODBC dialog, choose
the database on SQL Server login, select all tables in the SQL Server
database. All tables were attached except the two, it says something[1]
like "database module can't find 'dbo_<tablename>'".

The name is not exceptionally long, a table with a 33-char name was
attached, the name of first table that was not attached was 26 chars.


Are there any indexes on these tables with the names that are longer than
64 characters? If there are, this would cause a problem with linking,
although I don't recall the particular error message you would get in that
case.


Yeah, that's the problem. I knew I'd seen it before but couldn't recall the details.
(And it's at the bottom of my Random Thoughts on SQL Server Upsizing from Microsoft
Access Tips page at http://www.granite.ab.ca/access/sqlserverupsizing.htm.)

Error 3125 "The database engine can't find <name>. Make sure it is a valid parameter
or alias name, that it doesn't include invalid characters or punctuation, and that
the name isn't too long."

In particular the problem is likely the GUID based index names create when you setup
relationships.

To the original poster. Generate a SQL script via SQL Server Enterprise Manager.
Look for those long index names. Rename them. Recreate the SQL Server database and
reload the data.

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
Nov 12 '05 #3
> In particular the problem is likely the GUID based index names create when
you
setup relationships.
I think:

when you create relationships, you get relationship names based on
concatenating the two table names - so two long table names give you
a long long index name.

GUID index names come from importing relationships (?? or something
like that ??), and are ?? 38 characters long ??

so perhaps a solution is to first import all from the original
MDB into a new MDB. NOTE: make sure you have Jet 3.51 SR3
before importing relationships in A97: SR2 duplicated relationships
when importing.

(david)
"Tony Toews" <tt****@telusplanet.net> wrote in message
news:tb********************************@4ax.com... Dimitri Furman <df*****@cloud99.net> wrote:

I'm having problems with attaching two tables stored in an SQL Server
2000 to an Access 97 database. It worked well for all other tables
except those two.

This is what I did: Choose the data source from the ODBC dialog, choose
the database on SQL Server login, select all tables in the SQL Server
database. All tables were attached except the two, it says something[1]
like "database module can't find 'dbo_<tablename>'".

The name is not exceptionally long, a table with a 33-char name was
attached, the name of first table that was not attached was 26 chars.

Are there any indexes on these tables with the names that are longer than
64 characters? If there are, this would cause a problem with linking,
although I don't recall the particular error message you would get in thatcase.


Yeah, that's the problem. I knew I'd seen it before but couldn't recall

the details. (And it's at the bottom of my Random Thoughts on SQL Server Upsizing from Microsoft Access Tips page at http://www.granite.ab.ca/access/sqlserverupsizing.htm.)
Error 3125 "The database engine can't find <name>. Make sure it is a valid parameter or alias name, that it doesn't include invalid characters or punctuation, and that the name isn't too long."

In particular the problem is likely the GUID based index names create when you setup relationships.

To the original poster. Generate a SQL script via SQL Server Enterprise Manager. Look for those long index names. Rename them. Recreate the SQL Server database and reload the data.

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

Nov 12 '05 #4
Dimitri Furman <df*****@cloud99.net> wrote:
On May 16 2004, 06:40 pm, Christoph Sticksel <sp***************@gmx.net>
wrote in news:c8**********@news2.rz.uni-karlsruhe.de:
I'm having problems with attaching two tables stored in an SQL Server
2000 to an Access 97 database. It worked well for all other tables
except those two.

Are there any indexes on these tables with the names that are longer than
64 characters? If there are, this would cause a problem with linking,
although I don't recall the particular error message you would get in that
case.


That's it thanks. As on stated on Tony's page, the table's name plus the
longest index name was longer than 64 characters. I changed that and the
tables were attached without problems.

Thanks again,
Chris

Nov 12 '05 #5
Tony Toews <tt****@telusplanet.net> wrote:
To the original poster. Generate a SQL script via SQL Server Enterprise Manager.
Look for those long index names. Rename them. Recreate the SQL Server database and
reload the data.


This advice was way too complex. Should've been delete and recreate the index using
a short name.

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
Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John South | last post by:
I have an Access 2000 front end that I wish to work with a SQL Server 2000 database by means of Linked tables. Do I have to use an ODBC connection...
2
by: Jeff Pritchard | last post by:
Some time ago I am sure I came across something that said this was possible, though it doesn't seem to work. A client wants to replace an Access...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far...
22
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of...
18
by: Mark P | last post by:
I have a bit of vb code that uses Tables.Append to programatically link tables from Oracle and DB2 datasources. The problem I am having on some...
2
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group...
1
by: Andrew Chanter | last post by:
I have taken over support of an A97 application which has presented an interesting and confounding scenario involving workgroup security. I cant...
1
by: hmiller | last post by:
I'm sorry to populate the server with yet another question about linking multiple tables and queries, howerver I have not been able to find the...
3
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.