473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 3746
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 to SQL Server? It seems to be the only option...
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 back-end with SQL Server tables. We have tried...
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 but now i need to add code to an existing database...
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 our software so we kept the backend in A97 to make...
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 client machines is that the link will take anywhere...
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 that all Access users are a member of. I added...
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 figure out whether my predecessor deliberately...
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 right criteria. My problem. I am trying to...
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 connection is still present and you are trying to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.