|
 |
access_asp thread: Re: Error when trying to connect to database when running a SQL SEL
Message #1 by "Paddy Anigbo" <dirosky@h...> on Tue, 16 Oct 2001 14:56:54 +0100
|
|
Simon,
I think this error may be as a result of the query/tables being open while
you are trying to run the execute command. Try closing the database and
run the asp page again. good luck.
Patrick
----- Original Message -----
From: Simon Brookes
Sent: 16 October 2001 14:06
To: Access ASP
Subject: [access_asp] Error when trying to connect to database when
running a SQL SELECT on joined tables
Well the Subject says it all really.
I get an error when I try to connect to an Access Database when using an
SQL SELECT Statement on joined tables.
If I remove the join (and just query the one table) I dont get the error.
I know the SQL is correct because I can run it as a query in Access and it
works fine.
However when I try to run it from my asp page I get this error:
--------------------------------------------------
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.
/testarea/OPP/test.asp, line 80
--------------------------------------------------
This is the extract of the page code:
<%
Dim objCommand, objRS
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = StrConnect
objCommand.CommandText = "SELECT OPPF.JobTitle, OPPF.JobId, OPPF.StaffId,
OPPF.DateOpened, OPPF.Status, Staff.FirstName, Staff.Surname FROM OPPF
INNER JOIN Staff ON OPPF.StaffId = Staff.StaffId WHERE OPPF.Status
<> 'complete'"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
Set objCommand = Nothing
etc..................
Please Help me if you can.
Thanks
Simon
Simon.brookes@p...
Message #2 by "Frank Kech" <fkech@s...> on Tue, 16 Oct 2001 09:04:20 -0500
|
|
Hey, does anyone have a great line charting system that works with ASP and a
database? If so, please share your fortune. Thanks,
Frank
-----Original Message-----
From: Paddy Anigbo [mailto:dirosky@h...]
Sent: Tuesday, October 16, 2001 8:57 AM
To: Access ASP
Subject: [access_asp] Re: Error when trying to connect to database when
running a SQL SEL
Simon,
I think this error may be as a result of the query/tables being open while
you are trying to run the execute command. Try closing the database and
run the asp page again. good luck.
Patrick
----- Original Message -----
From: Simon Brookes
Sent: 16 October 2001 14:06
To: Access ASP
Subject: [access_asp] Error when trying to connect to database when
running a SQL SELECT on joined tables
Well the Subject says it all really.
I get an error when I try to connect to an Access Database when using an
SQL SELECT Statement on joined tables.
If I remove the join (and just query the one table) I dont get the error.
I know the SQL is correct because I can run it as a query in Access and it
works fine.
However when I try to run it from my asp page I get this error:
--------------------------------------------------
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.
/testarea/OPP/test.asp, line 80
--------------------------------------------------
This is the extract of the page code:
<%
Dim objCommand, objRS
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = StrConnect
objCommand.CommandText = "SELECT OPPF.JobTitle, OPPF.JobId, OPPF.StaffId,
OPPF.DateOpened, OPPF.Status, Staff.FirstName, Staff.Surname FROM OPPF
INNER JOIN Staff ON OPPF.StaffId = Staff.StaffId WHERE OPPF.Status
<> 'complete'"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
Set objCommand = Nothing
etc..................
Please Help me if you can.
Thanks
Simon
Simon.brookes@p...
|
|
 |