473,714 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net 2.0 & SQL Express: Cannot find stored procedure...

Hi everybody,

I created several stored procedure in a local sql server 2005 express
database, now when I call/execute them in the asp.net 2.0 web page, it
returns an error message of "Cannot find the stored procedure '<proc_name>'" ,
this is funny, when I execute the command in a sql query window "exec
sp_GetAllArticl es", it also returns cannot find stored procedure, but when I
execute the "Use <DBName>" and then execute the statement, it works. The sql
connection used in codes is ok.
So, what I have missed to set or where I made mistake?
Code:
Inside web.config,
<add name="Connectst ring" connectionStrin g="Data
Source=DENSIA\S QLExpress;Initi al Catalog=DbName; Integrated Security=True"
providerName="S ystem.Data.SqlC lient" />

inside Load event,

DAL.ConnectionS tring =
ConfigurationMa nager.Connectio nStrings["Connectstr ing"].ConnectionStri ng;

private void DisplayLatestRe sources()
{
DAL.CreateComma nd("sp_GetLates tFiveTrainingRe sources");
DAL.ExecuteRead er();
SqlDataReader dr = DAL.DataReader;
.....
}

Try supplying with user id and password, same result...also try using
aspnet_regsql.e xe, same result also...

Thanks in advanced.
den2005
--
MCP Year 2005, Philippines
Sep 5 '06 #1
1 2582
Make sure the user (anon?) is not set with another default catalog other
than DbName.
Make sure the server is configured to accept TCP/IP connections

Since this is Express, your options are limited (no profiler, for example).
I am not sure how to easily query which DB you are in (someone else surely
knows), but I know you can run this command:

SELECT * FROM sys.database_fi les

If you find the files are not DBName and DBName_Log, you are in the wrong
database. You can also query the sprocs in this database and make sure you
stuck them there rather than some other database. Other than that, I am
stumped.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"den 2005" <de*****@discus sions.microsoft .comwrote in message
news:8B******** *************** ***********@mic rosoft.com...
Hi everybody,

I created several stored procedure in a local sql server 2005 express
database, now when I call/execute them in the asp.net 2.0 web page, it
returns an error message of "Cannot find the stored procedure
'<proc_name>'" ,
this is funny, when I execute the command in a sql query window "exec
sp_GetAllArticl es", it also returns cannot find stored procedure, but when
I
execute the "Use <DBName>" and then execute the statement, it works. The
sql
connection used in codes is ok.
So, what I have missed to set or where I made mistake?
Code:
Inside web.config,
<add name="Connectst ring" connectionStrin g="Data
Source=DENSIA\S QLExpress;Initi al Catalog=DbName; Integrated Security=True"
providerName="S ystem.Data.SqlC lient" />

inside Load event,

DAL.ConnectionS tring =
ConfigurationMa nager.Connectio nStrings["Connectstr ing"].ConnectionStri ng;

private void DisplayLatestRe sources()
{
DAL.CreateComma nd("sp_GetLates tFiveTrainingRe sources");
DAL.ExecuteRead er();
SqlDataReader dr = DAL.DataReader;
.....
}

Try supplying with user id and password, same result...also try using
aspnet_regsql.e xe, same result also...

Thanks in advanced.
den2005
--
MCP Year 2005, Philippines

Sep 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3068
by: Brad H McCollum | last post by:
I'm writing an application using VB 6.0 as the front-end GUI, and the MSDE version of SQL Server as the back-end (it's a program for a really small # of users --- less then 3-4). I'm trying to determine, through the Visual Basic interface, the permissions of each user that's using the application on his/her machine. For example, let's say I'm user "Michael" that's sitting down at my machine using the app. I've written. The security...
2
10164
by: Jegg | last post by:
I wrote a web app using an ASP front end (not .NET) connecting to a SQL Server 2000 (no SP) back end. Both the web server and the database server are Windows 2003 boxes. The app was running fine two weeks ago before I went on vacation. While I was gone my net admin applied Windows 2003 SP1 to the web server. Upon my return I was informed that the app is no longer working, getting the following error: Connection is busy with results...
0
1494
by: Jim Sneeringer | last post by:
I have a GridView that loads correctly from a SQL table using a TableAdapter and stored procedures. However, when I try to delete from the GridView, I get "Procedure or Function 'EventDelete' expects parameter '@Original_Comment', which was not supplied." Of course, the call to EventDelete was generated by Visual Studio, making it hard to debug. In fact, I nothing in the stack trace is my code. If I remove the parameter @OriginalComment...
0
1418
by: Scott Ribe | last post by:
I've got a problem which I think may be a bug in Postgres, but I wonder if I'm missing something. Two tables, A & B have foreign key relations to each other. A 3rd table C, inherits from A. A stored procedure updates a row in C, adds a row each in B & C. I get an integrity violation. All the foreign keys are deferrable, and the stored procedure is called from within a transaction with constraints deferred. (And the foreign keys do refer to...
5
2156
by: James Wong | last post by:
Hi, I am writing a vb.net2005 program that needs to create a stored procedure with SqlServerProject Template. Now, I have two questions for this stored procedure. 1) How can I import and execute the .dll in this Stored Procedures? 2) How can I connect the Web Service and get the result in this Stored Procedures?
6
7267
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem : evry day, i store the number of children in my classroom in my XML file. For exemple, on monday, my app ask me something like this : msgbox ("Are the 28 children here today ?",vbyesno)
12
2250
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my office. The original code's backend is using the SQL Server 2000 and I am testing to use it on the Express edition. And I run into the following problem.
4
5161
by: =?Utf-8?B?Unlhbg==?= | last post by:
1. How do i create a stored procedure in VB.Net and then execute it in VB.Net? 2. How do I modify a table property in VB.Net?
2
1590
by: Neil | last post by:
I'm using Access 2000 with a SQL 7 back end. I recently implemented some code in a form's AfterUpdate event which calls a stored procedure which copies the contents of the current record to a history table. The code works fine when the user edits and saves the record. However, if the user performs a Find and Replace, the code hangs. At first I thought the code was hanging because of multiple records being replaced. But when I debugged...
0
8801
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9174
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9074
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7953
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4464
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4725
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2110
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.