fbdubai 0 Newbie Poster

I am trying to migrate my MS Access database to MS SQL.

My coding pattern is simple. Like this
'---------------------
Data1.Database.Close
Data1.DatabaseName = App.Path & "\Status.mdb"
Data1.RecordSource = "Performance"
Data1.Refresh

C1 = "SlNo = 1"
Data1.Recordset.FindFirst C1
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
Data1.Recordset.Fields("Amount") = Format(mamt, "##,##0.00")
Data1.Recordset.Fields("Upd") = Now
Data1.Recordset.Update
Else
MsgBox "Error in Updating the File !!!", vbExclamation
End If
Data1.Database.Close

'----------
How is it possible to get it to work if I move over to MS SQL


Data1.Connect = "FILEDSN=ABC.dsn;UID=sa;PWD=test111"
Data1.DatabaseName = "Status"
Data1.RecordSource = ("Select Name, Amount from Performance")
Data1.Refresh

Data1.Recordset.MoveFirst
Do While Data1.Recordset.EOF = False
MsgBox Data1.Recordset.Fields("Name") & " , " & _
& Data1.Recordset.Fields("Amount")
Data1.Recordset.MoveNext
Loop


This works (TO test Reading from MS SQL)

BUT How can I update the File ????????????

Eg. Add a Text "TEST" to the beginning of the field Name in the above File.


PLEASE HELP. I know it is simple for you but am stuck with this.

Thanks in advance

FB