티스토리 뷰
MSSQL HashBytes Sqlparameter Type Error
Parameter Type Varchar != Nvarchar HashBytes different binary value
-->>
Sovled 1.
var _pWDs = new SqlParameter("@PWDs", SqlDbType.VarChar,500);
_pWDs.Value = Ubody.PWD2;
// Query String
comm.CommandText += " select * from UidTable where password = Hashbyte('SHA2_256',@PWDs);
comm.Parameters.Add(_pWDs);
Solved 2.
comm.CommandText += " select * from UidTable where password = Hashbyte('SHA2_256',@PWDs);
comm.Parameters.Add("@PWDs",SqlDbType.VarChar,500);
comm.Parameters["@PWDs"].Value = Ubody.PWD2
Solved 3.
var _pWDs = new SqlParameter("@PWDs");
comm.CommandText = "DECLARE @PWD2 VARCHAR(500); Set @PWD2 =@PWDs";
comm.CommandText += " select * from UidTable where password = Hashbyte('SHA2_256',@PWD2 );
comm.Parameters.Add(_pWDs);
c# - Why does SqlCommand not pass parameter inside a HASHBYTES function? - Stack Overflow
'WPF' 카테고리의 다른 글
No data is available for encoding 51949 (0) | 2022.10.30 |
---|---|
SqlDataReader to DataTable (0) | 2022.10.14 |
WPF SerialPort.DataReceived 이벤트 Thread Exception (0) | 2022.06.27 |
Radio Button/ CheckBox Null Check (0) | 2022.06.20 |
C# DataTable AsEnumerable Sum, Count Linq쿼리 (0) | 2022.02.14 |
- Total
- Today
- Yesterday
- Label Text LineBreak in Xaml
- WPF Scrollviewer in ScrollViwer
- Xamarin.Ios Firebase Phone User Add
- GetCellContent CheckBox Value
- WPF Textbox
- Xamarin.Ios Firebase Phone Auth
- 서버 수준의 URN 필터
- WPF Excel Export Microsoft.Office.Interop 성능향상(열 기준으로 복사)
- ClickOnce 인증서 인증기간 변경
- C# LINQ Left join
- ssl_client_socket_impl.cc
- Embeded 한글Font적용
- Linux SSH Multi Computer Join
- Microcharts
- Xamarin.Ios Firebase Phone SMS OTP Send
- c# Encrypt / Decrypt
- Entry '' has empty native path
- 암호 마스터키
- WPF Datagrid Cell Value Change
- Xamarin Firebase Phone User Add
- Xamarin SMS OTP Send
- Xamarin Firebase Phone Auth
- FileStream Add Byte
- Xamarin.Forms
- Xamarin reCAPTCHA
- SkiaSharp
- 연산자 뒤에 피연산자가 없습니다.
- Windows IIS FTP 디렉토리 목록 오류
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |