Microsoft VBScript runtime error (0x800A01A8) missing object :''

Source: Internet
Author: User

Microsoft VBScript runtime error (0x800A01A8)
Missing object :''

The reason is that I didn't define the global variable when calling the function. The Starting program is like this. B _connect.asp file code is as follows.
Sub open_bbs ()
Set sqlrs = server. CreateObject ("adodb. recordset ")
Set sqlcn = server. createobject ("adodb. connection ")
Sqlconstr = "driver = {SQL server}; server = 5555555; uid = cdd3; pwd = dd0; database = cwddd3_db"
Sqlcn. open sqlconstr
End sub

Call code:
<%
B _ SQL = "select * from bbs_lm order by bbs_lm_order asc"
Call Open_bbs ()
Sqlrs. open B _ SQL, sqlcn, 1, 1
Do while not sqlrs. eof
%>
The following error message is displayed: Error type:
Microsoft VBScript runtime error (0x800A01A8)
Missing object :''
/Gero/bbs/index. asp, row 3


Browser type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)

Webpage:
GET/gero/bbs/index. asp
After careful viewing, find the reason is open_bbs ()
Dim sqlrs, sqlcn // add here.
Sub open_bbs ()
Set sqlrs = server. CreateObject ("adodb. recordset ")
Set sqlcn = server. createobject ("adodb. connection ")
Sqlconstr = "driver = {SQL server}; server = 218.30.99.21; uid = cw58013; pwd = m9n6u3e0; database = cw58013_db"
Sqlcn. open sqlconstr
End sub


========================================================== ==========

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.