I need help in using code to modify the data in a dataset. The code I am using is: ------------------------------------------------------------------------------------------------------------------------------------------ '-- Open a database connection</o> Dim DBConnection As New OleDbConnection( _</o> "Provider=Microsoft.Jet.OLEDB.4.0;" & _</o> "Data Source=" & Server.MapPath("~/app_data/capsDb1.mdb"))</o> DBConnection.Open()</o> </o> '-- Issue an SQL command through the database connection</o> Dim SQLString As String</o> ' SQLString = "SELECT CID, SID, [Investigation Title], [Date Accessed] FROM [Status Table] ORDER BY SID"</o> SQLString = "SELECT [Questions Table].QTPriority, [AI Questions Table].AIID, [AI Questions Table].Question, [AI Questions Table].Rationale FROM ((([AI Questions Table] INNER JOIN [Questions Table] ON [AI Questions Table].AIID = [Questions Table].AIID) INNER JOIN [Status Table] ON [Questions Table].SID = [Status Table].SID) INNER JOIN [Characteristics Table] ON [Status Table].CID = [Characteristics Table].CID) WHERE ([Characteristics Table].Defect = 'Dissolution') ORDER BY [AI Questions Table].AIID Desc"</o> Dim DBCommand As New OleDbCommand(SQLString, DBConnection)</o> </o> 'set up DataSet and DataAdapter</o> Dim myDataSet As New DataSet</o> </o> Dim myDataAdapter As OleDbDataAdapter</o> myDataAdapter = New OleDbDataAdapter(DBCommand)</o> myDataAdapter.Fill(myDataSet)</o> </o> Response.Write(myDataAdapter("Question"))</o> </o> 'bind the dataSet to the GridView</o> GridView1.DataSource = myDataSet</o> GridView1.DataBind()</o> </o> DBConnection.Close()</o> ----------------------------------------------------------------------------- The error message I get is ------------------------------------------------------------------------------------------------------------------------------------ Server Error in '/WebSite10' Application. </o> Compilation Error </o> Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30367: Class 'System.Data.OleDb.OleDbDataAdapter' cannot be indexed because it has no default property. Source Error:</o> </o> Line 30: myDataAdapter.Fill(myDataSet)</o> Line 31: </o> Line 32: Response.Write(myDataAdapter("Question"))</o> Line 33: </o> Line 34: 'bind the dataSet to the GridView</o> </o> If I change Line 32 to read myDataSet.?Question?) = ?XXX? I get the same error. What can I do that will lwt me modify data in the various columns? Any help will be appreciated as this has stumped me for some time. Thanks in advance. Charlie
Hi, I think youcan find everything you need here: http://www.asp.net/learn/data-access/ Those video tutorials aren't for Access DBs but the concepts are similar. Salute, Mark