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.
Any ideas ?[posted and mailed, please reply in news]
Eyal Goren (eyal_goren@.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, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi,
Thanks for the workaround, it seems to work.
Just one small question:
I added the following code-
r = dbcmd (login_rec->dbproc, command);
if (r == SUCCEED) r = dbsqlexec (login_rec->dbproc);
dbcancel (login_rec->dbproc);
I added the dbcancel to clear the buffer, is that O.K. for this purpose ?
Thanks
Eyal|||Eyal Goren (eyal_goren@.bmc.com) writes:
> Thanks for the workaround, it seems to work.
> Just one small question:
> I added the following code-
> r = dbcmd (login_rec->dbproc, command);
> if (r == SUCCEED) r = dbsqlexec (login_rec->dbproc);
>
> dbcancel (login_rec->dbproc);
> I added the dbcancel to clear the buffer, is that O.K. for this purpose
> ?
I can't see that there could be any problems in this case. But personally
I would have done the regular dbresults() loop instead. I've seen ugly
things happen with canceling queries.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns94ED6DB081AE7Yazorman@.127.0.0.1>...
> Eyal Goren (eyal_goren@.bmc.com) writes:
> > Thanks for the workaround, it seems to work.
> > Just one small question:
> > I added the following code-
> > r = dbcmd (login_rec->dbproc, command);
> > if (r == SUCCEED) r = dbsqlexec (login_rec->dbproc);
> > dbcancel (login_rec->dbproc);
> > I added the dbcancel to clear the buffer, is that O.K. for this purpose
> > ?
> I can't see that there could be any problems in this case. But personally
> I would have done the regular dbresults() loop instead. I've seen ugly
> things happen with canceling queries.
Thanks for your help!!!

No comments:
Post a Comment