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.