How to replace the dataAdapter with tableAdapter?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • snow

    How to replace the dataAdapter with tableAdapter?

    Hello,

    I have a VS 2003.NET application that connects to a Access database. I
    want to make its code work in VS 2005. Here is the code for VS
    2003 .NET:

    da1.UpdateComma nd.CommandText = "update TABLE1 set FIELD1 = "
    &
    value2 & " where FIELD1 = " & value1
    return_val = da1.UpdateComma nd.ExecuteNonQu ery()

    If return_val = 0 Then
    da1.InsertComma nd.CommandText = "insert into TABLE1(FIELD1)
    values (" & value2 & ")"
    da1.InsertComma nd.ExecuteNonQu ery()
    End If

    How could I change dataAdapter (da1) to a tableAdaper to implement
    this function.

    Thanks for the help!
Working...