ASP database connection RS ("user. ID ")

Source: Internet
Author: User

Recently I encountered a problem in a customer management system:

The following connection string is used:

Connstr = "DBQ =" + server. mappath ("DB/# kehumsg. mdb") + "; defaultdir =; driver = {Microsoft Access Driver (*. mdb )};"
Set conn = server. Createobject ("ADODB. Connection ")
Conn. Open connstr

There is a join query,
The ID of the second table to be called,
Normally, you can call RS ("B. ID") but it is displayed in the set with the required name or ordinal number. No project is found.
No answer can be found after posting on csdn,
Finally, I used RS ("ID") to solve the problem. I thought that this call should call the ID of the first table,
But it calls the second table, but what I want is the second one,
After studying it, it turned out to be like this. It calls the ID of the last table. It feels pretty good. I can work out something myself ~~
However, when the customer is about to leave work, the customer says that there is a problem and nothing can be done,
The error occurs in the conn. Open connstr of the preceding join,
How can an error be reported here? I found this problem on the Internet and changed it according to what he said.

Dbpath = server. mappath ("DB/# kehumsg. mdb ")
Connstr = "provider = Microsoft. Jet. oledb.4.0; Data Source =" & dbpath
Set conn = server. Createobject ("ADODB. Connection ")
Conn. Open connstr

I don't think much about it. I probably tried it,
However, this is not a long time-consuming situation. Today, the customer asked the question again.
When I got it, I got the server, and it was an error in the joint query,
How can this happen? After studying with the manager, I finally found out the problem:

In this case, RS ("B. ID") must be called in the ID of the second table,
It cannot be like the first join character,
I think it should be a problem with the database engine,
We recommend the second connection here,

//////////////////////////////////////// //////////////////////////////////////// /////////////////////////////////////////

Another problem was found. solution: the Windows/temp permission, users, and object modification permission.

Related Article

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.