Several mistakes of ASP beginners

xiaoxiao2021-03-06  42

1. Open again before the record set is turned off: ---------------------------------- SQL = "SELECT * From test "ropen sql, conn, 1, 1if not = rs (" name ") end ifness =" select * from mybook "rs.open sql, conn, 1, 1 ----- -------------------------------- Solution: Turn RS.Close or Set RS1 before the second RS.Open = Server.createObjectrs1.open SQL, CONN, 1, 12, use SQL keywords to do a table name or field name ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- SQL = "Select * from user" rs.open SQL, CONN, 1, 1 --------------------- ---------------- User is SQL keyword Solution: change to SQL = "SELECT * FROM [USER]" 3, use the lock mode to perform Update ------- ------------------------------ SQL = "Select * from [user]" RS.Open SQL, CONN, 1, 1RS .addnew or rs ("username") = "aa" rs.Update -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- Current record set open mode for read-only resolution: change to RS.Open SQL, CONN, 1, 34, the comparative field value used in the query statement does not match the field type ---------- ------------------------------ SQL = "SELECT *" WHERE ID = '"& myid &" "RS.Open SQL, CONN, 1, 1 ------------------------------------- - Hypothesis the design ID in the table is digital, then mistakes.

转载请注明原文地址:https://www.9cbs.com/read-112646.html

New Post(0)