Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting new record (VS2005 - C#, SQL Server)

Status
Not open for further replies.

martinm

IS-IT--Management
Mar 30, 2001
113
GB
I have a GridView and DataSource.

The grid has select/edit options, but I can't find an 'insert' option.

I have linked the params of the DataSource to Text boxes, but can't find a method to actually insert. The Query text exists.

What am I missing!!

I've tried the insert by code, but

dsAddress.InsertParameters;

gets get a build error:

Only assignment, call, increment, decrement, and new object expressions can be used as a statement
 
There is no "Insert" in the datagrid or gridview. You will have to add your own functionality to do that.
 
Oooh !! Ok, what's the prefered option(s) for doing this, or am I better using different components? (very new to this, got used to Delphi..)

Cheers
 
There are a number of ways. Since you are using the 2.0 version of the frame work, why not just use a DetailsView control?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top