Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SQL stored procedures to work on a asp page.

Posted on 2011-04-29
7
Medium Priority
?
307 Views
Last Modified: 2012-05-11
I have a stored procedure on a SQLServer 2008. I want to run this procedure from a web page. When i try to run the stored procedure i get this error

but if i run the SQL query straight from the web page it works. I am currently using asp, but the code will be converted to JSP when i am done.

The stored procedure works fine on the SQL Server.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not connect to server 'HPFDATA' because 'bay_portal' is not defined as a remote login at the server.

Open in new window

0
Comment
Question by:jennifer_merritt
7 Comments
 
LVL 8

Expert Comment

by:sabeesh
ID: 35494829
Search for How the stored procedure call from asp . you will get lot of examples
0
 
LVL 4

Expert Comment

by:jimtpowers
ID: 35494889
Looks to me like you are using a user that doesn't have rights.
0
 
LVL 9

Accepted Solution

by:
radcaesar earned 2000 total points
ID: 35495501
Execute this first against SQL Server, And then execute your ASP Code.

sp_AddRemoteLogin 'HPFDATA','bay_portal';
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 35496141
Ohh, Please check the permission (remote login) to user.
0
 
LVL 3

Expert Comment

by:Andy Green
ID: 35496336
ASP.Net uses the Network Account but ASP uses the IUSER account. Check that there are permissions in SQL for the IUSER account, it will look something like IUSER_xxxxx where xxxx is the machine name.

Andy
0
 
LVL 4

Expert Comment

by:jimtpowers
ID: 35504601
Never add the IUSER account to SQL Server. The connection to SQL Server from your .ASP application will use the username in the connection string. Make that user has appropriate rights on the SQL Server.
0
 

Author Comment

by:jennifer_merritt
ID: 35513487
I am still haveing issues with this, but i decided to move the code to a portlet in JSP. So wish me luck.

thank you for all your replys!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question