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

ADODB.Recordset (0x800A0CC1) error

Status
Not open for further replies.

KARSIYAKALI

Programmer
Joined
Jul 16, 2004
Messages
2
Location
TR
when I read data from a database I how can reach all of them. I have the following code and when I run it it gives

ADODB.Recordset (0x800A0CC1) error.

Dim oConn
Dim filePath
Dim rs


filePath = Server.MapPath("data.mdb")

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath




SQL = "SELECT tarih FROM veri WHERE Yazar='Aragorn'"

set dizi = oConn.execute(SQL)

x = dizi(1).
%>

but it works when I write dizi(0) instead of dizi(1). I am also sure that there are at least two datas where yazar is Aragorn.

wating for any solution.
 
You could try something like this to give you a visual of the fields and data that is in the database:
Code:
dim dizi,fld,x
set dizi = oConn.execute(Sql)
If not dizi.eof then
	for each fld in dizi.fields
		response.Write(fld.Name & " | ")
	Next
	response.Write("<br>")
		Do while not dizi.eof
			for x = 0 to dizi.fields.count -1
				response.Write(dizi(x).value & " | ")
			Next
			response.Write("<br>")
		dizi.movenext
		loop
End if
set dizi = nothing
oConn.close
set oConn=nothing
Another thing: I see you dimming rs but I don't see you using it. Just curious.
 
First thanks for your reply. And this not my whole code and I used rs for something else. I tried to use record set object with rs but when I failed I wrote to this forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top