In ASP, if <% option explicit %> is added to the file headerProgramAll variables in
Define dim Varia before use.
When we use aspjpeg 2.0 for background image compression and the result is set JPEG = server. Createobject ("persits. jpeg,
No way. Solved the aspjpeg installation, and repeatedly verified that its installation directory could be accessed by everyone, but the result still failed,
After one afternoon, I found that this mark was added in front of the program.CodeTo:
Dim JPEG
Set JPEG = server. Createobject ("persits. jpeg ")
The problem is solved smoothly. Of course, other variables in the classic image compression code extracted from the Internet also need to be declared one by one before they can be used.
Binary type conversion
Generally, the ID in the database is either Int or bigint. If it is int type, the VBScript needs to convert it: CINT (RS ("ID "));
If it is bigint, clng function conversion is used: clng (RS ("ID ")).
The above is the field conversion in the database, and the value transfer between ASP pages also needs to be converted:
Id = request. querystring ("ID ")
Id = CINT (ID)
Or: Id = clng (ID)
Generally, the ID parameter values passed in the project are directly obtained from the database. After passing the parameter values, you must compare them with the data in the database again.
At the same time, convert the passed parameters and the IDS extracted from the database to the following types:
If the database ID is of the bigint type, the judgment statement is as follows:
If clng (request. querystring ("ID") = clng (RS ("ID "));
If the database ID is int type, the judgment statement is as follows:
If CINT (request. querystring ("ID") = CINT (RS ("ID "));