Hi,
I am having a problem trying to use a parameter in a CursorAdapter against a SQL Server 2000 database and I'm begging for help.
If I run the following code, my cursor is created.
BTW, the Carriage Returns in the code are only for easier viewing
text to This.SelectCmd noshow
select distinct ifs_table_clrled.transaction_id,
ifs_table_clrled.bank_account_code,
ifs_table_clrled.agency,
ifs_table_clrled.ref_trans_id,
ifs_table_clrled.ref_trans_line,
ifs_table_clrled.vendor_code,
ifs_table_clrled.vendor_name
from ifs_table_clrled where
RTRIM(ifs_table_clrled.transaction_id) in
('AD00001494825','AD00001495243','AD00001495343','AD00001495351','AD00001495357','AD00001495363')
and ifs_table_clrled.fisc_year = '2004'
endtext
If I run the following code using a parameter for the transaction id's, I do not get a cursor or error.
strTrans is generated before the CursorAdapter is created
strTrans = "'AD00001494825','AD00001495243','AD00001495343','AD00001495351','AD00001495357','AD00001495363'"
The SelectCmd for the Parameterized query is:
text to This.SelectCmd noshow
select distinct ifs_table_clrled.transaction_id,
ifs_table_clrled.bank_account_code,
ifs_table_clrled.agency,
ifs_table_clrled.ref_trans_id,
ifs_table_clrled.ref_trans_line,
ifs_table_clrled.vendor_code,
ifs_table_clrled.vendor_name
from ifs_table_clrled where
RTRIM(ifs_table_clrled.transaction_id) in
(?strTrans)
and ifs_table_clrled.fisc_year = '2004'
endtext
I'm sure this is a very simple thing that I am screwing up on and appreciated your assistance in advance.
Send me an email when the shouting stops