How to Update DataSource ?

Since the you stated the dataadapter was generated by the wizard, I assumed the you generated the dataset similarly.

If you look, the dataset is named dataset11.

Jon
 
Expand the Region called "Windows Form Designer generated code" and look for something that looks like the following:

(snippet from one of my programs included here for illustration only)

Code:
OleDbUpdateCommand1
        
        Me.OleDbUpdateCommand1.CommandText = "UPDATE Administrator SET AdministratorName = ?, networkinstallation = ?, NetworkP" & _
        "ath = ?, [Password] = ?, setupcomplete = ? WHERE (AdministratorName = ?) AND (Ne" & _
        "tworkPath = ? OR ? IS NULL AND NetworkPath IS NULL) AND ([Password] = ? OR ? IS " & _
        "NULL AND [Password] IS NULL) AND (networkinstallation = ?) AND (setupcomplete = " & _
        "?)"
        Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("AdministratorName", System.Data.OleDb.OleDbType.VarWChar, 50, "AdministratorName"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("networkinstallation", System.Data.OleDb.OleDbType.Boolean, 2, "networkinstallation"))

If you have let the wizard generate your update, insert, and delete statements this is where theyll be and how theyll look.
You can use them as a template to create your own.

If you havent looked here yet, check this site for answers to ongoing questions as well.
http://msdn.microsoft.com/library/d...cpguide/html/cpconaccessingdatawithadonet.asp

If you want help with specific blocks of code, post them after youve written them and well do what we can to help.

Jon
 
The OLE DB .NET Provider does not support named parameters for passing parameters to a SQL Statement or a stored procedure called by an OleDbCommand when CommandType is set to Text. In this case, the question mark (?) placeholder must be used. For example:

SELECT * FROM Customers WHERE CustomerID = ?

As a result, the order in which OleDbParameter objects are added to the OleDbParameterCollection must directly correspond to the position of the question mark placeholder for the parameter.
 
Back
Top