Skip to content
Advertisement

Tag: vb.net

SQL server Nvarchar parameters

I Have created an SP to search against many tables in the db based on string sent form ado the Vb code and the SQL SP is : As you can see I have declared argument in VB as Nvarchr and SQL parameter @SearchKey as Nvarchar also if I send english data in @SearchKey search returns correct data, but if

The parameterized query expects the parameter which was not supplied

I’m having a problem with my code: Once I typed in the string in the textbox to search for an item I get this error: The parameterized query ‘(@Parameter1 nvarchar(4000))SELECT * FROM borrow where (Departme’ expects the parameter ‘@Parameter1’, which was not supplied. Can anyone help me? Answer If you pass null value to parameter,you will get this error even

Decoding T-SQL CAST in C#/VB.NET

Recently our site has been deluged with the resurgence of the Asprox botnet SQL injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in …

Advertisement