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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database problem

Status
Not open for further replies.

kruxty

Programmer
Jul 17, 2001
197
PT
Hi,

i'm having some problems with this code.
When i open the file the page reads for a lot of time and after some time gives error.

Code:
Response object, ASP 0104 (0x80070057)
Operation not Allowed
/Checklist/main.asp

I dont understang very well whats happening because i use a similar code in other pages and it works.
Any help?!

This is the code:
Code:
Sub verificaperiodo()

Dim adoCon
Dim strSQL
Dim rsperiodo

'Abrir Base de dados e recordset
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("BD\bdchecklist.mdb")
strSQL = "SELECT * FROM chk_vista WHERE periodo=9"
'" & diasemana & " or periodo=9"
Set rsperiodo = Server.CreateObject("ADODB.Recordset")
rsperiodo.Open strSQL, adoCon


Do While Not rsperiodo.EOF
	response.Write("teste")	
Loop

rsperiodo.Close
adocon.close

End Sub

I supose that the problem is in the do while cycle.
Tkx to all help.

K.
 
make sure that you are closing your recordset and connection objects at the proper places thorughout the code...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top