473,837 Members | 1,459 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 2590
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
3071
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
10169
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
1500
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
2166
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
7278
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
2269
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
5165
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
1596
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
9842
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
10566
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
10623
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
10271
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5668
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
5848
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4040
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3124
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.