Splurd Posted June 23, 2006 Share Posted June 23, 2006 Basicly I found two diffrent ways to do it, from browing the various tutorials. Set rsAddComments = Server.CreateObject("ADODB.Recordset")strSQL = "SELECT sg_test.* FROM sg_test;"rsAddComments.Open strSQL, adoCon, 3 , 3rsAddComments.AddNewrsAddComments.Fields("SN") = Request.Form("SN")rsAddComments.Fields("COUNTRY") = Request.Form("COUNTRY") rsAddComments.Fields("MF_CODE") = Request.Form("MF_CODE") rsAddComments.Fields("MF_NAME") = Request.Form("MF_NAME") rsAddComments.Fields("ADDRESS") = Request.Form("ADDRESS") rsAddComments.UpdatersAddComments.CloseSet rsAddComments = Nothing Then in the w3schools ado section there was this methodhttp://www.w3schools.com/ado/ado_update.aspSo whats the difference between the two and which is better /easier. For both adding a new record to a data base and editing/updating an existing record Link to comment Share on other sites More sharing options...
aspnetguy Posted June 23, 2006 Share Posted June 23, 2006 I don't know which is better but I personally like using SQL to do the update in UPDATE tableName SET column1 = 'somevalue', column2 = 'somevalue' WHERE some condition Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now