[posted and mailed, please reply in news]
Eyal Goren (ey********@bmc.com) writes:
We have troubles when we try to use the 'dbuse' calls with databases
larger than 28 characters, looks like the dbuse truncates the name
after it.
Are you really sure that it is 28? I would expect the limit to be 30,
and testing confirms that.
DB-Library is a client library that Microsoft has deprecated and has
not developed since the relase of SQL Server 6.5. This means that you
do not have support for features added in SQL 7 or later. In 6.5 the
maximum length of an object name (database, table, stored procedure etc)
was 30 characters. This was increased to 127 characters in SQL7. However
DB-Library does not know about this and truncates after 30 chars.
In this particular case there is a fairly simple workaround: use dbcmd
and dbsqlexec to pass a USE command instead.
For the long term, I would recommend that you plan for migrating your
DB-library apps to some other client library.
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp