Click here to Skip to main content
15,920,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to trap keystrokes in .NET controls by using Visual Basic .NET Pin
hisuman10018-Oct-06 19:00
hisuman10018-Oct-06 19:00 
QuestionScreen Scrape - I think? Pin
TommyACN18-Oct-06 2:17
TommyACN18-Oct-06 2:17 
AnswerRe: Screen Scrape - I think? Pin
Dave Kreskowiak18-Oct-06 3:36
mveDave Kreskowiak18-Oct-06 3:36 
QuestionCreating a simple datagrid Pin
dkoco18-Oct-06 2:06
dkoco18-Oct-06 2:06 
AnswerRe: Creating a simple datagrid Pin
nlarson1118-Oct-06 4:17
nlarson1118-Oct-06 4:17 
QuestionFinding subitems in Listview using LVM_FINDITEM Pin
Pradeepkumar79k18-Oct-06 1:19
Pradeepkumar79k18-Oct-06 1:19 
AnswerRe: Finding subitems in Listview using LVM_FINDITEM Pin
Dave Sexton18-Oct-06 2:44
Dave Sexton18-Oct-06 2:44 
QuestionUpdating a database using an adapter and datagrid Pin
Mark0618-Oct-06 0:57
Mark0618-Oct-06 0:57 
Hi,
Ive created a datagrid on a form, which is filled from a dataset and sqldatadapter object.

I want to be able to modify the data in the grid, and then click Save, to post changes back to the database.

However, the wizard hasnt created an Add/Modify/Delete command in the adapter, only a select, which is something along the lines of:

SELECT ID, FirstName, LastName, address FROM Customers

I have the code under the button which says:
SqlDataAdapter1.Update(dsCustomers)
and I added an Update command to the adapter with an sql statement saying:
UPDATE Customers SET Firstname = @FirstName WHERE ID = @ID

But thats when it all goes to pot. I get an error back when I click Save, that says: Must declare the scalar variable @ID.

Also, Im thinking, I have a grid with 10 records, so how does the Updatecommand in the adapter apply its changes to each record? Is my UpdateCommand sql statement incorrect?

Cant find any MSDN walkthroughs that sort this.


Regards

Mark
AnswerRe: Updating a database using an adapter and datagrid Pin
chirughosh18-Oct-06 1:07
chirughosh18-Oct-06 1:07 
GeneralRe: Updating a database using an adapter and datagrid Pin
Mark0618-Oct-06 2:04
Mark0618-Oct-06 2:04 
AnswerRe: Updating a database using an adapter and datagrid Pin
Mark0618-Oct-06 4:22
Mark0618-Oct-06 4:22 
QuestionVB.NET 2005 Startup object Pin
Ganesh India18-Oct-06 0:49
Ganesh India18-Oct-06 0:49 
AnswerRe: VB.NET 2005 Startup object Pin
Christian Graus18-Oct-06 1:00
protectorChristian Graus18-Oct-06 1:00 
GeneralRe: VB.NET 2005 Startup object Pin
Ganesh India18-Oct-06 1:07
Ganesh India18-Oct-06 1:07 
GeneralRe: VB.NET 2005 Startup object Pin
Christian Graus18-Oct-06 1:28
protectorChristian Graus18-Oct-06 1:28 
GeneralRe: VB.NET 2005 Startup object Pin
Ganesh India18-Oct-06 1:30
Ganesh India18-Oct-06 1:30 
GeneralRe: VB.NET 2005 Startup object Pin
Christian Graus18-Oct-06 1:33
protectorChristian Graus18-Oct-06 1:33 
GeneralRe: VB.NET 2005 Startup object Pin
Ganesh India18-Oct-06 1:45
Ganesh India18-Oct-06 1:45 
GeneralRe: VB.NET 2005 Startup object Pin
Dave Sexton18-Oct-06 2:25
Dave Sexton18-Oct-06 2:25 
QuestionHow to send info out the lpt port? Pin
FriendlySoluations18-Oct-06 0:18
FriendlySoluations18-Oct-06 0:18 
AnswerRe: How to send info out the lpt port? Pin
sathish s18-Oct-06 0:42
sathish s18-Oct-06 0:42 
QuestionThe ENTER key Pin
Zaegra17-Oct-06 23:20
Zaegra17-Oct-06 23:20 
AnswerRe: The ENTER key Pin
Christian Graus17-Oct-06 23:37
protectorChristian Graus17-Oct-06 23:37 
AnswerRe: The ENTER key Pin
nlarson1118-Oct-06 3:39
nlarson1118-Oct-06 3:39 
AnswerRe: The ENTER key Pin
Are Jay18-Oct-06 3:52
Are Jay18-Oct-06 3:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.