Click here to Skip to main content
15,893,564 members
Everything / Stored procedure

Stored procedure

stored-procedure

Great Reads

by Kuv Patel
Debug stored procedures in Visual Studio and SQL Server Management Studio.
by ASP.NET Community
ASP.NET Session state provides a place to store values that will persist across page requests.  Values stored in Session are stored on the server
by ASP.NET Community
ASP.NET offers a number of places to store state, both on the client and server. However, sometimes it's difficult to decide where you should put
by Paw Jershauge
An easy to use extendedproperty procedure (alternative to sp_dropextendedproperty, sp_addextendedproperty, sp_updateextendedproperty)

Latest Articles

by NightWizzard
Read and/or modify database objects like views, triggers, stored procedures and functions from .NET code.
by Paw Jershauge
An easy to use extendedproperty procedure (alternative to sp_dropextendedproperty, sp_addextendedproperty, sp_updateextendedproperty)
by koolprasad2003
This article will help you to know how to Debug your stored procedure
by Kuv Patel
Debug stored procedures in Visual Studio and SQL Server Management Studio.

All Articles

Sort by Title

Stored procedure 

7 Apr 2013 by Abbas mca
My stored procedure is as follows, -- Add the parameters for the stored procedure here @FromDate datetime, @ToDate datetime --Select query DECLARE @query nvarchar(max) set @query='SELECT [col1] FROM [Table1] ...
7 Apr 2013 by Maciej Los
Your query looks OK...Try this:set @query=N'SELECT [col1] FROM [Table1] WHERE ([col2] BETWEEN ''' + @FromDate + ''' AND ''' + @ToDate + ''')'Check the input parameters by printing its content to MS SQL Managment Studio - Messages window:PRINT...
7 Apr 2013 by Volodymyr Bobko
Hi, You can try this@FromDate datetime, @ToDate datetime --Select query DECLARE @query nvarchar(max) set @query='SELECT [col1] FROM [Table1] WHERE ([col2] BETWEEN '''+CONVERT(NVARCHAR, @FromDate,21)+''' AND'''+CONVERT(NVARCHAR, @ToDate,...
12 Apr 2022 by Will Sewell
I have some code in a SQL stored procedure which changes negative values in a column to zero -Sum(Bonus) As Bonus, Case WHEN -Sum(Bonus)
14 Apr 2022 by Maciej Los
Try this: SELECT SUM(COALESCE(BSE.MinWageEarning, BSE.TotalBeforeMinWage)) - SUM(BSE.TotalBeforeMinWage) AS Bonus FROM vBookingSessionEmployees AS BSE ... For further details, please see: COALESCE (Transact-SQL) - SQL Server | Microsoft...
2 Aug 2016 by super_user
I try this sql querySelect tblRV.ID as ID, tblRV.Owner, tblRV.Regno,(Select Count(*) as total from tblvv WHERE MID = tblRV.ID and Name '')as total,tblRV.MA, tblRV.MS from tblReg inner join tblRV On tblReg.RID = tblRV.RIDWHERE tblReg.StartDate >= '2016-06-01 00:00:00' AND ...
2 Aug 2016 by The Praveen Singh
In Sp you did not use where condition WHERE tblReg.StartDate >= @fromdate AND tblReg.EndDate
15 Aug 2012 by dhl_hh
I am trying to access columns dynamically, It works fine when i select two columns, but when i try to elect the third it gives an eror, the C# syntax is as follows,string connStr = "Server=localhost;Database=db_pentest;Uid=root;Pwd=#901770026V;"; bool found = false; ...
15 Aug 2012 by Wendelius
The likeliest reason is that the col parameter in your stored procedure is too small in length. So try increasing the length of that parameter in your procedure definition.
15 Aug 2012 by pradiprenushe
Check your @col data type. I think you have used less character in varchar(20).But you input is hvaing more than 20 chracter.'country,IPRStart,IPREnd' = 23 characterSo your input is get shrink so it is taking first 20 chracter. Try this varchar(max); or some big value like 100
15 Oct 2013 by Diya Ayesa
i try to add pending columnthere is two tables documnet and approval tablei show document in grid view but here i add one more column that is pending columnjust like thisdocid docname file documnettype deptype status1 abc abc.pdf pdf finance pendingi try to...
23 Oct 2014 by mikybrain1
Hi Everybody out there.Am trying to write this statement but itz kind of not working. Chill60 helped me out yesterday but now am tryiny to add a WHERE clause to but the EXCEPT is being underlined. I' ve tried all brackets but ain't getting it right. An idea?SET @Dynamictbl = N'SELECT...
23 Oct 2014 by Maciej Los
Try:SET @Dynamictbl = N'SELECT DISTINCT [Projektdefinition DB] AS Zugänge FROM ' + @Table_Name + ' WHERE [Geschäftsbereich] = ''PB''' + ' EXCEPT SELECT DISTINCT [Projektdefinition DB] AS Zugänge FROM ' + @Table_Name2 + ' WHERE [Geschäftsbereich] = ''PB'''or simple remove ['] before...
14 Nov 2014 by /\jmot
I have a Store procedure with 8 optional parametes, if the optinal parameter passes when calling the store procedure it'll add the condition to the Query according to the parameter value.This is My Store ProcedureALTER PROCEDURE [dbo].[Copy_Search_Candidate_forcampus]...
14 Nov 2014 by Manas Bhardwaj
You could do something like this:SELECT a.*, c.over_all_per MRes, d.over_all_per HRes, e.over_all_per DResFROM admissiON_table1 aJOIN Branch_Master b ON a.Branch_Id=b.Branch_Id LEFT OUTER JOIN admissiON_table2 c ON a.student_id=c.student_id AND c.exam='10th' LEFT OUTER...
14 Nov 2014 by DamithSL
try with wherea.Course_Id=@Course_id anda.Semester_Id=@Semester_id anda.Year_Id=@Year_id and(Criteria1 is null or c.over_all_per > @Marks1) and(Criteria2 is null or d.over_all_per > @Marks2) and(Criteria3 is null or d.over_all_per > @Marks3)
7 Nov 2013 by Diya Ayesa
hey Admin i.e john is linked to hr department when he signup then choose hr department and his data is store in uerss table and in this table there id is set as dep id =2 whihc is dep2then i want when he login through his login id and password then he only hr documents not other document...
7 Nov 2013 by Christian Graus
This is messy as hell. I can't follow what you're doing. Store an id in the session, the id of a user. Store in the DB what document types that user can see, basically a permission system. Make all the procs take that user id and filter based on those permissions.
30 Nov 2012 by Michal Kozel
Good day all,I encountered were strange problem during my work.When I call stored procedure from JScript (Jscript code is compiled by 3rd party desktop application that uses windows script 5.6) and give it data through parameters it ends up that data stored in database are different based...
10 Dec 2012 by Michal Kozel
in the end i was able to solve this problem.All was caused by ADO and its behavior when it encoded binary data from Local system language codepage to unicode.in this example it was on French system from codepage 1252 to unicode and on Czech from codepage 1250 to unicode.So I needed...
10 Jan 2012 by Huisheng Chen
monitor sql server processes and jobs, analyse performance, object version control, view executing sql query, kill process / job, object explorer, database shrink/log truncate/backup/detach/attach etc
26 Mar 2020 by ahmed_sa
i work on SQL server 2012 my problem is column alias on dynamic SQL query not working so how to solve problem issue on this line suppose column name is lifecycle this meaning @columndate will be lifecycleDate on print show that but after that...
26 Mar 2020 by Richard Deeming
Quote: SET @header = 'SELECT ''PartNumber'' As PartNumber, ''CompanyName'' As CompanyName, ''DocumentID'' As DocumentID, ''FlowStatus'' As FlowStatus, ''TeamName'' As TeamName, ''OnlineUrl'' As OnlineUrl, ''OfflineUrl'' As OfflineUrl, ''' +...
18 Jan 2016 by Member 12081616
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user codeAdditional information: Invalid object name sp_VehicleInfo.Code:protected void btnRegister_Click(object sender, EventArgs e){ VehicleInfo vehicle = new...
18 Jan 2016 by OriginalGriff
Look at the error message:"Invalid object name sp_VehicleInfo."That looks like the name of a stored procedure, not a table - so trying to UPDATE it will give you an error...Check your names!
18 Jan 2016 by koolprasad2003
There is something missing in code, try using passing parameter to stored procedure while calling it, try this : cmd.Parameters.AddWithValue
16 Feb 2017 by Member 13006667
public DataSet BindStates(string country) { StudentContext db = new StudentContext(); SqlConnection con = new SqlConnection(@"Data Source=DE-SHREE-02;Initial Catalog=Abhijeet;Integrated Security=True"); con.Open(); SqlCommand cmd =...
16 Feb 2017 by Garth J Lancaster
well, first off, the exception actually says there's something wrong with your sql - do you have a column 'Id' for example - what happens if you remove the 'order by...' clause ?secondly, thats a horrible way to write SQL statements - you should use parameterised queries, along the lines of...
16 Feb 2017 by avinashkumar0509
string should be like this '"+stringname+"' inside your query string.public DataSet BindStates(string country) { StudentContext db = new StudentContext(); SqlConnection con = new SqlConnection(@"Data Source=DE-SHREE-02;Initial Catalog=Abhijeet;Integrated...
25 Aug 2015 by Member 11559509
Hi,I get an error like this :An exception of type 'System.InvalidCastException' occurred in System.Data.dll but was not handled in user codeAdditional information: Specified cast is not valid.this is my table structure: Member table having columns: ...
24 Aug 2015 by Member 11559509
Hi,I Get a Error Like this :An exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user codeAdditional information: Sequence contains more than one elementi want to get team member details based on teamidthis is my tables...
24 Aug 2015 by OriginalGriff
SingleOrDefault returns an exception if the sequence contains two or more elements - the documentation makes that very clear: https://msdn.microsoft.com/en-us/library/vstudio/bb342451(v=vs.100).aspx[^]Which means that your TeamMember table contains at least two TeamID values which match the...
2 Jun 2011 by Dr. Song Li
I searched over .... I see many advantages, but it seems that all the advantages comes from a comparison over in-line SQL. I know in-line SQL is bad. But why compare with a bad one to show the other better?If stored procedures are used (possibly exclusively), it seems none of the advantages...
5 Jun 2011 by Sander Rossel
I have been using the Entity Framework for a while now. A few advantages for me are automatic Class creation from the DB metadata and using LINQ. Also, using an ORM tool does not mean you cannot use Stored Procedures. I do not think one method is better than the other. It depends on requirements...
5 Jun 2011 by #realJSOP
One advantage is that you learn how to not expect a 3rd-party library to be a magic bullet, and that no matter what you select, there will be issues to overcome.
25 Apr 2012 by tnu0726
Hi guys,I want to know if there is a way to insert the XML generated from dataTable(dataTable.GetXML()) into the oracle?Thanks in advance,
25 Apr 2012 by Praveen Meghwal
To achieve this you will have to use XMLSequence function available in oracle.Suppose your XML is as follows: BobSmith30 SueJones34 ...
31 Mar 2015 by axeemg
protected void Button1_Click(object sender, EventArgs e) { con.Open(); SqlCommand cmd = new SqlCommand("sp_RptRouteWiseNetSaleDetails", con); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt...
8 Oct 2012 by ishandeb
hello every one.. i need to create a login page in which after login it will check for user previledge and if the user is normal user it will show a menu strip with 5 menu item or if the user is admin it will show the menu with 6 menu items on it.please help me with this ... thanx in...
8 Oct 2012 by vivektiwari97701
Binding Sitemaps with Menu Control Based on User Privilege at Runtime[^]http://forums.asp.net/t/1644440.aspx[^]
8 Oct 2012 by Mohd. Mukhtar
Hi,You can implement this senario as below.1. Create 2 different control(one with 5 menu item and the other with 6menu item) for normal and admin user. Add control dynamically after checking the access level of the user.2. Add menu item into master page and Show and hide extra menu...
27 Feb 2013 by ythisbug
hii created one query to get total amount from different tablehere is my query@Name varchar(50)AS BEGIN SET NOCOUNT ON;Select tblAssetUnits.untCharges,tblAssetUnits.untFlat,tblCharge.cValue,tblCharge.cGheID,tblCharge.cID,tblGeneralHeader.gheChargeName,(select sum(cValue)from...
11 Oct 2013 by ASP.NET Community
ASP.NET is a great platform to develop any web applications. From ASP.NET 1.1 we are having one feature called View State which store the data in
9 Jun 2016 by Sibeesh Passion
Good day to you. I am returning a result as preceding from SQL stored procedure.Image[^]Now I am binding the data as follows.List resList = null;resList = pe.Database.SqlQuery(sqlQuery, param).ToList();Following is my model.public partial class EventPhotos...
24 Nov 2015 by bjay tiamsic
Hi.I wonder if there is a remedy in sending out an email , if the record is blank. Then the email that is being sent is also blank. Seems like it does not complete the html code when a record is NULLDECLARE @EmployeeName nvarchar(150), @htmlBody nvarchar(max)=N'',@htmlheader...
24 Nov 2015 by Dave Kreskowiak
That depends on your code. Since you don't show any it's impossible to tell you what you're doing wrong.Besides, why that hell would you send a blank email?
17 Nov 2017 by Member 13011316
In the below HTML Markup I have a simple ASP.Net GridView with 3 columns. First column containing the CheckBox, second column containing a Label for display ID and Access Path of the folder respectively and the third column containing a Label and DropDownList for display and edit status of the...
8 Apr 2013 by Mic
Is there any extension in C# for SQLLite to support stored procedure?
8 Apr 2013 by Maciej Los
SQLite does not support stored procedures. See this: Appropriate Uses For SQLite[^], but this: Adding Stored Procedures to SQLite[^] looks very interesting ;)[EDIT #1]Wow, Mehdi Gholam has answered it before ;)Sqlite- stored procedures/functions?[^][EDIT #2]New SQLite SQL...
15 Feb 2013 by Member 8497287
I have these codes but they don't seem to insert the values[DataObjectMethod(DataObjectMethodType.Insert)] public static void InsertClass(string name, string code) { String strConnString =...
15 Feb 2013 by Chris Reynolds (UK)
Posted as a solution so we can close this down:It looks like the OP was passing null values into his function and needs to check for this as Fred says before attempting to insert into SQL.
15 Apr 2016 by Kedarnath M S
How can I convert the bellow code to SQL Query(Stored Procedure) ?string[] strORCarriers = IW.GetORCarriers();if (strORCarriers.Length != 0) { for (int i = 0; i
15 Apr 2016 by Richard Deeming
If you want to concatenate string values from multiple rows in SQL, use one of the methods described in this artice:Concatenating Row Values in Transact-SQL[^]For example:SELECT p1.CategoryId, STUFF( ( SELECT ',' + ProductName FROM...
19 Jul 2016 by KyLim0211
i have a list -> 1:A,2:A,4:A,7:A,3:C,5:C,6:C,8:C,9:C,10:B,i want to insert them into my database.below is my database structuremy tablemy database after i insert the list into my databasemy expecting output10:B -> Q_10 data insert = B ,1:A -> Q_1 data insert = A......What I...
19 Jul 2016 by Tiwari Avinash
Hey! Suvendu is right please refer some articles on How to. Here are some for you will might help you.insert-all-data-of-a-list-into-database-table-at-once[^]Inserting Value of Collection into Database[^]
19 Jul 2016 by Bikesh Srivastav
Hi, Follow this link "How to insert update delete in database using c# and sql"Insert, Update and Delete Records in a C# DataGridView[^]
31 Jul 2018 by EAdevi
I have a table Laptops and with stored procedure I want calculate running total using INSERT AND UPDATE. I'm trying to calculate running total on the following way. ALTER PROCEDURE [dbo].[spInsert_Inventory] ( @Brand Varchar(50), @Series Varchar(50), @Model Varchar(50), @Ram...
31 Jul 2018 by Gerry Schmitz
You need a "date and time" on your "transactions". You can then run a query for "totals to date" using a sort and a cutoff date. (Your "ID" and update logic is flawed since you appear to have "duplicate" records).
6 Feb 2015 by Member 11434122
DLL has the same code as the script task(sending message to MSMQ)Stored Procedure Syntax:create PROCEDURE [dbo].[prcSendMSMQMessage] @msmqPath varchar(255), @messageBody varchar(1000)ASDECLARE @msmqQueue INTDECLARE @result INT-- Create the SQLMSMQ Object.EXECUTE...
26 May 2015 by willington.d
Refer to the below link:https://msdn.microsoft.com/en-us/library/ms164653.aspx[^]
16 Feb 2015 by RAHUL(10217975)
Hello ,I am working on Asp.net website and SQL DB, For Security reasons we are keeping different database for each customer. Now problem is DB objects like Stored Procedures, Views is replicated for each database. If I want to alter any SP ,views or table then I have to do it in all DB's....
16 Feb 2015 by Lolo1986
From my understanding you are in SAAS environment. Where I am working right now with have 70+ databases with the same schema, sp, tables... So what you should do is having one common project (cleintProject) and deploy your project against the different clients. So you will maintain only one...
25 Feb 2015 by deepakdynamite
I had same kind of scenario.. But After doing this manually for 3-4 times, I developed an small win form application which will fetch list of databases from one centralized database and will execute scripts on each table... **Note: I created that application for my purpose.. I never gave it to...
25 Feb 2015 by Joan Magnet
I use ApexSql Diff to do this job.It' really useful, maintain one and replicate to all.ApexSql Diff
25 Jul 2016 by super_user
I try to call storerprocedure in LINQ but this show errorWhat I have tried:[WebMethod] public static string search_data(DateTime fromdate, DateTime todate, string region) { try { string result = ""; Ts1 ts = new Ts1(); List dq =...
24 Jul 2016 by F-ES Sitecore
This is one of the reasons you should avoid using "var" until you're more experienced with .net. EF thinks your SP is what is known as a scalar procedure, ie it only returns a single value, not a result set\table. So the return value is int so your dq variable is int, and you can only loop on...
24 Jul 2016 by Vignesh Mani
ScottGu's Blog - LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures)[^]
25 Jan 2015 by Member 10850554
I have problem n entity frame work . I do not Know how use stored procdure in entity frame work . for example this code private FidilioEntities _db; public string GetGoldenMember() { var res =...
25 Jan 2015 by Wendelius
Based on the error message it could be that _db is null. Using the debugger, ensure that you have initialized _db properly. That the connection really exists.
22 Nov 2012 by Fabio Ottavi
I have a strange problem calling a stored procedure from c# code.This is the scenario:I have a DB browser application with which I run different kinds of queries on a SQL Server DB (eg. Select, Update, execute stored procedure...)So in my app I have an edit window where i write the...
22 Nov 2012 by hitesh_tech
Try Changing followings as shown belowcommand.CommandType = CommandType.StoredProcedure;command.CommandText = 'test @a=' + textBoxQuery.Text;
22 Nov 2012 by mhd.sbt
hi there you can do this :sqlcommand.commantype=commandtype.storeProcedure;sqlcommand.parameter(new sqlparamete("your storeprocedure parameter"));dqldatareader dr=sqlcommand.executeDataReader();your solution will be same this.
22 Nov 2012 by pradiprenushe
You are doing recursion which is not going to stop anywhere. When you give 1 as input to sp it is continuously called till error comes. SoYou should change you logic.Why you are using recursion?
22 Nov 2012 by Anele Ngqandu
Hi using (SqlConnection conn = new SqlConnection(ConnString)) { SqlCommand cmd = new SqlCommand("procGetAllEmployeesNoXeception", conn); cmd.CommandType = CommandType.StoredProcedure; DataTable dTable = new DataTable("dTable"); ...
10 Jan 2019 by Reynald Aceberos
Hi guys i got a problem and i dont know here is my code... im just trying to call a procedure and insert it in temp table, Note: # when im i call the stored procedure without inserting it there is no problem but when i add the "insert into #TempTable22" the error will now promt. im...
10 Jan 2019 by Wendelius
Based on the error message, the problem seems to be inside procedure Sp_AutoJV_SalesSummary_GetChargeDetailsNoDGV2_ForTest so I would start looking from there. Te get you you started, you have 2 lines pointed out in the error message. So inside that procedure have a look at lines - Line 46,...
31 Jul 2014 by M-osab
Can I display data from a database using stored procedure ?can any one help me ?
31 Jul 2014 by PIEBALDconsult
You can have a query (SELECT statement) (or more than one) in a stored procedure, but you still need something else to do the displaying.
7 Dec 2012 by Member 9542426
I'm trying to work on asp.net application with odp as the provider. I'm unable to make a simple store proc with 1 in and 1 out parameter work. However i change the data type, i'm getting the same pl/sql exception as numeric or type error. My database person has tested the stored proc with an...
23 Aug 2020 by ahmed_sa
I work on SQL server 2012 I face issue I can't update status with No data returned where no result returned from select statement cross apply function meaning where no data returned when join parts and company to function then update status to...
22 Dec 2015 by Laviee
I have Created a Portal in which when user enter some ID.then many columns associated for that ID shows up. Now i want that if user enter some specific IDs then values of some columns(NASSETS,Depreciation key)associated with That IDs should be fixed.I want Nasset to be blank for some Asset...
22 Dec 2015 by CHill60
It's not entirely clear what you mean but I'm fairly sure you want the CASE (Transact-SQL)[^] statement.For example, using some test data generated by -- Some test dataCreate Table Table1( id int identity(1,1), someTextData AS 'Data' + Cast(id as varchar), someDateData AS...
11 Sep 2016 by Member 11967308
ALTER procedure [dbo].[spDepartmentWorkingSelectAll]asset nocount ondeclare @SAM floatdeclare @factor_error floatselect [id], [date_working], [department_id], (select top 1 departments.name from departments where departments.id = department_id) as department_name, ...
11 Sep 2016 by manu_dhobale
Please through this exampleCalling a Function From a Stored Procedure in SQL Server[^]Also remove repetitive columns
9 Feb 2012 by nweiher
I have the following code in C# ...SqlConnection thisConnection = new SqlConnection(@"Network Library=DBMSSOCN;Data Source=AZ;database=FMS;User id=fms;Password=password;");SqlCommand thisCommand = new SqlCommand("D:\\SP\\GetReport.SQL", thisConnection);thisCommand.CommandType =...
9 Feb 2012 by Christian Graus
That's not how it works. You thnk SQL Server reads stored procs from your file system ? The stored proc needs to be in the database, then you specify GetReport, or whatever the proc is called, without the other stuff you are using now.
8 Sep 2020 by ahmed_sa
I work on SQL server 2012 I face issue : I can't update status to match characters where signature key have stars * . I need to update status to match characters where signature key have starts as example Signature Key Group Id ...
8 Sep 2020 by CHill60
I've timed out on this so I will post the technique I'm applying and what I have so far. Hopefully I'll be able to get back to you. For any of your PortionKey I was generating (via a table valued function) a list of the possible matches. For...
30 Apr 2012 by pratip_gd
i want to generate an ondemand SubReport against each row of a particular field in the MainReport i.e. clicking each ondemand SubReport link will generate a corresponding row of data in the same form(but new report document) The data for the MainReport n SubReport are called via...
31 Oct 2013 by thatraja
Invalid logon details. Apply valid logon details dynamically at run time.C# Crystal Reports Dynamic Logon parameters[^]Also make sure you have applied logon details for subreportsAdding the Subreport Logon Code[^]
23 Aug 2017 by prapti.n3
Here is My SQL CODE ALTER PROCEDURE [dbo].[uspVM_Visits]( @Mode INT = 0 ,@VisitID INT = 0 --,@VisitNo INT = 0 ,@LocationID INT = 0 --,@VisitType INT = 0 ,@TotalVisitors INT = 0 ,@VisitDate DATETIME =...
23 Aug 2017 by Thomas Daniels
Your XML is wrapped in { and }. They should be the cause of the error, because the rest of the text is valid XML.
6 Feb 2012 by GiovanniGH
Hi, I need help!!!I developed a program in VB 2005 which opens an Excel file using Interop, and I call it from an SQL Stored Procedure using xp_cmdshell. Everything works fine when I am working under Windows 2003 Server. The problem is when I try to call my program the same way, but under...
6 Feb 2012 by NikulDarji
if u used Object lib 11.0 then change it and use "Microsoft Excel 12.0 Object Library" in your Project it may solve your problem....:)
11 Jul 2012 by Chasfer
You can see this research: Summarize C# Control Excel Skills[^]
18 Jul 2016 by Aelion
HelloI searched through this site and found some topic about my problem but still cannot make this work....I am simply trying to retrieve data from SQL Database using a stored procedure.I am passing one parameter that is a SqlDbType.Varchar(50) type, but get back an SQL error:Procedure...
14 Dec 2012 by André Kraak
From this sample C# SqlParameter[^] it looks like you should use SqlParameter parametrNazwisko = new SqlParameter("Nazwisko", SqlDbType.VarChar, 50); in stead off SqlParameter parametrNazwisko = new SqlParameter("@Nazwisko", SqlDbType.VarChar, 50);So remove the '@' from the parameter name.
14 Dec 2012 by Aelion
I found problem solution!I should pass whole command parameter like this SqlDataAdapter ad = new SqlDataAdapter(com);not just com.CommandText ... it was stupid.... but I lost so much time...