Saturday, February 25, 2012

ODBC named parameters ??

Today we tried to connect to an Informix server and make a report, worked
fine until I need to put in parameters, then it said that the odbc
connection couldn't use named parameters and should use unnamed
parameters.
I also tried using an ole db connection with the same result.
What should I do to make use of parameters '
Jack
---
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 46338 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dkUse unnamed (put a ? in). Note that it will name your report parameters
unfriendly names. I always rename them then go back to the dataset, click on
..., parameters tab and remap the query parameters to the report parameters.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
news:uiNFyOy3FHA.3136@.TK2MSFTNGP09.phx.gbl...
> Today we tried to connect to an Informix server and make a report, worked
> fine until I need to put in parameters, then it said that the odbc
> connection couldn't use named parameters and should use unnamed
> parameters.
> I also tried using an ole db connection with the same result.
> What should I do to make use of parameters '
> Jack
>
> ---
> Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> Den har indtil videre sparet mig for at få 46338 spam-mails.
> Betalende brugere får ikke denne besked i deres e-mails.
> Hent gratis SPAMfighter her: www.spamfighter.dk
>|||Hi Jack,
The .NET managed providers for ODBC and OleDb do not support named parameters.
You'll need to use ?'s to mark where the parameters ought to appear in your
SQL statement, and then make sure you add them in the proper order that they
appear in the SQL.
Best,
-Chris
> Today we tried to connect to an Informix server and make a report,
> worked fine until I need to put in parameters, then it said that the
> odbc connection couldn't use named parameters and should use unnamed
> parameters.
> I also tried using an ole db connection with the same result.
> What should I do to make use of parameters '
> Jack
> ---
> Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> Den har indtil videre sparet mig for at få 46338 spam-mails.
> Betalende brugere får ikke denne besked i deres e-mails.
> Hent gratis SPAMfighter her: www.spamfighter.dk|||> The .NET managed providers for ODBC and OleDb do not support named
> parameters. You'll need to use ?'s to mark where the parameters ought to
> appear in your SQL statement, and then make sure you add them in the
> proper order that they appear in the SQL.
Do you mean that the order of the report parameters have to be the order
in
which the ? appears in the sql statement ?
I'm a bit confused here :)
Jack
---
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 46339 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk|||No, the order of the mapping. Important concept. Even though RS makes it
seem like they are one and the same they aren't. There are Query Parameters
and Report Parameters. The query parameters are mapped to the report
parameters (click on the ..., parameters tab to see where you change this).
Note that query parameters can be mapped to an expression, they don't have
to be mapped to a report parameter. RS automatically creates report
parameters.
The order is the order of the mapping (dataset tab). In the layout tab,
report parameters, they can be in any order.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
news:u%23xGgEz3FHA.1188@.TK2MSFTNGP12.phx.gbl...
>> The .NET managed providers for ODBC and OleDb do not support named
>> parameters. You'll need to use ?'s to mark where the parameters ought to
>> appear in your SQL statement, and then make sure you add them in the
>> proper order that they appear in the SQL.
> Do you mean that the order of the report parameters have to be the order
> in
> which the ? appears in the sql statement ?
> I'm a bit confused here :)
> Jack
>
> ---
> Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> Den har indtil videre sparet mig for at få 46339 spam-mails.
> Betalende brugere får ikke denne besked i deres e-mails.
> Hent gratis SPAMfighter her: www.spamfighter.dk
>|||> No, the order of the mapping. Important concept. Even though RS makes it
> seem like they are one and the same they aren't. There are Query
> Parameters and Report Parameters. The query parameters are mapped to the
> report parameters (click on the ..., parameters tab to see where you
> change this). Note that query parameters can be mapped to an expression,
> they don't have to be mapped to a report parameter. RS automatically
> creates report parameters.
> The order is the order of the mapping (dataset tab). In the layout tab,
> report parameters, they can be in any order.
I've come a bit further but it now tells me something about setparameterinfo
when i try to run the statement in the data tab.
Jack|||Are you doing a query or calling a stored procedure?
I always use the generic query design window, the button to switch to it is
to the right of the ...
Are you using OLEDB or ODBC?
I go against Sybase and did better with ODBC than OLEDB.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jack" <jackdSPAM@.jackd.dk> wrote in message
news:uyb%23c%2373FHA.3592@.TK2MSFTNGP12.phx.gbl...
>> No, the order of the mapping. Important concept. Even though RS makes it
>> seem like they are one and the same they aren't. There are Query
>> Parameters and Report Parameters. The query parameters are mapped to the
>> report parameters (click on the ..., parameters tab to see where you
>> change this). Note that query parameters can be mapped to an expression,
>> they don't have to be mapped to a report parameter. RS automatically
>> creates report parameters.
>> The order is the order of the mapping (dataset tab). In the layout tab,
>> report parameters, they can be in any order.
> I've come a bit further but it now tells me something about
> setparameterinfo when i try to run the statement in the data tab.
> Jack
>|||> Are you doing a query or calling a stored procedure?
> I always use the generic query design window, the button to switch to it
> is to the right of the ...
> Are you using OLEDB or ODBC?
> I go against Sybase and did better with ODBC than OLEDB.
I've tried using oledb and odbc, now i'm using odbc against an informix
server. It's a normal query using the sql designer, haven't tried the
generic.
Jack|||Try having a single parameter. Hard code the rest. Execute from the data tab
and you should be prompted to put in the value. If this doesn't work then
you could be having a problem with the ODBC driver. Note that when putting
in the parameter value if it is a string or a date just put the value in.
For instance for a data just put in 9/1/2005 for example.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jack" <jackdSPAM@.jackd.dk> wrote in message
news:OCKRHUF4FHA.3400@.tk2msftngp13.phx.gbl...
>> Are you doing a query or calling a stored procedure?
>> I always use the generic query design window, the button to switch to it
>> is to the right of the ...
>> Are you using OLEDB or ODBC?
>> I go against Sybase and did better with ODBC than OLEDB.
> I've tried using oledb and odbc, now i'm using odbc against an informix
> server. It's a normal query using the sql designer, haven't tried the
> generic.
> Jack
>

No comments:

Post a Comment