Data Adapter select command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set the 'select command' in the code rather than have it
permanently set. I am using an Oracle data adapter and connection (don't
know if this makes a difference) and i have the following in the code:
OracleDataAdapter1.SelectCommand.CommandText("select contract_no,
wo_number, maint_type from sm_work_order where maint_type='UN' order by
wo_number")
It keeps giving me the error: "Property access must assign to the property
or use its value". Am i missing something obvious in the code. It works if
put directly into the configuration wizard. The reason i need it defined in
the code is i want to be able to put a variable in the statement and it
doesn't like it in the configuration wizard.
 
RBirney,

A property you set with =
For methods you pass the parameters with (methodparameter)

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top