473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Stored procedure with input variable

82 64KB
Hi, Access front end and SQL backend. I want to have a stored procedure with an input variable so users can be prompted for what they want thus saving me time from having to generate on the fly standard reports. I have no problem building it but when I do, I am the only one for whom it works. How do I make it available to everyone? Thanks in advance.
Jul 19 '13 #1
12 2010
Rabbit
12,516 Expert Mod 8TB
You or a database administrator will need to give everyone permission to execute the stored procedure on the SQL Server.
Jul 19 '13 #2
ck9663
2,878 Expert 2GB
Unless your front-end uses the same account to connect to the SQL Server.

Good Luck!!!


~~ CK
Jul 19 '13 #3
barbarao
82 64KB
@Rabbit
I'm the administrator but have never done this. Can you stir me in the right direction? Everyone has a separate log on to the SQL server. Thanks.
Jul 19 '13 #4
ck9663
2,878 Expert 2GB
Are there any other stored procedure that currently being used? If they can use it, they might probably be able to use your new one.

~~ CK
Jul 19 '13 #5
Rabbit
12,516 Expert Mod 8TB
You right click the procedure, click on properties, click on permissions. Add the users and give them execute permission.

@ck, I've always had to add permissions on any newly created procedures.
Jul 19 '13 #6
ck9663
2,878 Expert 2GB
Yes, Good practice :)
Jul 19 '13 #7
barbarao
82 64KB
@Rabbit
Thanks. I'll try that and let you know on Monday.
Jul 19 '13 #8
barbarao
82 64KB
@Rabbit
I did what you suggested and no luck. My server is off site and the folks that run the cloud tried things and the latest I heard is that they can run the stored procedure directly off SQL Mgt Studio so they think my issue has something to do with the Access form. Do you have any ideas as that makes no sense to me. Thanks much!
Jul 30 '13 #9
Rabbit
12,516 Expert Mod 8TB
You would need to tell us how you're calling the stored procedure from your form and any error messages you get.
Jul 30 '13 #10
barbarao
82 64KB
@Rabbit
I have a form (Access) with command buttons. The code for one button is
Expand|Select|Wrap|Line Numbers
  1.   Dim stDocName As String
  2.  
  3.     stDocName = "spAffiliationsPrompt"
  4.     DoCmd.OpenStoredProcedure stDocName, acViewNormal, acReadOnly
  5.  
  6. Exit_Command6_Click:
  7.     Exit Sub
When I click on the button the stored procedure prompt comes up. When anyone else where I work clicks on it, they get a message about the object cannot be found. I went to someone's machine and looked behind the scenes and was able to see the stored procedure and to run it (through "Queries") but no one but me can run it from the command button on click. Thanks in advance.
Jul 31 '13 #11
barbarao
82 64KB
I figured it out. It was a matter of having dbo in the name of the procedures. Thanks for your time and as usual, your support.
Jul 31 '13 #12
ck9663
2,878 Expert 2GB
I think that's just because you're running it from Access. If it's just SQL Server, "dbo" is the default schema.

Happy Coding!!!


~~ CK
Jul 31 '13 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: mhk | last post by:
Hi, i have "req_date" column of "datetime" type in Database table besides other columns. From my Web page, i am calling the Stored Procedure with variable parameter "Search_Date" of...
2
by: Caro | last post by:
I have a stored procedure spGetAccessLogDynamic and when I try to call it I get the following error: Server: Msg 2812, Level 16, State 62, Line 1 Could not find stored procedure 'S'. I dont...
6
by: Leon Shaw | last post by:
How do I implement a stored procedure to insert a new member in a database then return the primary key of that member back to the application to be use in another table?
0
by: Kerri | last post by:
Hi, I have a SPROC and I want to make one of the Input params optional. Is this possible and how? Thanks, K.
3
by: Pieter | last post by:
Hi, I have a View which contains (of course) several columns. Now I want to make a Stored Procedure that does a Select based on the parameters. For exemple: One time I want to select all the...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
1
by: tedqn | last post by:
Problem: - Stored procedure input parameters data type specific (SqlDbType.Int, SqlDbType.VarChar,etc). - Form submitted value in TextBox, DropDownList, etc are all string type (I guess). Some...
4
by: DreamersDelight | last post by:
Hi, I know I'm missing something but I can't figure out what it is? Something trivial I'm shure. create or replace PROCEDURE CREATE_BLOK_ID(transId IN NUMBER) AS BEGIN EXECUTE...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.