Showing posts with label adp. Show all posts
Showing posts with label adp. Show all posts

Tuesday, March 20, 2012

Access.adp & Stored Procedures

Here is a bug - maybe.
I have an access.adp that executes a sproc on SQL Server 2000. The sproc
contains a correlated subquery that updates the table ExcelData. Works fine
until someone other than the dbo uses the project. The sproc will not update
a table owned by any non-dbo user. The sproc does not use any owner name so
it should work for any user and update the table they own. However the sproc
will only update the table dbo.ExcelData and that only when it is executed b
y
a dbo - which is right.
Curiously, I copied the SQL statement from the sproc into an Access VBA
module in the project. Changed it into a string and executed it using a
command object. Works perfectly. Will correctly update the table owned y the
user whether the user is the dbo or not.
I'd rather have one sproc on the server than the sql statement in the VBA
module because, actually, the sproc involves about 30 updating queries, not
just one and I'd like to minimize network trafic.
And I do not want a sproc for each potential user even though that would
allow each sproc to identify the table by the owner's name.
Question: How can a sproc be tweaked to recognize the current user when the
user is not the dbo and update the correct table when the sproc is executed
from an ADP?
--
malcolmIt's hard to say from your description what's going on, but I suspect
it's a naming issue rather than a permissions one since you can run
VBA code to achieve the desired result. One way to verify this is to
put a Profiler trace on the app and see what the exact calls are.
Another is to always use the two-part name, either dbo.Tablename or
ownername.Tablename, depending. Unlike Access, SQL Server considers
the name of the object to be the two part owner.object name, so if the
object was created by a symin it will be owned by dbo. If it was
created by a non-symin, it will be owned by that person. So you can
have a dbo.Table1, a Fred.Table1, a Cindy.Table1, (etc etc etc) all in
the same database, and each one will need its own sets of permissions
granted to other users. If Access sends a query across the wire for
"Table1", which one would you expect SQLS to use? So in order to avoid
future anguish, have everything owned by dbo, and specify the two-part
name everywhere, in the UI and in your code. And use Profiler to see
what's actually going across the wire. See SQL Books Online, "Using
Ownership Chains" for more information.
--Mary
On Sat, 27 Aug 2005 15:58:02 -0700, "malcolm"
<ramartower@.access312.com> wrote:

>Here is a bug - maybe.
>I have an access.adp that executes a sproc on SQL Server 2000. The sproc
>contains a correlated subquery that updates the table ExcelData. Works fine
>until someone other than the dbo uses the project. The sproc will not updat
e
>a table owned by any non-dbo user. The sproc does not use any owner name so
>it should work for any user and update the table they own. However the spro
c
>will only update the table dbo.ExcelData and that only when it is executed
by
>a dbo - which is right.
>Curiously, I copied the SQL statement from the sproc into an Access VBA
>module in the project. Changed it into a string and executed it using a
>command object. Works perfectly. Will correctly update the table owned y th
e
>user whether the user is the dbo or not.
>I'd rather have one sproc on the server than the sql statement in the VBA
>module because, actually, the sproc involves about 30 updating queries, not
>just one and I'd like to minimize network trafic.
>And I do not want a sproc for each potential user even though that would
>allow each sproc to identify the table by the owner's name.
>Question: How can a sproc be tweaked to recognize the current user when the
>user is not the dbo and update the correct table when the sproc is executed
>from an ADP?|||Hello, Malcolm

>From your description, I understand that:
1. You have some tables with the same name and same structure, owned by
different users (including dbo);
2. You wrote a stored procedure (owned by dbo), that accesses that
table(s), specifying only the name of the table (not the owner)
3. You want the procedure to access each user's table, when invoked by
non-dbo users.
4. Currently, the procedure always accesses the tables owned by dbo
(regardless of which user invoked it).
First, let me say that what you are seeing it's not a bug, it's the
expected behaviour. Normally, when an object is accessed without
specifying the owner name, SQL Server looks first for an object with
that name owned by the current user, and then (if it doesn't exist) it
looks for an object owned by dbo. However, in stored procedures, when
an object is accessed without specifying the owner name, SQL Server
only looks for an object owned by the owner of the stored procedure.
For more informations, see:
http://msdn.microsoft.com/library/e...curity_2sz6.asp
http://msdn.microsoft.com/library/e...des_07_786r.asp
If you want a procedure (owned by dbo) to access each user's table
(when invoked by non-dbo users), then you can use EXEC('...') in the
stored procedure, so the queries are considered in another batch,
outside the scope of the procedure.
For example (considering that you already have user "a" and user "b" in
your database):
CREATE TABLE a.TheTable (a int PRIMARY KEY)
CREATE TABLE b.TheTable (b int PRIMARY KEY)
CREATE TABLE dbo.TheTable (x int PRIMARY KEY)
GO
CREATE PROCEDURE dbo.Test
AS
EXEC ('SELECT * FROM TheTable')
SELECT * FROM TheTable
GO
GRANT EXEC ON dbo.Test TO public
The first statement in the procedure will select from the table owned
by the user that invoked the procedure, but the second statement will
select from the table owned by the user that owns this procedure (dbo).
Razvan

Monday, March 19, 2012

Access with SQL [ADP?]

I would have thought an Access ADP would be the trick for what this many has
asked for.
The fact that nobody in this thread has even mentioned these ADPs is
somewhat troubling to me. Is this dead end stuff? When I first read about
ADP's, I thought, "Hey! I can leverage my existing knowledge of how to get
Access to get up and dance, and take advantage of the speed of SQL at the
same time" In the months (well year now) that I've been wanting to move to
this approach, I have heard less and less about ADPs.
Anyone have any input on ADPs, and why they might not be a good solution for
a client-serverh app like this?
-BrianDP
"James Goodman" <j a m e s@.norton-associates.co.u k> wrote in message
news:c08ddq$48t$1@.titan.btinternet.com...
> Is Access forming a front-end db for a SQL DB?
> Would it not be possible to utilise some kind of web site (ASP) or
similar.
> It will run much faster over a WAN.
> Or are you 'replicating' the SQL Server db to an AccessDB?
> You dont need MSDE to connect to a SQL Server DB. MSDE is the 'desktop'
> version of SQL Server.
>
>
> --
> Cheers,
> James Goodman MCSE, MCDBA
> http://www.angelfire.com/sports/f1pictures
>I'm in the final stages of converting an MDB to ADP. It is much faster, but
there are gotchas to work around. If you don't already know SQL Server, the
learning curve is even steeper.
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
"dp" <nobody@.mrspam.com> wrote in message
news:Vxo3c.92640$C65.17470@.nwrddc01.gnilink.net...
> I would have thought an Access ADP would be the trick for what this many
has
> asked for.
> The fact that nobody in this thread has even mentioned these ADPs is
> somewhat troubling to me. Is this dead end stuff? When I first read
about
> ADP's, I thought, "Hey! I can leverage my existing knowledge of how to
get
> Access to get up and dance, and take advantage of the speed of SQL at the
> same time" In the months (well year now) that I've been wanting to move
to
> this approach, I have heard less and less about ADPs.
> Anyone have any input on ADPs, and why they might not be a good solution
for
> a client-serverh app like this?
> -BrianDP
>
> "James Goodman" <j a m e s@.norton-associates.co.u k> wrote in message
> news:c08ddq$48t$1@.titan.btinternet.com...
> similar.
>|||Well, I'm learning the curve. Data types are different, there are views,
and these crazy SP_MOFO_THIS. No, I'm excited about the power that SQL will
provide. I had one task - it was one screen that queried two tables HUGE
tables, > 1M recs each, and filtered out the information, sliced it and
diced it a certain way, then reported on it. The version I wrote as an MDB,
when you hit the "go" button, would take about 30 seconds. In the new ADP I
wrote, it takes 3 seconds.
This increase in speed is enough for me. I'll learn ADO, I'll learn to
store my procedures. I'll learn about views, and such.
What my real question though is, "Is microsoft planning on dropping this
'avenue' any time in the near future?" I don't mind learning a new
language, or new methods for an older language, what I DO mind, is learning
some new microsoft strategy that is only going to be "hot stuff" for about 5
months before they change the synatax, and start calling it something else -
like with DAO to ADO. Well, for whatever reason they had to go that
direction fine, I just want to know that if I sink my teeth into ADO, that
I'll be able to be comfortable there for a while (say 5 years or so) before
microsoft some along with the .NET and scoops me up into some new
handy-dandy record-handling language.
-Brian
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:eIqA7vgBEHA.892@.TK2MSFTNGP09.phx.gbl...
> I'm in the final stages of converting an MDB to ADP. It is much faster,
but
> there are gotchas to work around. If you don't already know SQL Server,
the
> learning curve is even steeper.
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> "dp" <nobody@.mrspam.com> wrote in message
> news:Vxo3c.92640$C65.17470@.nwrddc01.gnilink.net...
> has
> about
> get
the
> to
> for
'desktop'
>|||You're too late. The latest fad is already ADO.NET which bears little
resembalance to ADO.
No need to wonder - you are guaranteed to be victimized by a new fads on a
regular basis.
"dp" <nobody@.mrspam.com> wrote in message
news:YHq3c.80899$6K.23711@.nwrddc02.gnilink.net...
> Well, I'm learning the curve. Data types are different, there are views,
> and these crazy SP_MOFO_THIS. No, I'm excited about the power that SQL
will
> provide. I had one task - it was one screen that queried two tables HUGE
> tables, > 1M recs each, and filtered out the information, sliced it and
> diced it a certain way, then reported on it. The version I wrote as an
MDB,
> when you hit the "go" button, would take about 30 seconds. In the new ADP
I
> wrote, it takes 3 seconds.
> This increase in speed is enough for me. I'll learn ADO, I'll learn to
> store my procedures. I'll learn about views, and such.
> What my real question though is, "Is microsoft planning on dropping this
> 'avenue' any time in the near future?" I don't mind learning a new
> language, or new methods for an older language, what I DO mind, is
learning
> some new microsoft strategy that is only going to be "hot stuff" for about
5
> months before they change the synatax, and start calling it something
else -
> like with DAO to ADO. Well, for whatever reason they had to go that
> direction fine, I just want to know that if I sink my teeth into ADO, that
> I'll be able to be comfortable there for a while (say 5 years or so)
before
> microsoft some along with the .NET and scoops me up into some new
> handy-dandy record-handling language.
> -Brian
>
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
> news:eIqA7vgBEHA.892@.TK2MSFTNGP09.phx.gbl...
> but
> the
many
to
> the
move
solution
> 'desktop'
>|||Will ADO as I know it, the connection string, etc, will that continue to
morph over time as well? Every time Microsoft releases a new version of
Access/SQL Server I'm going to have to go tweek my code? This doesn't seem
right. I mean, I realize people aren't (for the most part) out there still
programming in Cobol, and wondering why people are expecting them to move
on. I just want to know that Microsoft won't drop support for ADO in the
near future.
-Brian|||I expect it will continue to be supported for some time.
However it will continue to "morph". Morphing is not the problem.
There is a special place in DLL hell for users of Access - Jet - MDAC.
You stand a good chance of
1) do a forced upgrade
2) having such upgrade break your application
3) having data reliablity problems due to 1 and 2.
Unlike the SQL people, the Access - Jet - MDAC
people don't seem to understand that data is important.
"dp" <nobody@.mrspam.com> wrote in message
news:Jkj4c.6$F9.3@.nwrddc01.gnilink.net...
> Will ADO as I know it, the connection string, etc, will that continue to
> morph over time as well? Every time Microsoft releases a new version of
> Access/SQL Server I'm going to have to go tweek my code? This doesn't
seem
> right. I mean, I realize people aren't (for the most part) out there
still
> programming in Cobol, and wondering why people are expecting them to move
> on. I just want to know that Microsoft won't drop support for ADO in the
> near future.
> -Brian

Tuesday, March 6, 2012

Access through MS Access ADP for everyone?

Hello,
We have recently installed SQL enterprise manager. I was testing the securi
ty to the databases when I realized that if I login to XP under a standard d
omain user account, open MS Access, create an ADP project, then under connec
tions, pick the sql server, I can see and pick any of the databases and then
I can open and view any of the tables in any of the databases. How can thi
s be possible? We are using NT authentication. This user has no account in
SQL and is just a domain user.It's allowed somehow with the security you have implemented
on the server, in the databases. It's not clear what version
or edition of SQL you are running, where the SQL Server
instance is installed - on the network and you are accessing
this over a network? It's not clear what operating system
the SQL Server is running on, is the SQL Server in a domain
or is this actually a workgroup? Did you change any of the
default security settings? Who are members of Local Admins
where SQL Server is installed? What is the status of the
guest account in Windows where SQL is installed?
What databases are you actually accessing and opening
tables? Are these system databases?
-Sue
On Tue, 11 Oct 2005 21:19:32 -0400, "Jack"
<jackhnospam@.jackandjay.com> wrote:

>Hello,
>We have recently installed SQL enterprise manager. I was testing the security to t
he databases when I realized that if I login to XP under a standard domain user acco
unt, open MS Access, create an ADP project, then under connections, pick the sql ser
ver
, I can see and pick any of the databases and then I can open and view any o
f the tables in any of the databases. How can this be possible? We are usi
ng NT authentication. This user has no account in SQL and is just a domain
user.

Saturday, February 25, 2012

access SQL Server from application

Hi,

I have recently transfered data from MS Access to MS SQL Server 2000 and created user interface in MS Access Project (ADP). Now I need to secure the data on server and want to access it ONLY through interface I created in MS Access. Every user has to log in the application (user id and password). Users may have the same access rights to the server (so maybe just one account or whatever I need for all of them). Can anyone advice me how to set it up? To access sql server from MS Access I am using ADO.

Thank you.
djLookup "Application Roles" in Books Online.

But be aware that it is better practice to limit your to establish security at the data level than the application level. Establishing Application Roles is no substitute for making sure that your database is locked down.|||Yes, I agree. I have no experience with SQL Server. In MS Access it was easy. So, how to lock down database. What I should create there to secure data? Any password? And then I need to access data through ADO. There is connection string where I have to pass a password.

Could you help me to clarify that.
Thanks
dj

Friday, February 24, 2012

Access permissions

I have recently installed MSDE for the first time and created a .adp file
that connects to my MSDE server. However, when I create a new table within
the .adp file I can't add new records to it. Also, when I go to the
"Advanced" tab of the "Data Link Properties" dialog box all of the Access
Permissions are greyed out. I feel that this could be part of the problem.
Any suggestions?
Nevermind, I figured it out. I did not have the table indexed therefore I
wasn't able to add new records.
"Taz" wrote:

> I have recently installed MSDE for the first time and created a .adp file
> that connects to my MSDE server. However, when I create a new table within
> the .adp file I can't add new records to it. Also, when I go to the
> "Advanced" tab of the "Data Link Properties" dialog box all of the Access
> Permissions are greyed out. I feel that this could be part of the problem.
> Any suggestions?

Monday, February 13, 2012

Access Functions not Working

Hi--
We just upgraded our server and now have Sql 2005 as a backend to our
Access ADP. With SQL 2000, we had used functions like Date() to provide
default values for certain fields. Now, these functions are not working
on the clients. However, they do work on every computer with SQL 2005
installed. I have 2005 installed on my laptop and the server and am
having no problems on those computers. Is there anything I can do to
the clients to resolve this issue' Thanks in advance.
ChrisDate() is VB/VBA function that only runs inside front app's code (ADP's VBA
code). It has nothing to do with back end, be it SQL Server2000 or SQL
Server2005. If you used Date() in backend query (SP, View...) it should not
have worked at all, because SQL Server2000/2005 would not recognize it.
Your issue is most likely cuased by missing reference(s) that is required by
your ADP app itself. Go to VBA Editor and click menu "Tools->References..."
to looking for missing reference(s).
<creejohnson@.gmail.com> wrote in message
news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue' Thanks in advance.
> Chris
>|||Thanks, Norman.
I am aware that Date() is a vba function, but it DID work with sql 2000
and does not work with Sql 2005. It is used only in the front end as a
default value of a text box. That is what is mystifying me. There are
no missing references..already checked that. Any other ideas? The thing
that really makes me wonder is that the defaults work on those
computers that have the client tools/legacy components installed for
sql 2005.
Chris
Norman Yuan wrote:[vbcol=seagreen]
> Date() is VB/VBA function that only runs inside front app's code (ADP's VB
A
> code). It has nothing to do with back end, be it SQL Server2000 or SQL
> Server2005. If you used Date() in backend query (SP, View...) it should no
t
> have worked at all, because SQL Server2000/2005 would not recognize it.
> Your issue is most likely cuased by missing reference(s) that is required
by
> your ADP app itself. Go to VBA Editor and click menu "Tools->References...
"
> to looking for missing reference(s).
> <creejohnson@.gmail.com> wrote in message
> news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...|||It is hard to debug "not working". Possibly that function result in date bei
ng passed as a string to
SQL Server, and different string formats being messed up due to language set
tings. Use Profiler to
see what is really submitted to SQL Server. Also see
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2000cwc.googlegroup
s.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue' Thanks in advance.
> Chris
>|||Thanks, Tibor.
I guess I should be more specific on the problem, but by not working, I
mean not working:-) There is nothing in any textbox using the Date()
VBA function when there should be (used to be before the switch)
today's date.
I have a couple of ideas to check into tomorrow, but any help you could
give would be appreciated.
Thanks
Chris
Tibor Karaszi wrote:[vbcol=seagreen]
> It is hard to debug "not working". Possibly that function result in date b
eing passed as a string to
> SQL Server, and different string formats being messed up due to language s
ettings. Use Profiler to
> see what is really submitted to SQL Server. Also see
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> <creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2
000cwc.googlegroups.com...|||Seems to be an Access issue, then. I suggest you ask this in an Access group
, as we are more into
the engine here... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message
news:1159404812.588775.157020@.m7g2000cwm.googlegroups.com...
> Thanks, Tibor.
> I guess I should be more specific on the problem, but by not working, I
> mean not working:-) There is nothing in any textbox using the Date()
> VBA function when there should be (used to be before the switch)
> today's date.
> I have a couple of ideas to check into tomorrow, but any help you could
> give would be appreciated.
> Thanks
> Chris
> Tibor Karaszi wrote:
>

Access Functions not Working

Hi--
We just upgraded our server and now have Sql 2005 as a backend to our
Access ADP. With SQL 2000, we had used functions like Date() to provide
default values for certain fields. Now, these functions are not working
on the clients. However, they do work on every computer with SQL 2005
installed. I have 2005 installed on my laptop and the server and am
having no problems on those computers. Is there anything I can do to
the clients to resolve this issue? Thanks in advance.
Chris
Date() is VB/VBA function that only runs inside front app's code (ADP's VBA
code). It has nothing to do with back end, be it SQL Server2000 or SQL
Server2005. If you used Date() in backend query (SP, View...) it should not
have worked at all, because SQL Server2000/2005 would not recognize it.
Your issue is most likely cuased by missing reference(s) that is required by
your ADP app itself. Go to VBA Editor and click menu "Tools->References..."
to looking for missing reference(s).
<creejohnson@.gmail.com> wrote in message
news:1159308950.973840.54110@.i3g2000cwc.googlegrou ps.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue? Thanks in advance.
> Chris
>
|||Thanks, Norman.
I am aware that Date() is a vba function, but it DID work with sql 2000
and does not work with Sql 2005. It is used only in the front end as a
default value of a text box. That is what is mystifying me. There are
no missing references..already checked that. Any other ideas? The thing
that really makes me wonder is that the defaults work on those
computers that have the client tools/legacy components installed for
sql 2005.
Chris
Norman Yuan wrote:[vbcol=seagreen]
> Date() is VB/VBA function that only runs inside front app's code (ADP's VBA
> code). It has nothing to do with back end, be it SQL Server2000 or SQL
> Server2005. If you used Date() in backend query (SP, View...) it should not
> have worked at all, because SQL Server2000/2005 would not recognize it.
> Your issue is most likely cuased by missing reference(s) that is required by
> your ADP app itself. Go to VBA Editor and click menu "Tools->References..."
> to looking for missing reference(s).
> <creejohnson@.gmail.com> wrote in message
> news:1159308950.973840.54110@.i3g2000cwc.googlegrou ps.com...
|||It is hard to debug "not working". Possibly that function result in date being passed as a string to
SQL Server, and different string formats being messed up due to language settings. Use Profiler to
see what is really submitted to SQL Server. Also see
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2000cwc.googlegrou ps.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue? Thanks in advance.
> Chris
>
|||Thanks, Tibor.
I guess I should be more specific on the problem, but by not working, I
mean not working:-) There is nothing in any textbox using the Date()
VBA function when there should be (used to be before the switch)
today's date.
I have a couple of ideas to check into tomorrow, but any help you could
give would be appreciated.
Thanks
Chris
Tibor Karaszi wrote:[vbcol=seagreen]
> It is hard to debug "not working". Possibly that function result in date being passed as a string to
> SQL Server, and different string formats being messed up due to language settings. Use Profiler to
> see what is really submitted to SQL Server. Also see
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> <creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2000cwc.googlegrou ps.com...
|||Seems to be an Access issue, then. I suggest you ask this in an Access group, as we are more into
the engine here... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message
news:1159404812.588775.157020@.m7g2000cwm.googlegro ups.com...
> Thanks, Tibor.
> I guess I should be more specific on the problem, but by not working, I
> mean not working:-) There is nothing in any textbox using the Date()
> VBA function when there should be (used to be before the switch)
> today's date.
> I have a couple of ideas to check into tomorrow, but any help you could
> give would be appreciated.
> Thanks
> Chris
> Tibor Karaszi wrote:
>

Access Functions not Working

Hi--
We just upgraded our server and now have Sql 2005 as a backend to our
Access ADP. With SQL 2000, we had used functions like Date() to provide
default values for certain fields. Now, these functions are not working
on the clients. However, they do work on every computer with SQL 2005
installed. I have 2005 installed on my laptop and the server and am
having no problems on those computers. Is there anything I can do to
the clients to resolve this issue' Thanks in advance.
ChrisDate() is VB/VBA function that only runs inside front app's code (ADP's VBA
code). It has nothing to do with back end, be it SQL Server2000 or SQL
Server2005. If you used Date() in backend query (SP, View...) it should not
have worked at all, because SQL Server2000/2005 would not recognize it.
Your issue is most likely cuased by missing reference(s) that is required by
your ADP app itself. Go to VBA Editor and click menu "Tools->References..."
to looking for missing reference(s).
<creejohnson@.gmail.com> wrote in message
news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue' Thanks in advance.
> Chris
>|||Thanks, Norman.
I am aware that Date() is a vba function, but it DID work with sql 2000
and does not work with Sql 2005. It is used only in the front end as a
default value of a text box. That is what is mystifying me. There are
no missing references..already checked that. Any other ideas? The thing
that really makes me wonder is that the defaults work on those
computers that have the client tools/legacy components installed for
sql 2005.
Chris
Norman Yuan wrote:
> Date() is VB/VBA function that only runs inside front app's code (ADP's VBA
> code). It has nothing to do with back end, be it SQL Server2000 or SQL
> Server2005. If you used Date() in backend query (SP, View...) it should not
> have worked at all, because SQL Server2000/2005 would not recognize it.
> Your issue is most likely cuased by missing reference(s) that is required by
> your ADP app itself. Go to VBA Editor and click menu "Tools->References..."
> to looking for missing reference(s).
> <creejohnson@.gmail.com> wrote in message
> news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
> > Hi--
> >
> > We just upgraded our server and now have Sql 2005 as a backend to our
> > Access ADP. With SQL 2000, we had used functions like Date() to provide
> > default values for certain fields. Now, these functions are not working
> > on the clients. However, they do work on every computer with SQL 2005
> > installed. I have 2005 installed on my laptop and the server and am
> > having no problems on those computers. Is there anything I can do to
> > the clients to resolve this issue' Thanks in advance.
> >
> > Chris
> >|||It is hard to debug "not working". Possibly that function result in date being passed as a string to
SQL Server, and different string formats being messed up due to language settings. Use Profiler to
see what is really submitted to SQL Server. Also see
http://www.karaszi.com/SQLServer/info_datetime.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
> Hi--
> We just upgraded our server and now have Sql 2005 as a backend to our
> Access ADP. With SQL 2000, we had used functions like Date() to provide
> default values for certain fields. Now, these functions are not working
> on the clients. However, they do work on every computer with SQL 2005
> installed. I have 2005 installed on my laptop and the server and am
> having no problems on those computers. Is there anything I can do to
> the clients to resolve this issue' Thanks in advance.
> Chris
>|||Thanks, Tibor.
I guess I should be more specific on the problem, but by not working, I
mean not working:-) There is nothing in any textbox using the Date()
VBA function when there should be (used to be before the switch)
today's date.
I have a couple of ideas to check into tomorrow, but any help you could
give would be appreciated.
Thanks
Chris
Tibor Karaszi wrote:
> It is hard to debug "not working". Possibly that function result in date being passed as a string to
> SQL Server, and different string formats being messed up due to language settings. Use Profiler to
> see what is really submitted to SQL Server. Also see
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> <creejohnson@.gmail.com> wrote in message news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
> > Hi--
> >
> > We just upgraded our server and now have Sql 2005 as a backend to our
> > Access ADP. With SQL 2000, we had used functions like Date() to provide
> > default values for certain fields. Now, these functions are not working
> > on the clients. However, they do work on every computer with SQL 2005
> > installed. I have 2005 installed on my laptop and the server and am
> > having no problems on those computers. Is there anything I can do to
> > the clients to resolve this issue' Thanks in advance.
> >
> > Chris
> >|||Seems to be an Access issue, then. I suggest you ask this in an Access group, as we are more into
the engine here... :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<creejohnson@.gmail.com> wrote in message
news:1159404812.588775.157020@.m7g2000cwm.googlegroups.com...
> Thanks, Tibor.
> I guess I should be more specific on the problem, but by not working, I
> mean not working:-) There is nothing in any textbox using the Date()
> VBA function when there should be (used to be before the switch)
> today's date.
> I have a couple of ideas to check into tomorrow, but any help you could
> give would be appreciated.
> Thanks
> Chris
> Tibor Karaszi wrote:
>> It is hard to debug "not working". Possibly that function result in date being passed as a string
>> to
>> SQL Server, and different string formats being messed up due to language settings. Use Profiler
>> to
>> see what is really submitted to SQL Server. Also see
>> http://www.karaszi.com/SQLServer/info_datetime.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> <creejohnson@.gmail.com> wrote in message
>> news:1159308950.973840.54110@.i3g2000cwc.googlegroups.com...
>> > Hi--
>> >
>> > We just upgraded our server and now have Sql 2005 as a backend to our
>> > Access ADP. With SQL 2000, we had used functions like Date() to provide
>> > default values for certain fields. Now, these functions are not working
>> > on the clients. However, they do work on every computer with SQL 2005
>> > installed. I have 2005 installed on my laptop and the server and am
>> > having no problems on those computers. Is there anything I can do to
>> > the clients to resolve this issue' Thanks in advance.
>> >
>> > Chris
>> >
>

Access Front End and SQL Server 2000 Record Level Access Control

Hello,

We are using Access ADP as a front end, SQL Server 2000 as a back end.
We have a customer contact database. We would like to limit certain
users to only receive certain records based on Windows NT group
membership.

For example, Eastern Sales Group can see clients located in their
region, but they cannot see clients located in the Northern Region.

Is there an elegant way to do this? Below a two solutions which have
been proposed, but none seem to fit. Access is required as a Front End
for its ease of use.

*********
** 1 **
*********
Add an additional attribute (bit mask value) to tblCustomers, and
query appropriately based on the user's group membership.

Problem:
Access allows users direct access to the underlying table.

*********
** 2 **
*********
Create a separe table for each group (effectively splitting
tblCustomers into smaller, separate tables based on group access).
Then, apply SQL Server security on the objects to enforce the business
rules.

Problem:
Does this break Normal Form? I've never seen a solution like this.

I've googled and found similar questions, but not a good solution.

Any suggestions would be appreciated.

Thanks,
Jeff
Jeffrey Walton
noloader.at.yahoo.com"Noloader" <noloader@.yahoo.com> wrote in message
news:6b543aa7.0404231447.777fe29c@.posting.google.c om...
> Hello,
> We are using Access ADP as a front end, SQL Server 2000 as a back end.
> We have a customer contact database. We would like to limit certain
> users to only receive certain records based on Windows NT group
> membership.
> For example, Eastern Sales Group can see clients located in their
> region, but they cannot see clients located in the Northern Region.
> Is there an elegant way to do this? Below a two solutions which have
> been proposed, but none seem to fit. Access is required as a Front End
> for its ease of use.
> *********
> ** 1 **
> *********
> Add an additional attribute (bit mask value) to tblCustomers, and
> query appropriately based on the user's group membership.
> Problem:
> Access allows users direct access to the underlying table.
> *********
> ** 2 **
> *********
> Create a separe table for each group (effectively splitting
> tblCustomers into smaller, separate tables based on group access).
> Then, apply SQL Server security on the objects to enforce the business
> rules.
> Problem:
> Does this break Normal Form? I've never seen a solution like this.
> I've googled and found similar questions, but not a good solution.
> Any suggestions would be appreciated.
> Thanks,
> Jeff
> Jeffrey Walton
> noloader.at.yahoo.com

In general, there is no reason why your users should need to access tables
directly. If you manage data access through stored procedures, then the
procedures can check role membership and only return or update those rows
which are permitted to the user. You could also use views, based on role
membership, or use application roles and handle everything in the client
application.

I would avoid solution 2, because it duplicates data - whatever information
you use to partition the data could also be put in a column. But if you have
a large amount of data, and if users only access their own data, then this
might also be an option.

Simon|||RE/
>We have a customer contact database. We would like to limit certain
>users to only receive certain records based on Windows NT group
>membership.

Based on what little experience I've had doing an Access front end against SQL
Server, I'd set SQL Server security so that nobody and nothing can get directly
to the tables in question and then develop stored procedures and/or views to
move the data back-and-forth between tables and app.
--
PeteCresswell