473,472 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"dbuse" fails when database name is larger than 28 characters

Hi,

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 ???
Jul 20 '05 #1
4 2271
[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
Jul 20 '05 #2
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
Jul 20 '05 #3
Eyal Goren (ey********@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, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4
Erland Sommarskog <so****@algonet.se> wrote in message news:<Xn**********************@127.0.0.1>...
Eyal Goren (ey********@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!!!
Jul 20 '05 #5

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

Similar topics

1
by: Manu | last post by:
Hi, ftplib fails to cwd into a directory which contains spaces in it's name.How do i correct this? Regards Manu
1
by: Jasper Recto | last post by:
I have a little program that opens a progress database and runs a report. Dim Path As Object Dim Report As Object Path = "d:\ReportBuilder\VendorShipping.p" Report =...
7
by: CharlesEF | last post by:
Hi All, I have run into another problem that is eating my lunch. Should be simple but I am having one heck of a time. Please look at this SELECT statement: SELECT FROM States WHERE ] =...
1
by: ben | last post by:
When running the code below the validation fails when the first line of my xml contains <legalEnvelope version="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
1
by: CB | last post by:
Using C# in .Net 2003, DataSet.ReadXml fails when a percentage (%) sign is in the filename followed by 2 hex characters. Seems that the % sign is likely encoding the following 2 hex characters. ...
1
by: Trent | last post by:
Hello, I was wondering if anyone here could help with a Quest Central issue. I have two different hosts listed in Quest Central. Each host has a database on it, but the databases have the...
1
by: Qingdong | last post by:
Building a web set up project fails when there are two user control with same names under two different folders. Did anyone have the same issue before?
2
by: David C. Barber | last post by:
This updates a previous post. We have updated our SQL Server 2000 to new hardware by reinstalling SQL Server 2K to a new, dual processor server. We performed a full SQL backup of the entire...
3
by: javier.ortega | last post by:
hello, We are running mysql 4.1.18 Is there a way to prevent users from creating the same database name? for example our name schema goes like: mysql_1234, mysql_32143, mysql_.... But we...
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.