%@language=jscript%>
<% connection = Server.CreateObject("ADODB.Connection"); connection.mode = 3; //ReadWrite Mode sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=c:/inetpub/wwwroot/myweb/test.mdb"; connection.Open(sConnectionString); sCommand = "SELECT * FROM Table1"; rsResults = connection.Execute(sCommand); while (!rsResults.EOF) { //Get the results you are expecting sFirstColumn = rsResults("FirstName"); sNextColumn = rsResults("LastName"); //Do things based on these results Response.Write(sFirstColumn + " " + sNextColumn); //Move to the next record rsResults.MoveNext; } sFirstName = "Fred"; sLastName = "Hofstetter"; sCommand = "insert into Table1 ([UserID],[FirstName],[LastName]) values (3,'" + sFirstName + "','" + sLastName + "')"; rsResults = connection.Execute(sCommand); //sFirstName = "Mary"; //sLastName = "Doe"; //sCommand = "update Table1 set FirstName = '" + sFirstName // + "' where LastName = '" + sLastName + "'"; //connection.Execute(sCommand); //sFirstName = "John"; //sLastName = "Doe"; //sCommand = "delete from Table1 where FirstName = '" + sFirstName // + "' and LastName = '" + sLastName + "'"; //connection.Execute(sCommand); connection.Close(); Response.Write("All Done"); %>