Click here to Skip to main content
15,893,644 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 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 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 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 Updated

Stored procedure 

U 5 May 2024 by Wendelius
If update isn't an option, you can always use nested calls to the replace function when selecting, for example select replace( replace( replace('this% contains ! illegal/ chars', '!',''), '%',''), ...
N 4 May 2024 by Member 9553610
This is my sample data in a column this is ! Alex23 & and % doing/ *SQL2019 i want this output from above this is Alex23 and doing SQL2019 we are not allowed to use stored procedure and function in organization. so looking for a solution...
11 Feb 2024 by M Imran Ansari
As per the the error message and create procedure statement, it appears that the table type does not exist. You might need to generate a user-defined table type for tblURLabelHeader. /* Create a table type. */ CREATE TYPE tblURLabelHeader AS...
11 Feb 2024 by Member 4189717
I attached a DB in to SQL Server 2022 version and added a new table URLabelHeader. While adding a new stored procedure I am getting the following error. CREATE PROCEDURE [dbo].[spSaveURLprocess] ( @tblURLlabelHeader...
10 Jul 2023 by A Belal
paid and remain Amount always saved null in database although i get value is not null by javascript What I have tried: my storedProcedure USE [OnlineMarket] GO /****** Object: StoredProcedure [dbo].[InsertintoSalesInvoice] Script Date:...
10 Jul 2023 by Graeme_Grant
This is your 5th question posted. At least put some effort in and learn to format your code so we can at least read it. I have done that for you. If you want help, and for us to read your code, take pride in what you post, it will show. Click on...
7 Jul 2023 by OriginalGriff
SqlCommand cmd = new SqlCommand($"InsertintoSalesInvoice {InvoiceNum},{ItemId},{qty},{SalePrice},{discount},{AmountAfterDiscount},{Paid},{Remain},{Total},{PaidDate},{CustomerId} ", cn); That's not a valid SQL command, or even close. INSERT INTO...
7 Jul 2023 by A Belal
I want to create invoice Error Is An unhandled exception occurred while processing the request. SqlException: Incorrect syntax near '/'. Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action...
11 May 2023 by Member 12926744
Hi All , I am trying to use a cursor and its showing error The variable does not currently have a cursor allocated to it even though its allocated . Any help will be really appreciated . Thanks in advance . What I have tried: DECLARE...
11 May 2023 by Richard Deeming
Your syntax is incorrect: DECLARE CURSOR (Transact-SQL) - SQL Server | Microsoft Learn[^] DECLARE Enumerator1 CURSOR FAST_FORWARD FOR WITH dates_CTE1 (date) As ( SELECT @Firstday1 UNION ALL SELECT DateAdd(day, 1, date) FROM...
28 Apr 2023 by Ravi Sargam
I have a sp where i need to pass a parameter which is using IN Clause below query is working fine select name from tbl where Id='001' and locationId IN (1,2,3)) but this query is giving error Declare @var NVARCHAR(100) = '1,2,3'; Declare @whereClause NVARCHAR(100); SET @whereClause =...
28 Apr 2023 by Pavan Muppalla
This is awesome answer. SELECT value FROM STRING_SPLIT(@LocationIDs, ',') I have been searching a lot and this was the best solution I got. Thanks a lot
27 Apr 2023 by Maideen Abdul Kader
hi I have an error when insert data into mssql table using asp.net error is 'Conversion failed when converting date and/or time from character string. The data for table-valued parameter "@MODetails_TYPE" doesn't conform to the table type...
27 Apr 2023 by Mike-MadBadger
In the table type the docdate column is defined as a datetime data type - [DocDate] [DateTime] NULL - and then in the DataTable definition, the docdate column is defined as a string data type - MoDetails.Columns.Add("docdate", GetType(String)). ...
27 Apr 2023 by Richard MacCutchan
You have defined DocDate, PubDate and CreateOn as DateTime types, so you must pass them DateTime values, not strings. So use the DateTime.TryParse Method (System) | Microsoft Learn[^] to get the correct value types.
26 Mar 2023 by Mary_Bhatta
I have a simple table with user details with following columns: USERID INT FIRST_NAME VARCHAR(50) LAST_NAME VARCHAR(50) EMAIL VARCHAR(100) COUNTRY VARCHAR(50) USERNAME VARCHAR(50) PASSWORD VARCHAR(50) This is the SP that I have: ALTER...
26 Mar 2023 by OriginalGriff
Match your column names to those actually returned. Your SELECT returns columns called "Id", "NAME", and "email", and your C# code is expecting "USERID" and "EMAIL". But don't do it like that. Never store passwords in clear text - it is a major...
17 Mar 2023 by OriginalGriff
Your view query uses two INNER JOINs - which only return rows with matching data in both tables. So the most likely thing is that the JOINs are causing the reduced data because some of the ON conditions aren't matching in both tables. for some...
17 Mar 2023 by A Belal
i create table orderSales, typeCustomer, Customer i create view SELECT [id] ,[OrderDate] ,[Total] ,[Pay] ,[Remain] ,[Sales] ,[ValueAdd] ,[CustomerType] ,[Name] FROM [dbo].[vOrdersAll] GO but...
27 Feb 2023 by Mike Dickerson
I've found that a "Select blah, blah, blah,* from #TempTable" for the final select of a stored procedure, and returning the recordset causes the recordset to be empty when it gets back to VB6. The procedure works 100% and returns exactly the...
27 Feb 2023 by RayR2
I have made a stored procedure to build a temporary table and then return the end results.When i test it in SSMS it returns a single recordset and works ok, when i do it in VB the recordset will not open after passing everything but no errors are returned in either VB or ADODB.Stored...
23 Feb 2023 by Member 15933443
There should have been some trailing or leading junk data or space.please make sure whether data is in accordance to the requirement
23 Feb 2023 by Member 11579819
My sub query returns a single value and that value consists of multiple value which are separated by comma.My sub query is like this:- select ApplGLCd from ebreportstructurehowhere grpname = 'Appendix' and it's output is this:-0034,0035,0064,0026,0030,0031,0056When I use the sub query...
18 Feb 2023 by ahmed_sa
I working on SQL server 2012 I face issue i can't display Print Server with vBranchDesc by using only one select statement instead of two select statement . i convert values separated comma to rows Id on first select statement . then on second...
28 Jan 2023 by ahmed_sa
I work on sql server 2017 i have date field name datelogged with datatype datetime2(7) my table structure as below CREATE TABLE [dbo].[print_report]( [ID] [int] NOT NULL, [datelogged] [datetime2](7) NULL, CONSTRAINT [PK_print_report]...
28 Jan 2023 by Wendelius
Sounds like the formatting is off at Excel side. Have a look at Format a date the way you want - Microsoft Support[^]
28 Jan 2023 by Member 14921707
Hey guys i am working on some project and fetch data from sql database and fill in to Datatable, it work fine, but their is performance issue! how can boost and any suggestion regarding to the performance! thanks! What I have tried: using...
28 Jan 2023 by Member 15907221
Use that one using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { DataTable dt = new DataTable(); cmd.CommandTimeout = 3600; da.Fill(dt); }
25 Jan 2023 by Deepak Kanswal Sharma
Hello All,I'm Trying to upload Image with other details along with other details , but it gives me this error :-String[4]: the Size property has an invalid size of 0.Stored Procedure is:-ALTER proc [dbo].[spInsertPageDetail]@Heading varchar(100),@Body varchar(2000),@Img...
29 Nov 2022 by Member 8605019
I'm new to javascript so please ignore bad programming convention. I am trying to insert some records in tableA(say) and using insert into (select statement) methodology. This insertion is supposed to happen when an if condition returns TRUE...
15 Nov 2022 by DevNoob
I have an C# asp page, which has an upload button to upload xml file: Then I can choose the xml and display in grid view, which is working fine, and whenever I upload a file which has been already uploaded, it rejects the xml file with duplicate...
15 Nov 2022 by CHill60
Firstly, your delete statement will not work Error: The multi-part identifier "xc.a" could not be bound.Your alias should be either xc for the table or xt. for the columns. E.G. delete #XMLTable from #XMLTable xc inner join main_table mt on...
10 Nov 2022 by DevNoob
I have an C# asp page, which has an upload button to upload xml file: Then I can choose the xml and display in grid view, which is working fine, and whenever I upload a file which has been already uploaded, it rejects the xml file with duplicate...
9 Nov 2022 by Houman Farokhi
I wrote a stored procedure in SQL Server 2019 which takes the table name and a value as parameters, and inserts that value into the defined table. But when I try to run it, I get this error: Msg 137, Level 15, State 1, Line 3 Must declare the...
9 Nov 2022 by Richard Deeming
Your Exec statements execute in a separate context. None of the local variables declared in the procedure will be available to those statements. You need to use sp_executesql[^] and use the local variable as an OUTPUT parameter: declare @Count...
9 Nov 2022 by OriginalGriff
At a guess - and without any access to your DB or the code that calls the SP that is all it can ever be - there are no rows that match your item string. You need to use a combination of the debugger (to find out exactly what you are passing) and...
6 Nov 2022 by Cruz Vince
Here is the answer for (int i = 0; i
6 Nov 2022 by Cruz Vince
I have a column named Status inside a datagridview, now every row has a status of 1, i want to update them to 2. Here is the code i use private void btnCommit_Click(object sender, EventArgs e) { using (DataClasses2DataContext db = new...
17 Oct 2022 by Reden Rodriguez
i created a simple log in application where if i entered a correct data it will give me the data i want, else if i enter a data that has no record my stored procedure will execute an RAISERROR my problem is i don't know how to catch it properly. here's my code DAL folder public...
17 Oct 2022 by Member 4759547
IN your SQL code change RAISERROR to: ; THROW 50000, , 16 ; Notes on SQL code: 1. if you are not useing semicolons after your statements, THROWS needs one in front of it, else an error. 2. If you want to rollback entire...
7 Oct 2022 by ahmed_sa
I work on sql server 2019 i face issue on slow running when I have 100000 part on table PartsHaveBestDisplayOrder and all these parts have same package and same coderulesid and Different display order so it take too much time so are there are...
10 Sep 2022 by ahmed_sa
I work on sql server 2019 i face issue i can't reduce high cost of sort it reach to 86 percent so How to reduce it please additionally it take too much time to execute it . it take 6:06 minutes execution plan as below : Paste The Plan -...
7 Sep 2022 by MK_VEEE
This is the output from SQL Stored Procedure. employeeID ,Sum(Leave) EID00 , 13 EID01 , 14 EID02 , 9 Below is the form that I want to create. So I want to put the value in the second column from SQL procedure into the textbox...
7 Sep 2022 by Patrice T
Quote: How to write C# code to retrieve value from SQL procedure and put it in text box in win form? Advice : Stop combining little problems into super big problems. Variables are the glue between parts of a program, so you have : - Retrieve...
7 Sep 2022 by Maciej Los
Use: SqlCommand.ExecuteScalar Method (System.Data.SqlClient) | Microsoft Docs[^] Then: cmd.CommandText = "SELECT ... FROM ... WHERE EmployeeId = @EmpId;"; int count = (int)cmd.ExecuteScalar(); TextBoxEmp01.Text = count.ToString();
5 Sep 2022 by OriginalGriff
Have you tried:MyTextBox.Text = resultFromSQL.ToString();
24 Jul 2022 by ahmed_sa
I work on sql server 2019 i face issue i need to give unique number to every group of numbers without using string aggreagte or stuff original table as below : create table #parts ( PartNumber varchar(50), PartValue int, ...
24 Jul 2022 by Maciej Los
Try this: SELECT T.PartNumber, T.PartValue,T.CNT, DENSE_RANK() OVER(ORDER BY T.CNT) AS UniqgNo FROM ( SELECT *, COUNT(*) OVER(PARTITION BY PartNumber) AS CNT FROM PP ) AS T SQL Server 2019 | dbfiddle[^] Note: Replace [*] with column...
21 Jul 2022 by ahmed_sa
I work on sql server 2019 i can't get count and values separated stick by using string aggregate function order not important when arrange count and values sticks separated . my issue is can't merge count per value with msl value it formate as...
21 Jul 2022 by Maciej Los
You need to concat count of parts with description. See: CREATE TABLE DUMMY ( CID INT, SID VARCHAR(1), CNT INT ); INSERT INTO DUMMY(CID, SID, CNT) VALUES(1, 'A', 2), (1, 'B', 1), (1, 'C', 3); SELECT CID, STRING_AGG(CONCAT(SID, '(',...
18 Jul 2022 by Shivam Chinna 2022
My requirement is very simple: I need to print out a monthly bank statement from a table using a stored procedure. Everything seems fine, the problem is my requirement requires me to do a running total i.e., both addition and subtraction based...
18 Jul 2022 by CHill60
If this was me I would do something like this ... this is my test data declare @TransactionMaster table (DOT date, TXN_TYPE varchar(3), CHQ_NO int null, TXN_AMOUNT bigint) insert into @TransactionMaster (DOT, TXN_TYPE, CHQ_NO, TXN_AMOUNT) values...
14 Jul 2022 by ahmed_sa
I work on sql server 2019 i have issue errors when execute statment below stuff but i don't know how to solve issue error i get and i need to solve it Msg 1033, Level 15, State 1, Line 6 The ORDER BY clause is invalid in views, inline...
14 Jul 2022 by CHill60
Use the Reply link when responding to comments so that the poster is notified. Error 1: You cannot have ORDER BY in your sub-queries - the language does not allow it except in the specific circumstances listed in the error message. Options a)...
8 Jul 2022 by ahmedbelal
i want to update Customer Information insert work very good but when i use Edit function , i must upload image again or Error Messege empty path name is not legal and Compiler tell me that Error Here ...
8 Jul 2022 by OriginalGriff
First off, why are you passing the UserID / CunstomerID by string concatenation when all your other info is passed as a parameter? You must know that that is very dangerous, or you wouldn't have used parmateres for all the other values you are...
3 Jul 2022 by Hamza M. S. Abazeed
Good afternoon, I'm trying to complete a small project using SQL Server, but I'm having some troubles ;/ I'm trying to Serch in SQL Server table, where I have a statement (one word or many words) I have a table two tables: - Products (P_ID...
3 Jul 2022 by Dave Kreskowiak
You cannot use a LOOP expression in a WHERE clause. The WHERE clause expects to see only conditional expressions. You can build the SQL statement in a variable, use the LOOP clause to build up a WHERE clause with multiple OR expressions, then...
28 Jun 2022 by ahmed_sa
I work on sql server 2019 i face issue can't solve it i need to display chemicalid that have different on chemicalmass and chemicalmassmodified but if there are difference 0.01 then not display it as different i will consider it equal so if...
28 Jun 2022 by CHill60
Substract one from the other and compare the absolute difference to 0.01 See SQL Server ABS() Function[^] You may get anomalies from using float - see SQL: Newbie Mistake #1: Using float instead of decimal - The Bit Bucket[^]
21 Jun 2022 by Richard Deeming
The code in solution 1 is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query. In the case of dynamic SQL within a stored procedure, that means using...
21 Jun 2022 by Thirumadhi T Johnson
Error type is System.Data.Sqlclient.SqlException - {"Must declare the scalar variable \"@POL_NBR\"."} I am have one column name with POL_NBR in gridview in Winform and I am trying to debug while updating few columns value meanwhile this error is...
21 Jun 2022 by #realJSOP
Your query is malformed... SET @sql_Query = 'Update TPCA set ' IF ISNULL(@POL_NBR, '') '' BEGIN SET @sql_Query = @sql_Query + 'TPCA.POL_NBR=''' + @POL_NBR + ''' END
29 May 2022 by ahmedbelal
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. when add new customer i want to make pictureBox accepted Null Error Here byte[] img; MemoryStream ms1; ms1 = new...
29 May 2022 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a...
18 May 2022 by ahmed_sa
I work on sql server 2019 i run queries to get current long queries run but i get error so how to solve error below Msg 535, Level 16, State 0, Line 52 The datediff function resulted in an overflow. The number of dateparts separating two...
18 May 2022 by OriginalGriff
Read the error message: it's pretty explicit. You are using DATEDIFF with "ms" - or millisecond - difference. So for each second that two timestamps are different, the value will add 1000. Since there are 60 seconds in a minute, 60 minutes in an...
17 May 2022 by Richard Deeming
The length of a hash does not depend on the length of the input to that hash. For SHA256, the output will always be 32 bytes. For SHA512, the output will always be 64 bytes. You should declare your column as varbinary, not nvarchar. Storing the...
17 May 2022 by ahmed_sa
I work on sql server 2019 i have table have multi column string concatenation as StrSubstance,strmass ,strcasnumber i need to create filed hashchemical with nvarchar(700) and this will store hash for 3 columns concatenation with each other are...
16 May 2022 by ahmed_sa
I work on sql server 2017 i need update chemical id on table chemicalhash based on 3 columns compare to table fmd chemical compare 3 columns strSubstances,strMass,strCASNumber from table chemicalhash with 3 columns...
16 May 2022 by CHill60
This is incredibly similar to your later question at Why execution plan high cost on clustered index scan and how to mimize cost of clustered index scan ?[^] The solution I have posted there should apply to this as well. Instead of posting...
16 May 2022 by ahmed_sa
I work on sql server 2019 i have clustered index scan 98 percent how to minimize it please i have execution plean have high cost on clustered index scan as https://www.brentozar.com/pastetheplan/?id=HkpoQtlwq table i have issue on it What I...
16 May 2022 by CHill60
This is your querymerge #tmpParts h using Parts.FMDMaster f on h.strsubstances=f.StrSubstance and h.strmass=f.strmass and h.strcasnumber=f.strcasnumber AND h.strHomogeneousMaterialName=f.strHomogeneousMaterialName AND...
10 May 2022 by ahmed_sa
I work on sql server 2017 i need to validate user input of temp table if formate of created date not YYYY-MM-DD then reject by update status field of temp table to be Notvalid and if formate of created date is YYYY-MM-DD then update status by...
10 May 2022 by OriginalGriff
Dave is right: Always store data in appropriate datatypes - and that means that only string based data gets stored in VARCHAR or NVARCHAR columns. If you don't do that the you get two problems: 1) Sort order doesn't work, which means that...
10 May 2022 by Dave Kreskowiak
Your problem isn't necessarily the validation. It's the fact that you're storing dates as a string in the database. That's NEVER a good idea.
3 May 2022 by Will Sewell
I'm trying to create an SP that backups a database however whenever I execute it the folder i'm trying to backup to remains empty. Here is my SP: USE [HarvestMan_SoutheskFarm_03_05_22] GO /****** Object: StoredProcedure [dbo].[BackupDatabases] ...
3 May 2022 by OriginalGriff
Probably, it's the path. SQL runs as an engine that you communicate with - and that engine does not run under your user, it has its own user and its own permissions. So SQL can't access your files - "Users\will.sewell" is not accessible to the...
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...
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)
10 Apr 2022 by ahmedbelal
i design desktop application for Customer i coding Edit Form Class Customer_Operation has my Functions My Error is Unable to cast object of type 'System.Int32' to type 'System.Byte[]'. i clicked f10 to debug my Application My Error Here || || ||...
10 Apr 2022 by Richard MacCutchan
As you have already been told in your previous question at Unable to cast object of type 'system.int32' to type 'system.byte[]'.[^], you cannot cast an integer value into a byte array. Whatever you are trying to do with that code, it will never work.
6 Apr 2022 by OriginalGriff
Look at the Show_Customer_Image method, and see what it returns. That'll help you work out what the Row[0][0] cell is, and if it's actually a byte array. Use the debugger - it lets you look at the data while your code is running. Hint: it isn't....
6 Apr 2022 by Dave Kreskowiak
Reposting the same question will not change the answers, nor absolve you from actually thinking about what your code is doing. There is only one place in that line of code where you're converting something to an integer, then you're casting that...
4 Apr 2022 by ahmedbelal
i design desktop application for Customer i coding Edit Form My Error is Unable to cast object of type 'System.Int32' to type 'System.Byte[]'. i clicked f10 to debug my Application My Error Here || || || __ \/ byte[] pa_img =...
3 Apr 2022 by M Imran Ansari
In exception, error showing you are converting byte[] to int. Below line of code is throwing this exception Where you are converting byte[] pa_img...
31 Mar 2022 by Xarzu
This question is about SQL Server In the past, I have created a stored procedure that was run on a timely basis by (if I remember correctly) a database trigger. As I recall, there was a wizard (dialog box with "NEXT" buttons) that I used to set...
31 Mar 2022 by Xarzu
It is a SQL Server Agent which will run jobs. It is found at the bottom of the MS SQL Server Management Studio.
16 Mar 2022 by ahmedbelal
i need to Edit row in database from DataGrid View the Problem is i need solution for System.FormatException: 'The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.' i click f10 and compiler work my...
16 Mar 2022 by Maciej Los
If f_Patient.dateTimeNOW is a DateTimePicker Control[^], you need to pass proper date/time value instead of string! So, this is wrong: f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString(); try: f_Patient.dateTimeNOW.Value...
16 Mar 2022 by OriginalGriff
We can't help - we have no idea what part of that is working on what value. All we - and presumably you - know is that something is trying to parse a string to a DateTime value, and it's probably the dateTimeNOW.Text property assignment. And we...
14 Mar 2022 by ahmedbelal
i need solution for repeat items in DataGridView i design form for Patients , i try to show Patient List in dataGridView But when i closed form and open DataGridView For Patient Again , Patient List is repeating for Example i have 10 row for...
14 Mar 2022 by Jay Stewart 2021
private void button1_Click(object sender, EventArgs e) { this.Close(); this.DGV.Rows.Clear(); DGV.DataSource = null; }
5 Mar 2022 by ahmedbelal
I need solution for system.formatexception: 'input string wasn't in correct format i design desktop Application for Clinic And I design form to Edit...
5 Mar 2022 by RickZeeland
Instead of using Convert() it is safer to use the Int32.TryParse Method[^] Example: using System; public class Example { public static void Main() { string[] values = { null, "160519", "9432.0", "16,667", ...
5 Mar 2022 by OriginalGriff
There is no "solution": it's simply that the data you are presenting isn't a valid number. It could be null, it could be text - we can't know, so we can't even begin to help you fix it. So, it's going to be up to you. And the first thing to do...
25 Feb 2022 by ahmedbelal
i need solution for System.FormatException: 'Input string was not in a correct format.' i design desktop Application for Clinic i want to get the result ( cost - paid) i debug the app and compiler get error on RemindTextBox.Text =...
25 Feb 2022 by OriginalGriff
RemindTextBox.Text = Convert.ToString(Convert.ToDouble(PatientCostTextBox.Text) - Convert.ToDouble(PayedTextBox.Text)); First off, don't use Convert methods with user input values - they make mistakes and the Convert methods always throw an...
17 Feb 2022 by ahmedbelal
I design desktop Application for Clinic when i add new Patient when i run code my Error IS Error InvalidCastException: Invalid cast from 'System.String' to 'System.Byte[]'. What I have tried: my Code function Add : public static class...
17 Feb 2022 by PIEBALDconsult
p[12] = new SqlParameter("@Patient_img", SqlDbType.Image); p[12].Value = Patient_Email;