Friday, March 9, 2012

Problem with Reporting Service SQL 2000 and Sybase

Hi,
The connection to Sybase with OLEDB and ODBC have the same problem when the
query have parameter. The query below don´t execute:
select prod_cod,cod_empresa from estatistica.dbo.zomba
where vida = @.vida
OLEDB error: "An error occurred while executing the query. The given type
name was unrecognized"
versions used: 02.70.0016 and 02.70.0042 (provided by Sybase support)
ODBC error: "Error [HY000][DataDirect][ODBC Sybase wire protocol driver][SQL
Server] must declare variable @.vida"
versions used: 04.10.0049 (provided by Sybase support)
Someone have the same problem?
Thanks,
LandryI work extensively with Sybase. The issue you are seeing is that query
variables for ODBC have to be a ? (unnamed parameter). I suggest you stick
with the ODBC driver. I have had issues with OLEDB.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Landry" <landry@.dsai.com.br.NEWS> wrote in message
news:em6ndG7RFHA.688@.TK2MSFTNGP10.phx.gbl...
> Hi,
> The connection to Sybase with OLEDB and ODBC have the same problem when
> the
> query have parameter. The query below don´t execute:
> select prod_cod,cod_empresa from estatistica.dbo.zomba
> where vida = @.vida
> OLEDB error: "An error occurred while executing the query. The given type
> name was unrecognized"
> versions used: 02.70.0016 and 02.70.0042 (provided by Sybase support)
> ODBC error: "Error [HY000][DataDirect][ODBC Sybase wire protocol
> driver][SQL
> Server] must declare variable @.vida"
> versions used: 04.10.0049 (provided by Sybase support)
> Someone have the same problem?
> Thanks,
> Landry
>
>|||Hi,
Thanks.
I test ? with OLEDB and ODBC and have the same error!
select prod_cod,cod_empresa from estatistica.dbo.zomba
where vida = ?
I test Stored Procedures with parameters and have the same error.
Landry
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escreveu na mensagem
news:u%23sw%23m7RFHA.3704@.TK2MSFTNGP12.phx.gbl...
>I work extensively with Sybase. The issue you are seeing is that query
>variables for ODBC have to be a ? (unnamed parameter). I suggest you stick
>with the ODBC driver. I have had issues with OLEDB.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Landry" <landry@.dsai.com.br.NEWS> wrote in message
> news:em6ndG7RFHA.688@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>> The connection to Sybase with OLEDB and ODBC have the same problem when
>> the
>> query have parameter. The query below don´t execute:
>> select prod_cod,cod_empresa from estatistica.dbo.zomba
>> where vida = @.vida
>> OLEDB error: "An error occurred while executing the query. The given
>> type
>> name was unrecognized"
>> versions used: 02.70.0016 and 02.70.0042 (provided by Sybase support)
>> ODBC error: "Error [HY000][DataDirect][ODBC Sybase wire protocol
>> driver][SQL
>> Server] must declare variable @.vida"
>> versions used: 04.10.0049 (provided by Sybase support)
>> Someone have the same problem?
>> Thanks,
>> Landry
>>
>>
>|||The best thing to do is as you are doing, first get a query and then move on
to stored procedures. That is the data type of vida?
Also, when are you getting this error? From the data tab clicking on the ! ?
Or from the preview?
Let's concentrate on ODBC. What error do you get with ODBC (it can't be the
same as before because at that point you had this error: must declare
variable @.vida).
I do all my queries from the generic query window. Try that (the button is
to the right of the ... to switch to generic query designer).
Also, what version of Sysbase. I am using 12.5.2 client and have used that
against both an 11.x (I don't remember the exact version) and 12.5.1
servers.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Landry" <landry@.dsai.com.br.NEWS> wrote in message
news:e4V1j7BSFHA.1348@.TK2MSFTNGP15.phx.gbl...
> Hi,
> Thanks.
> I test ? with OLEDB and ODBC and have the same error!
> select prod_cod,cod_empresa from estatistica.dbo.zomba
> where vida = ?
> I test Stored Procedures with parameters and have the same error.
> Landry
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escreveu na mensagem
> news:u%23sw%23m7RFHA.3704@.TK2MSFTNGP12.phx.gbl...
>>I work extensively with Sybase. The issue you are seeing is that query
>>variables for ODBC have to be a ? (unnamed parameter). I suggest you stick
>>with the ODBC driver. I have had issues with OLEDB.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Landry" <landry@.dsai.com.br.NEWS> wrote in message
>> news:em6ndG7RFHA.688@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>> The connection to Sybase with OLEDB and ODBC have the same problem when
>> the
>> query have parameter. The query below don´t execute:
>> select prod_cod,cod_empresa from estatistica.dbo.zomba
>> where vida = @.vida
>> OLEDB error: "An error occurred while executing the query. The given
>> type
>> name was unrecognized"
>> versions used: 02.70.0016 and 02.70.0042 (provided by Sybase support)
>> ODBC error: "Error [HY000][DataDirect][ODBC Sybase wire protocol
>> driver][SQL
>> Server] must declare variable @.vida"
>> versions used: 04.10.0049 (provided by Sybase support)
>> Someone have the same problem?
>> Thanks,
>> Landry
>>
>>
>>
>|||Hi Bruce,
Thanks, the problem is ODBC version, now work fine with cliente version
12.5.3, the most recent.
The Sybase suport will analyze the OLEDB to correct the error.
Thanks,
Landry
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escreveu na mensagem
news:urhgPMCSFHA.3336@.TK2MSFTNGP09.phx.gbl...
> The best thing to do is as you are doing, first get a query and then move
> on to stored procedures. That is the data type of vida?
> Also, when are you getting this error? From the data tab clicking on the !
> ? Or from the preview?
> Let's concentrate on ODBC. What error do you get with ODBC (it can't be
> the same as before because at that point you had this error: must declare
> variable @.vida).
> I do all my queries from the generic query window. Try that (the button is
> to the right of the ... to switch to generic query designer).
> Also, what version of Sysbase. I am using 12.5.2 client and have used that
> against both an 11.x (I don't remember the exact version) and 12.5.1
> servers.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Landry" <landry@.dsai.com.br.NEWS> wrote in message
> news:e4V1j7BSFHA.1348@.TK2MSFTNGP15.phx.gbl...
>> Hi,
>> Thanks.
>> I test ? with OLEDB and ODBC and have the same error!
>> select prod_cod,cod_empresa from estatistica.dbo.zomba
>> where vida = ?
>> I test Stored Procedures with parameters and have the same error.
>> Landry
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escreveu na mensagem
>> news:u%23sw%23m7RFHA.3704@.TK2MSFTNGP12.phx.gbl...
>>I work extensively with Sybase. The issue you are seeing is that query
>>variables for ODBC have to be a ? (unnamed parameter). I suggest you
>>stick with the ODBC driver. I have had issues with OLEDB.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Landry" <landry@.dsai.com.br.NEWS> wrote in message
>> news:em6ndG7RFHA.688@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>> The connection to Sybase with OLEDB and ODBC have the same problem when
>> the
>> query have parameter. The query below don´t execute:
>> select prod_cod,cod_empresa from estatistica.dbo.zomba
>> where vida = @.vida
>> OLEDB error: "An error occurred while executing the query. The given
>> type
>> name was unrecognized"
>> versions used: 02.70.0016 and 02.70.0042 (provided by Sybase support)
>> ODBC error: "Error [HY000][DataDirect][ODBC Sybase wire protocol
>> driver][SQL
>> Server] must declare variable @.vida"
>> versions used: 04.10.0049 (provided by Sybase support)
>> Someone have the same problem?
>> Thanks,
>> Landry
>>
>>
>>
>>
>

No comments:

Post a Comment