[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Using a variable in a select statement

Thomaslp

2/1/2006 9:37:00 AM

Hello,

I have a class that has the property str s; in the class decleration. When
the class is created I initialise the s with a str value that is a parameter
in the new method. Now a method in my class has the following select
statement:

select vid where vid.DocumentId==s;

Unfortunately this is not allowed. How do I call my select statement by
using the value contained in the s string?

Regards Thomas
2 Answers

Thomaslp

2/1/2006 9:43:00 AM

0

Hello,

never mind, I figured it out myself. Instead of the str I used a EDT and it
worked as supposed to.

Regards Thomas

"Thomaslp" wrote:

> Hello,
>
> I have a class that has the property str s; in the class decleration. When
> the class is created I initialise the s with a str value that is a parameter
> in the new method. Now a method in my class has the following select
> statement:
>
> select vid where vid.DocumentId==s;
>
> Unfortunately this is not allowed. How do I call my select statement by
> using the value contained in the s string?
>
> Regards Thomas

RogerAlex

2/7/2006 11:06:00 AM

0

Hi Thomaslp
This is reasonably simple do not assign your variable to an "str" type
rather use an "extended data type" which fits your DocumentId field. This
process is then possible

Regards
Roger

"Thomaslp" wrote:

> Hello,
>
> I have a class that has the property str s; in the class decleration. When
> the class is created I initialise the s with a str value that is a parameter
> in the new method. Now a method in my class has the following select
> statement:
>
> select vid where vid.DocumentId==s;
>
> Unfortunately this is not allowed. How do I call my select statement by
> using the value contained in the s string?
>
> Regards Thomas