SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


C# .NET - INSERT Statement with parameter using TableAdapter


C# .NET - INSERT Statement with parameter using TableAdapter

Author
Message
Meatloaf
Meatloaf
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 421
Hello,

I have a Windows Form and am trying to pass a value as part of my INSERT statement. I have one field that requires a new value which is entered in the dataset. Then when clicking update, the row writes to the database.

Here is my line of code:

this.ScriptParametersTableAdapter.Insert("abc", txtScriptType, txtConfigField, txtActive, txtDateNow);

The first data inserted is "abc". I would like to change this to be the value entered into the dataset. Is this possible?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search