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

can't connect to database - no permission to read...

Status
Not open for further replies.

stefan76

Technical User
May 31, 2009
1
GB
hi,

first of all: i am a beginner...

i am working with PWS. i stored a database in my directory and want to do just basic things with it. it seems that i can connect to the database as i don't get an error message when i start this code:

<HTML>
<HEAD>
<TITLE>Student Records</TITLE>
</HEAD>
<BODY>

<%
Session.timeout = 15
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;db&quot;,&quot;username&quot;,&quot;password&quot;
Set Session(&quot;MyDB_conn&quot;) = conn
%>

<%
conn.close
set conn = Nothing
%>

</BODY>
</HTML>


whereas when i put something like

<%
strSQLQuery = &quot;SELECT * FROM hallo&quot;
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.Open strSQLQuery, conn, 3, 3
%>

in between i get an error message which says that i don't habe permission to read from &quot;hallo&quot;... i don't know what do to because in my point of view i have done everything perfectly alright... i wouldn't even know where to go to get that permission.

here is the full error message. i know it is in german but anyway...

Microsoft OLE DB Provider for ODBC Drivers-Fehler '80040e09'

[Microsoft][ODBC Microsoft Access Driver] Datensätze können nicht gelesen werden. Keine Leseberechtigung auf 'hallo'.

/Default.asp, Zeile 17


please help!

kind regards,
stefan
 
It might be that your database file doesn't have read/write permissions. If you are on the same computer, right-click on the database file to check it's permissions. Also, if you are using Windows NT, you might have to do something with your login permissions. I'm not too familiar with NT, but I know the permissions get set up differently by the login name than with Win 98.

Note that you do not set permissions in ASP. You have to do this physically on the file using the computer that stores your database. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top