Newbie needs help with passing parameters to tableadapter
758271Mar 5 2010 — edited Mar 10 2010I am running Visual Studio 2005. I have a table adapter with an sql statement. I need to pass one argument into the sql statement.
I've searched a lot on the net and gotten a lot of contradictory answers, none of which work. The latest I have tried is:
myadapter.adapter.selectcommand.parameters.addwithvalue(":curtext",curtext)
myadapter.fill(mydataset)
sql statement: SELECT * FROM TABLE1 WHERE TEXT = :curtext
I get a runtime error complaining about an object reference.
Sorry, I know it is a simple question, but could not find documentation on it. If someone could either show me the correct syntax or point me to the documentation, I'd appreciate it.