델파이 초보입니다.
근데 어쩌다가 보기 이걸 제가 맡아서 하는데 다름이 아니라 두 테이블에서
쿼리를 해와서 필드에 넣어서 계산을 해야 하는데......
환경은 MS-SQL 6.5, 델파이2.0, WINNT입니다.
예로 쿼리 컴포넌트(?)로 SQL문을 작성했는데
select order_t.o_custom, order_t.o_item, order_t.o_work, order_t.o_pono, order_t.o_width2, order_t.o_unit, order_t.o_cust,
order_t.o_rate, order_t.o_money
from order_t, chulgo_t
where order_t.o_no = :e_no and chulgo_t.c_date between :s_date and :e_date
여기서 :s_date랑 :e_date는 변수인줄 아실거고.....
오라클처럼 테이블명뒤에 어떠한 값(ex from order_t o, chulgo_t c)
이런식으로 하면 안된다고 하길래 무식하게 적었주었는데 분명 쿼리는 한거 같기는 한데
불러오니 되지를 않네요...
에러 라인은
if Query2o_money.Value = '0' then
begin
o_amount := Query2order_t.o_cust.Value * orm1.Query1sum_len.Value;
end
else
begin
o_amount := Query2order_t.o_cust.Value * Form1.Query1sum_len.Value * Query2order_t.o_rate.Value;
end;
이 부분입니다. 여기서 Query2o_money를 찾을수가 없다고 하네요...
물론 Query2order_t.o_money로 바꾸어 줘도 그러한 Value가 없다고 하고...
정말 모르겠네요......
어떤식으로 쿼리를 해야 하는지..........
빨리 좀 가르쳐 주세요...부탁입니다.
그럼 좋은 하루 되세요....
> 델파이 초보입니다.
> 근데 어쩌다가 보기 이걸 제가 맡아서 하는데 다름이 아니라 두 테이블에서
> 쿼리를 해와서 필드에 넣어서 계산을 해야 하는데......
> 환경은 MS-SQL 6.5, 델파이2.0, WINNT입니다.
> 예로 쿼리 컴포넌트(?)로 SQL문을 작성했는데
> select order_t.o_custom, order_t.o_item, order_t.o_work, order_t.o_pono, order_t.o_width2, order_t.o_unit, order_t.o_cust,
> order_t.o_rate, order_t.o_money
> from order_t, chulgo_t
> where order_t.o_no = :e_no and chulgo_t.c_date between :s_date and :e_date
>
> 여기서 :s_date랑 :e_date는 변수인줄 아실거고.....
> 오라클처럼 테이블명뒤에 어떠한 값(ex from order_t o, chulgo_t c)
> 이런식으로 하면 안된다고 하길래 무식하게 적었주었는데 분명 쿼리는 한거 같기는 한데
> 불러오니 되지를 않네요...
> 에러 라인은
> if Query2o_money.Value = '0' then
> begin
> o_amount := Query2order_t.o_cust.Value * orm1.Query1sum_len.Value;
> end
> else
> begin
> o_amount := Query2order_t.o_cust.Value * Form1.Query1sum_len.Value * Query2order_t.o_rate.Value;
> end;
>
> 이 부분입니다. 여기서 Query2o_money를 찾을수가 없다고 하네요...
> 물론 Query2order_t.o_money로 바꾸어 줘도 그러한 Value가 없다고 하고...
> 정말 모르겠네요......
> 어떤식으로 쿼리를 해야 하는지..........
> 빨리 좀 가르쳐 주세요...부탁입니다.
> 그럼 좋은 하루 되세요....
>
Query2order_t.o_money
>>>> Query2.fieldbyname('o_money').asstring 로해보세요...