Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am having a problem with multiple record set/Access connections 2

Status
Not open for further replies.

scuttleButt

Programmer
May 17, 2000
44
US
I am working Dreamweaver UltraDev 4. I have started a thred there but I haven't received any responses so I thought I'd check here. I am using an Access database in which I am making 3 record sets. First lines of code to create the first record set is,

set rsCpcOwners = Server.CreateObject("ADODB.Recordset")
rsCpcOwners.ActiveConnection = MM_nappi_STRING
rsCpcOwners.Source = "SELECT distinct chartOwner FROM cpc"
Blah, blah....

Next DW creates the second record set
set rsRedOwners = Server.CreateObject("ADODB.Recordset")
rsRedOwners.ActiveConnection = MM_nappi_STRING
rsRedOwners.Source = "SELECT distinct chartOwner FROM red"
Blah, blah....

All connections test fine but when I run it through the browser I get an error, "Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use."

It is bombing on the second connection line, "rsRedOwners.ActiveConnection = MM_nappi_STRING"

the connection string is:
MM_nappi_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=E:\Root\Cnatra2\private\nappi.mdb"
That connection tests fine too.

Any suggestions?

Thanks,
Donna
 
MM_nappi_STRING

should be an active connection, not the connection string.

ex:
Code:
dim conn
set conn = server.createobject("adodb.connection")
conn.open MM_nappi_STRING

set rsCpcOwners = Server.CreateObject("ADODB.Recordset")
rsCpcOwners.ActiveConnection = conn
rsCpcOwners.Source = "SELECT distinct chartOwner  FROM cpc"
Blah, blah....

Next DW creates the second record set
set rsRedOwners = Server.CreateObject("ADODB.Recordset")
rsRedOwners.ActiveConnection = conn
rsRedOwners.Source = "SELECT distinct chartOwner  FROM red"
Blah, blah...

hope this helps
leo
 
I love you Leo you are my hero. I worked perfectly. I have been strggling with this for 3 days. Thank you.
 
So Donna give the guy a Star
click the

"Let vasah20 know
this post was helpful!"

under his POST on the left in blue
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Okay. I didn't know about the stars. I gave him one thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top