Home > Software engineering >  Great god help genuflect is begged to see how the database is always connected not out what problem?
Great god help genuflect is begged to see how the database is always connected not out what problem?

Time:11-20

Guestbook
Microsoft VBScript runtime error error '800 a01a8'
Lack of objects: "'
/index. Asp, line 21
<%
Establishment and testdb database connection '
The set coon=Server. CreateObject (" ADODB. Connection ")
Conn. The Provider="Microsoft. Jet. The OLEDB. 4.0"
Conn. Open Server. Mappath ("/data/testdb. MDB)
'read all of the records in the main table and according to the message time order
Set the rs=server. Createobject (" adodb. You ")
SQL="select * from the main order by mydata desc"
Rs. The open SQL, conn, 1, 2,
% & gt;

CodePudding user response:

Need 21 lines of code, you give the number of rows is not enough;

CodePudding user response:

Tell me about your first question, your
The set coon=Server. CreateObject (" ADODB. Connection ")
Variables are coon, rather than the conn, but you below and with the conn, so problems

Also, links database language sentence directly, such as:
 
<%
Set the conn=Server. CreateObject (" ADODB. Connection ")
Set the rs=server. Createobject (" adodb. You ")

SQL="Provider=Microsoft. Jet. The OLEDB. 4.0; UID=; The PWD=; Data Source="& amp; Server. Mappath ("/data/testdb. MDB)
Conn. The open SQL
SQL="select * from the main order by mydata desc"
Rs. The open SQL, conn, 1, 2,
% & gt;

CodePudding user response:

Crab crab, this book give me the code is wrong, with your correct can already,

CodePudding user response:

reference 1st floor milaoshu1020 response:
need 21 lines of code, you give the number of lines is not enough;

Crab crab, this issue has figured it out,
  • Related