Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.13;
Скачать: CL | DM;

Вниз

Параметры в TAdoDataSet   Найти похожие ветки 

 
paul_k ©   (2003-10-23 13:39) [0]

есть 2 ДС
1 : CommandText =
"select id, name,code,edit_mask from t_simples where type_id = :p_type"
Parameters = <
item
Name = "p_type"
Attributes = [paNullable]
DataType = ftWideString
NumericScale = 255
Precision = 255
Size = 510
Value = Null
end>

2 : CommandText =
select t_organisations.*,t_types.name,
t_simples.name as org_form_name,
t_simples.code as org_form_code,
(select t_bank_accounts.acc_no
from t_bank_accounts
where t_bank_accounts.item_id = t_organisations.id
and t_types.code = "RECIPIENT") as acc_no
from t_organisations,t_types,t_simples
where t_types.id = t_organisations.type_id
and t_simples.id = t_organisations.org_form_id
and t_simples.type_id = 25
and t_types.type_code=:p_org_type
order t_organisations.org_name

Parameters = <
item
Name = "p_org_type"
Attributes = [paNullable]
DataType = ftWideString
NumericScale = 255
Precision = 255
Size = 510
Value = Null
end>

Перед открытием ДС присваиваю значения параметров
1: t_simples.Parameters.ParamByName("p_type").Value:=inttostr(25)
t_simples.open

2: t_org_type.Parameters.ParamByName("p_org_type").Value:="BANK"
t_org_type.Open;

В первом случае все работает, а во 2-м ошибка "No value given for one or more requiredparametrs"
Может поможете разобратся в чем дело?


 
paul_k ©   (2003-10-23 13:52) [1]

простите, ларчик просто открывался.
поля t_types.type_code не существует



Страницы: 1 вся ветка

Текущий архив: 2003.11.13;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.022 c
14-41993
Alex_S
2003-10-17 11:05
2003.11.13
Вопрос по поводу TurboPascal 7


1-41648
^^^Dragon^^^
2003-10-25 18:20
2003.11.13
Обработка HTML


7-42173
hfa
2003-09-04 17:58
2003.11.13
Как узнать серийный номер харда....


1-41164
tor
2003-11-03 10:12
2003.11.13
Не подскажите как создать не квадратные окна?


7-42165
DJ Vano
2003-08-31 22:39
2003.11.13
Cнятие показаний температуры