Click here to Skip to main content
15,881,826 members

Comments by j snooze (Top 200 by date)

j snooze 5-Jul-22 17:33pm View    
Is this javascript code changes? Is the page still using cached javascript code? Did you version the javascript? If this is C# code behind changes, can you verify the dll dates match between server and local machine?
j snooze 8-Jun-22 17:50pm View    
Well, not that I understand what your requirements are, but I'm guessing the issue is the @sql_Query you are trying to put together. The @POL_NBR variable needs to be outside the apostrophe like this
set @sql_Query = @sql_Query + ' TPCA.POL_NBR = ' + @POL_NBR, if @POL_NBR is a number, then thats fine otherwise you'll have to concatenate the apostrophes around the variable if its a string.

Although any kind of concatenation of SQL to execute from passed in variables should make you think about coming up with a different way to put this together as that can allow for sql injection even if you are passing the variable in as a parameter from .NET, if you're using that parameter to build an SQL statement inside with other SQL to be executed somewhere else, I'm sure there are people creative enough to find a way to break that.

I admit, I feel like this isn't the entire code for either piece so there could be something I'm missing. Hope the above answer gets you further along.
j snooze 29-Mar-22 17:30pm View    
what version of SQL Server are you using? I believe they introduced a function called String_Agg() in 2017?
Here is a little write up on it. SQL Server STRING_AGG() Function By Practical Examples[^]
j snooze 19-Jan-22 17:56pm View    
That is strange, out of curiosity, does adding a ParentControl.Refresh after the foreach do anything? Wouldn't think you would need that on a winform, but I've seen weirder things.
j snooze 11-Jan-22 17:15pm View    
Its been awhile since I did anything in Unity, and I was doing 3D but it looks like there is a Vector2.MoveTowards function in Unity. Try telling the bullet object to move towards the location of the object you want it to hit.

https://docs.unity3d.com/ScriptReference/Vector2.MoveTowards.html