Recommended: Classic and practical basic asp program sorting 1. Close the window and write javascript:window.close(); write javascript:document.Form1.submit(); before deletion, confirmation dialog box appears:
For access and Sql server databases, the following method can get the automatic numbering value of the record that has just been inserted.
'Get the auto-numbered value of the record just inserted
| The following is the quoted content: dim conn,rs set conn=Server.CreateObject(ADODB.Connection) conn.Open Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source= & Server.MapPath(51windows.mdb) set rs=Server.CreateObject(ADODB.Recordset) sql=select * from [table] where ID is null 'Auto number field is id rs.open sql,conn,1,3 rs.addnew rs(Name) = Request.form(Name) rs(Name2) = Request.form(Name2) rs.update response.write ID value: <strong style=color:red;> & rs(ID) & </strong> 'The automatic number value that just inserted the record rs.close set rs = nothing conn.close set conn = nothing |
Share: ASP development experience talks about 10 experiences in ASP development After half a year, I completed the management information system of a bureau-level unit alone, and released a total of 29 BETA versions and 3 official versions. ASP ORACLE environment, 285 ASP files, functions involve data entry, modification, fuzzy query, automatic statistics, data analysis and reporting.