473,403 Members | 2,323 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,403 software developers and data experts.

execute "big" stored procedure - insert data in SQL Database

Eli
Hi all

We currently have a strange problem with calling a Stored Procedure
(SQL Database) in our C# Project. The only error I get is "System
error" which says a lot :)

Background:
We have several stored procedures to Insert and update datas in our
SQL database. Some stored procedures are smaller (insert datas in only
one table) and some of them are quite big (insert datas in several
tables with more than 7 parameters to execute). All of the stored
procedures run fine when we execute them in the query analyzer. But
some of them won't work in our C# GUI, which is very important to us!

So the actual execute of a stored procedure is not the problem -> When
we run a smaller stored procedure in our Project, which only inserts
data in one table and only has got 1 parameter, then it's no problem.
But once we want to run the big stored procedures with lots of
paramemters we get the "System error".
We already checked the datatypes of the parameters (sqldbtypes) in the
C# project -> They're fine. We checked the procedures manually ->
running fine.

What is the problem here? Has anybody got any experience on calling
procedures that update more than one table? Is there a problem we
can't see or we forgot about?

We're glad about any ideas!!

Thanks
Eli

PS: We call the procedures via a SQLCommand-Object where we say it's a
Stored procedure. The call itself should be fine.

PSPS: This project is our diploma PLEASE HEEEEEEEEELPP WE WANNA PASS
:)
Nov 16 '05 #1
2 3307
Perhaps you are experiencing timeouts?
How long do they take to execute?
Try increasing SqlCommand.CommandTimeOut parameter.
Also, you might show use the sp declarations (only the header) and the code
you use to invoke them.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

"Eli" <el*****@hotmail.com> wrote in message
news:d8*************************@posting.google.co m...
Hi all

We currently have a strange problem with calling a Stored Procedure
(SQL Database) in our C# Project. The only error I get is "System
error" which says a lot :)

Background:
We have several stored procedures to Insert and update datas in our
SQL database. Some stored procedures are smaller (insert datas in only
one table) and some of them are quite big (insert datas in several
tables with more than 7 parameters to execute). All of the stored
procedures run fine when we execute them in the query analyzer. But
some of them won't work in our C# GUI, which is very important to us!

So the actual execute of a stored procedure is not the problem -> When
we run a smaller stored procedure in our Project, which only inserts
data in one table and only has got 1 parameter, then it's no problem.
But once we want to run the big stored procedures with lots of
paramemters we get the "System error".
We already checked the datatypes of the parameters (sqldbtypes) in the
C# project -> They're fine. We checked the procedures manually ->
running fine.

What is the problem here? Has anybody got any experience on calling
procedures that update more than one table? Is there a problem we
can't see or we forgot about?

We're glad about any ideas!!

Thanks
Eli

PS: We call the procedures via a SQLCommand-Object where we say it's a
Stored procedure. The call itself should be fine.

PSPS: This project is our diploma PLEASE HEEEEEEEEELPP WE WANNA PASS
:)

Nov 16 '05 #2
I don't think the problem you're experiencing is related to the number of
parameters or tables you're stored procedure uses. As a reference, I
recently wrote some code that called a stored procedure that has 40+
parameters, inserts/updates a number of tables and returns an identity value
as an output parameter. This worked without any probems. From your post,
it looks like you're saying that you are setting the CommandType property on
the SqlCommand object but I could be reading that incorrectly. If you're
not doing that, make sure you specify the CommandType property as
CommnadType.StoredProcedure. If you don't do this and you add parameters to
the SqlCommand's Parameters collection, you'll get an error.

Cletus

"Eli" <el*****@hotmail.com> wrote in message
news:d8*************************@posting.google.co m...
Hi all

We currently have a strange problem with calling a Stored Procedure
(SQL Database) in our C# Project. The only error I get is "System
error" which says a lot :)

Background:
We have several stored procedures to Insert and update datas in our
SQL database. Some stored procedures are smaller (insert datas in only
one table) and some of them are quite big (insert datas in several
tables with more than 7 parameters to execute). All of the stored
procedures run fine when we execute them in the query analyzer. But
some of them won't work in our C# GUI, which is very important to us!

So the actual execute of a stored procedure is not the problem -> When
we run a smaller stored procedure in our Project, which only inserts
data in one table and only has got 1 parameter, then it's no problem.
But once we want to run the big stored procedures with lots of
paramemters we get the "System error".
We already checked the datatypes of the parameters (sqldbtypes) in the
C# project -> They're fine. We checked the procedures manually ->
running fine.

What is the problem here? Has anybody got any experience on calling
procedures that update more than one table? Is there a problem we
can't see or we forgot about?

We're glad about any ideas!!

Thanks
Eli

PS: We call the procedures via a SQLCommand-Object where we say it's a
Stored procedure. The call itself should be fine.

PSPS: This project is our diploma PLEASE HEEEEEEEEELPP WE WANNA PASS
:)

Nov 16 '05 #3

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

Similar topics

4
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
1
by: Dominic Marsat | last post by:
Hi, I'm calling a series of stored procedures from ASP in the format sqlString = "SPROC_1 @param=1 " Conn.Execute sqlString, , 129 sqlString = "SPROC_2 @param=2 " Conn.Execute sqlString, ,...
0
by: Richard \(MrBonus\) | last post by:
I have made a project using a UDP client in VB.NET but am experiencing problems with receiving datagrams beyond a certain size (between 1300 and 1500 bytes). I'm contacting a gaming server (Medal...
11
by: Ashli | last post by:
Hi all, How to find out if a processor is "little endian" or "big endian" by writing C code???
7
by: duli | last post by:
Hi: I would like recommendations for books (in any language, not necessarily C++, C, python) which have walkthroughs for developing a big software project ? So starting from inception, problem...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
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...

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.