Recently I encountered a problem when I was building a customer management system for my customers:
When using the following connection string, the following situation is as follows
connstr="DBQ="+server.mappath("db/#kehumsg.mdb")+";DefaultDir=;DRIVER={Microsoft AccessDriver(*.mdb)};"
setconn=server.createobject("ADODB.CONNECTION")
conn.openconnstr
There is a join query,
Use the id of the second table to be called,
Normally, rs("b.id") can be adjusted in this way but it is displayed in the set corresponding to the desired name or ordinal number, and no items are found.
I can't find the answer after posting on csdn.
Finally, I used rs("id") to solve the problem. I thought, this call should be to adjust the id of the first table.
But it adjusts the second table, but what I want is the second one.
After studying it, it turns out that this is true. It adjusts the id of the latter table. It feels pretty good. I can find something by myself, haha~~
But when the customer was about to get off work, he said there was a problem and he couldn't get in.
The error is at the conn.openconnstr of the above connection,
Why is there an error here? I looked it online and said that this is the case, so I changed it to
dbpath=server.mappath("db/#kehumsg.mdb")
connstr="provider=microsoft.jet.oledb.4.0;datasource="&dbpath
setconn=server.createobject("adodb.connection")
conn.openconnstr
Didn't think much, maybe I could try it.
But the good times didn't last long, and today the customer mentioned the problem again.
When I got it, I was convinced and it was a joint query and there was an error.
Why is this happening? I studied it with the manager and finally found the problem:
At this time, the id in the second table can be called rs("b.id") and it must be called in this way.
Can't do it like the first join character,
I think it should be a problem with the database engine. I don't know what everyone thinks
Here we recommend the second connection,
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Another problem was found, solution: Windows/temp's permission users plus the item to modify the permission.