running access query with fp

M

Matt

Hi,

Is there a way to run an access query from a webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a way
to do this?

Thanks,

Matt
 
D

David Berry

You would have to use ASP to do this by putting "exec" and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you just wanted to execute
the query, adn not return a recordset you'd change the last line to
adoCN.Execute(strSQL)

Dave
 
M

Matt

Hey,

I used the code you gave me and got this error message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first post, I
actaully am trying to run an append query, not an update.

Thanks,

Matt
 
D

David Berry

You'll need to contact your web host to fix this (unless this is on your own
server). This happens when your .MDB file does not have WRITE permissions
on the server. The fix is to assign Read + Write permissions to the IUSR
account for the .MDB file. (or to the whole directory that the .MDB file is
in). You most likely don't have the ability to do this yourself unless your
host has some type of "control panel" where you can change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------

-----------------------------------

Matt said:
Hey,

I used the code you gave me and got this error message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first post, I
actaully am trying to run an append query, not an update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec" and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you just wanted to execute
the query, adn not return a recordset you'd change the last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------




.
 
M

Matt

Right now I am trying to run this locally. I checked the
user permissions and I only have one user which is the
admin, and that has all options checked. Would i have to
set up a new user called IUSR?

Thanks,

Matt
-----Original Message-----
You'll need to contact your web host to fix this (unless this is on your own
server). This happens when your .MDB file does not have WRITE permissions
on the server. The fix is to assign Read + Write permissions to the IUSR
account for the .MDB file. (or to the whole directory that the .MDB file is
in). You most likely don't have the ability to do this yourself unless your
host has some type of "control panel" where you can change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Hey,

I used the code you gave me and got this error message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first post, I
actaully am trying to run an append query, not an update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec" and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you
just
wanted to execute
the query, adn not return a recordset you'd change the last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Hi,

Is there a way to run an access query from a webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a way
to do this?

Thanks,

Matt


.


.
 
D

David Berry

In Explorer, right-click the MDB file, and under security make sure that the
"everyone" or internet guest account has read and write permissions. You
may have to add the Everyone account (it should be on your PC, just click
add and choose it).

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------

-----------------------------------

Matt said:
Right now I am trying to run this locally. I checked the
user permissions and I only have one user which is the
admin, and that has all options checked. Would i have to
set up a new user called IUSR?

Thanks,

Matt
-----Original Message-----
You'll need to contact your web host to fix this (unless this is on your own
server). This happens when your .MDB file does not have WRITE permissions
on the server. The fix is to assign Read + Write permissions to the IUSR
account for the .MDB file. (or to the whole directory that the .MDB file is
in). You most likely don't have the ability to do this yourself unless your
host has some type of "control panel" where you can change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Hey,

I used the code you gave me and got this error message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first post, I
actaully am trying to run an append query, not an update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec"
and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you just
wanted to execute
the query, adn not return a recordset you'd change the
last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hi,

Is there a way to run an access query from a webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a
way
to do this?

Thanks,

Matt


.


.
 
M

Matt

The only place I could find anything about security was in
the iis. The write box was unchecked, but checking it had
no effect on the results of the query. I am using win xp
and fp 2002... When i right click on the mdb file all i
get is a general tab and a summary tab.
Any Ideas?

Thanks,

Matt
-----Original Message-----
In Explorer, right-click the MDB file, and under security make sure that the
"everyone" or internet guest account has read and write permissions. You
may have to add the Everyone account (it should be on your PC, just click
add and choose it).

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Right now I am trying to run this locally. I checked the
user permissions and I only have one user which is the
admin, and that has all options checked. Would i have to
set up a new user called IUSR?

Thanks,

Matt
-----Original Message-----
You'll need to contact your web host to fix this
(unless
this is on your own
server). This happens when your .MDB file does not
have
WRITE permissions
on the server. The fix is to assign Read + Write permissions to the IUSR
account for the .MDB file. (or to the whole directory that the .MDB file is
in). You most likely don't have the ability to do this yourself unless your
host has some type of "control panel" where you can change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Hey,

I used the code you gave me and got this error message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first post, I
actaully am trying to run an append query, not an update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec"
and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you just
wanted to execute
the query, adn not return a recordset you'd change the
last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net- sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hi,

Is there a way to run an access query from a webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a
way
to do this?

Thanks,

Matt


.



.


.
 
D

David Berry

In Windows Explorer, right click on the .MDB and choose Properties. Make
sure "Read Only" isn't checked, then go to the security tab. That's where
you assign the permissions.

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------

-----------------------------------
Matt said:
The only place I could find anything about security was in
the iis. The write box was unchecked, but checking it had
no effect on the results of the query. I am using win xp
and fp 2002... When i right click on the mdb file all i
get is a general tab and a summary tab.
Any Ideas?

Thanks,

Matt
-----Original Message-----
In Explorer, right-click the MDB file, and under security make sure that the
"everyone" or internet guest account has read and write permissions. You
may have to add the Everyone account (it should be on your PC, just click
add and choose it).

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Right now I am trying to run this locally. I checked the
user permissions and I only have one user which is the
admin, and that has all options checked. Would i have to
set up a new user called IUSR?

Thanks,

Matt
-----Original Message-----
You'll need to contact your web host to fix this (unless
this is on your own
server). This happens when your .MDB file does not have
WRITE permissions
on the server. The fix is to assign Read + Write
permissions to the IUSR
account for the .MDB file. (or to the whole directory
that the .MDB file is
in). You most likely don't have the ability to do this
yourself unless your
host has some type of "control panel" where you can
change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hey,

I used the code you gave me and got this error
message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only
when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first
post, I
actaully am trying to run an append query, not an
update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec"
and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you
just
wanted to execute
the query, adn not return a recordset you'd change the
last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-
sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net- sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hi,

Is there a way to run an access query from a
webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a
way
to do this?

Thanks,

Matt


.



.


.
 
K

Kevin Spencer

If running Windows XP, you will have to disable "Simple File Sharing" to
access these settings.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

David Berry said:
In Windows Explorer, right click on the .MDB and choose Properties. Make
sure "Read Only" isn't checked, then go to the security tab. That's where
you assign the permissions.

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------
Matt said:
The only place I could find anything about security was in
the iis. The write box was unchecked, but checking it had
no effect on the results of the query. I am using win xp
and fp 2002... When i right click on the mdb file all i
get is a general tab and a summary tab.
Any Ideas?

Thanks,

Matt
-----Original Message-----
In Explorer, right-click the MDB file, and under security make sure that the
"everyone" or internet guest account has read and write permissions. You
may have to add the Everyone account (it should be on your PC, just click
add and choose it).

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

Right now I am trying to run this locally. I checked the
user permissions and I only have one user which is the
admin, and that has all options checked. Would i have to
set up a new user called IUSR?

Thanks,

Matt
-----Original Message-----
You'll need to contact your web host to fix this (unless
this is on your own
server). This happens when your .MDB file does not have
WRITE permissions
on the server. The fix is to assign Read + Write
permissions to the IUSR
account for the .MDB file. (or to the whole directory
that the .MDB file is
in). You most likely don't have the ability to do this
yourself unless your
host has some type of "control panel" where you can
change permissions.

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net- sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hey,

I used the code you gave me and got this error
message...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.
/reports/graph.asp, line 27

line 27 is
adoRS.open strSQL

I have gotten this error before with FP when I tried to
write my own update and delete sql statements (only
when I
use access though). Do you know what is wrong, or what
needs to be changed? I made a mistake in my first
post, I
actaully am trying to run an append query, not an
update.

Thanks,

Matt
-----Original Message-----
You would have to use ASP to do this by putting "exec"
and the name of the
query in your SQL String . For example:

strConnection = <Your Connection String)
Set adoCN = server.CreateObject("ADODB.connection")
Set adoRS = server.CreateObject("ADODB.recordset")
adoCN.Open strConnection
adoRS.ActiveConnection = adoCN
adoRS.CursorLocation = adUseClient

strSQL = "exec queryname"
adoRS.open strSQL

now you can access the data from the query. If you
just
wanted to execute
the query, adn not return a recordset you'd change the
last line to
adoCN.Execute(strSQL)

Dave

--
David Berry - MCP
Microsoft MVP - FrontPage
FrontPage Support: http://www.net-
sites.com/sitebuilder/
-----------------------------------
To assist you in getting the best answers for FrontPage
support see:
http://www.net- sites.com/sitebuilder/newsgroups.asp
-----------------------------------

message
Hi,

Is there a way to run an access query from a
webpage? I
have an update query in access that I would like run
before the page displays the information. Is there a
way
to do this?

Thanks,

Matt


.



.



.
 
Top