passing parameter to SqlDataAdapter

T

TJ

Hi,

I am a newbee, I want to know few things about Datagrid.
1. I used the designer to create a Datagrid with SELECT, INSERT,DELETE
and UPDATE commands.
Now I want to retrieve data depending on the "current_id" value on the
page. So that is a parameter to the SELECT Statement. The problem is
when I Configure SqlAdapter it generates the parameter and adds to the
vb code, but when I have to use this Parameter value in thesubroutine,
it gives error "variable" not defined error, Well if I define the
variable within that subroutine then it gives error "variable already
defined"
Now my work around is, simply delete the parameter from desginer
window, but the pain is it gets generated everytime I touch SqlAdapter
in designer.

So my question is, is it a good idea to use drag-drop Data components ?
Or should I right my own store-procedures and use in the vb code to
edit Data-Grid ?

TIA

TJ
 
E

Elton Wang

Hi TJ,

If you want to develop real project, you should learn and have good
knowledge of ADO.NET, such as Connection, Command, DataAdapter, DataReader,
DataSet, DataTable, and so on.



HTH
 

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

Members online

Forum statistics

Threads
474,139
Messages
2,570,806
Members
47,352
Latest member
Maricruz09

Latest Threads

Top