SQL stored procedures to work on a asp page.

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

jennifer_merrittAsked:
Who is Participating?
 
radcaesarCommented:
Execute this first against SQL Server, And then execute your ASP Code.

sp_AddRemoteLogin 'HPFDATA','bay_portal';
0
 
sabeeshCommented:
Search for How the stored procedure call from asp . you will get lot of examples
0
 
jimtpowersCommented:
Looks to me like you are using a user that doesn't have rights.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Alpesh PatelAssistant ConsultantCommented:
Ohh, Please check the permission (remote login) to user.
0
 
Andy GreenCommented:
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
 
jimtpowersCommented:
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
 
jennifer_merrittAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.