Friday, March 16, 2012
"Syntax error or access violation" with new (July 22 2003) driver
I'm having troubles with the SQL Server ODBC driver 2000.81.9001.40 dated on
July 22 2003. It is incompatible with our custom application developed with
Centura SQLWindows/32 Version 1.5.1-PFT2. When running some queries, the
error message reported by the driver is
Error No: 20035
Error Text: [Microsoft][ODBC SQL Server Driver]Syntax error or access
violation
The only suspicious fact is that the command is broken by a CR-LF (new line)
combination. This code had worked for years without any problem, sending
such broken line commands
The SQL command sent is:
{call spEjeSelectRem ('vCtePedTem_ChecaPoliticas
20,20,159,1,935502,17700024,1200148,null,
1')}
Note there is a new-line sequence behind the last parameter
My questions are:
Can It be the cause of the above mentioned error?
Wat can I do, install the previous version?
The ODBC driver is dated July 22 2003. It was automatically downloaded by
Microsoft Automatic Update. How can I protect specifically from ODBC driver
version updates?
Thanks in advance
FaustinoOk,
I did the following:
-"Uninstall" MDAC by
dasetup.exe /u
(actually the uninstall procedure didn't work, but at least it leave the
ODBC in such inconsistent state that I could install a previous version)
-Installed the MDAC v.2.7 that I had before the bug appeared. The bug didn't
appear again.
However yesterday the Microsoft Update suggested to install the security
patch 823718 related to MDAC. I crossed my fingers and applied it. No
problem. SQL Server driver is now 2000.81.9041.40 and the bug didn't show
again.
Hope this helps somebody
Faustino
"faustino Dina" <fdina@.matusa.com.mx> wrote in message
news:eo%23$lJ%23aDHA.2016@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'm having troubles with the SQL Server ODBC driver 2000.81.9001.40 dated
on
> July 22 2003. It is incompatible with our custom application developed
with
> Centura SQLWindows/32 Version 1.5.1-PFT2. When running some queries, the
> error message reported by the driver is
> Error No: 20035
> Error Text: [Microsoft][ODBC SQL Server Driver]Syntax error or access
> violation
> The only suspicious fact is that the command is broken by a CR-LF (new
line)
> combination. This code had worked for years without any problem, sending
> such broken line commands
> The SQL command sent is:
> {call spEjeSelectRem ('vCtePedTem_ChecaPoliticas
> 20,20,159,1,935502,17700024,1200148,null,
> 1')}
> Note there is a new-line sequence behind the last parameter
> My questions are:
> Can It be the cause of the above mentioned error?
> Wat can I do, install the previous version?
> The ODBC driver is dated July 22 2003. It was automatically downloaded by
> Microsoft Automatic Update. How can I protect specifically from ODBC
driver
> version updates?
> Thanks in advance
> Faustino
>
Saturday, February 11, 2012
"dbuse" fails when database name is larger than 28 characters
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!!!
