Home > front end >  Helps to read a new ASP statements.
Helps to read a new ASP statements.

Time:12-04

Himself in learning a enters sells saves the asp and found an unknown, refer to everyone:
The set rs2=server. Createobject (" ADODB. You ")
SQL="select * from produit where huohao='" & amp; Nowhuohao&" '
"Rs2. The open SQL, conn, 1, 3
The do while rs2. Eof=false
Rs2 (" price2 ")=nowpinprice2
Rs2. Movenext
Loop
The statement also does not have the UPdate, is that what this paragraph? Thank you,

CodePudding user response:

refer to the second floor qq_63572063 response:
let's learn the foundation, even understand basic update statement,

Is a small white, updates are not want to use a rs2. Update? This period of no!

CodePudding user response:

No update statement
!Rs2. Update

CodePudding user response:

reference 4 floor Rotel response:
no update statement!
Rs2. Update

Is that how do you see? But I also tried, so don't update can be updated,

CodePudding user response:

What is written in other places, will there be a UpdateBatch what, this just write memory, in principle with the update will only be saved to the database, behind which you add a response. The end and then have to see the database updated at all

CodePudding user response:

See the final results after execution, into the database, you didn't find it

CodePudding user response:

I wrote a test program, and seems to be really update the database,

CodePudding user response:

refer to the eighth floor bomp response:
and I write a test program, it seems really updated database,

To share, I'm learning how to learn

CodePudding user response:

Good new, learning how to learn!

CodePudding user response:

Rs2. The open SQL, conn, 1, 3 pay attention to the Numbers here,
1, 1 refers to read data
1, 3 can be inserted into the data
No rs2. Also can update,
Two methods,

CodePudding user response:

Rs. The open SQL, conn, 3, 1 of 3, 1 represents what
You open in the complete syntax is
SecordSet. Open Source, ActiveConnection CursorType, LockType, Options

For example: rs. The open SQL, conn, 1, 3

CursorType is
AdOpenForwardOnly 0, the default cursor type, to open the cursor forward, can only move forward on recordset.
AdOpenKeyset 1 open type of cursor keys set, can move forward or backward in the recordset. If other users to modify or delete a record, the recordset will reflect this change. However, if the other users to add a new record, a new record will not appear in the recordset.
AdOpenDynamic 2 open dynamic cursors, you can move forward or backward on recordset. Other use damage records of any changes will be reflected in the recordset.
AdOpenStatic 3 open static cursor, you can move forward or backward on recordset. However, static cursor other users will not cause the record changes reflected.

LockType is
AdLockReadOnly 1 read-only lock, records of the specified cannot modify the recordset.
AdLockPrssimistic 2 protection type locking, refers to the edit a record, locking it immediately.
AdLockOptimistic 3 open lock, specify only call recordset Update () method to record locking.
AdLockBatchOptimistic 4 open lock, specify the record only batch update.

Two of the most commonly used methods:
Rs. The open SQL, conn, 1, 1 ', while reading display data read only
Rs. The open SQL, conn, 1, 3 'update or used when inserting data, reading and writing

CodePudding user response:

Learning, very detailed,

CodePudding user response:

Learning, very detailed,

CodePudding user response:

To query the goods according to your article number, found out all the article number of the commodity price changes for nowpinprice2

CodePudding user response:

Rs. Movenext, under the condition of this statement, don't write rs. Update, will also be updated.

CodePudding user response:

Understand, thank you

CodePudding user response:

Addnew update the model as if out of date, many database support, also better access to support,
Generic methods are executed directly insert statement,
  •  Tags:  
  • ASP
  • Related