Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
AnswerRe: SMS in C# Pin
OriginalGriff21-Apr-18 23:36
mveOriginalGriff21-Apr-18 23:36 
QuestionNpgsqlcommand parameterization doesn't always escape single quote Pin
Member 1379203421-Apr-18 22:24
Member 1379203421-Apr-18 22:24 
AnswerRe: Npgsqlcommand parameterization doesn't always escape single quote Pin
OriginalGriff21-Apr-18 22:44
mveOriginalGriff21-Apr-18 22:44 
QuestionPSFEATURE_CUSTPAPER structure - change paper size in virtual printer Pin
Member 1308759421-Apr-18 9:30
Member 1308759421-Apr-18 9:30 
Questionusbclass library Pin
Member 1379116421-Apr-18 4:58
Member 1379116421-Apr-18 4:58 
AnswerRe: usbclass library Pin
OriginalGriff21-Apr-18 5:00
mveOriginalGriff21-Apr-18 5:00 
AnswerRe: usbclass library Pin
jschell21-Apr-18 6:23
jschell21-Apr-18 6:23 
QuestionStateChange event issue in SQL Server 2016 and .net 4.7 ado.net Pin
Arun TBalakrishnan20-Apr-18 14:18
Arun TBalakrishnan20-Apr-18 14:18 
I am facing an issue with SQL Server 2016, we have an application in windows forms to block multiple logins with the same username.

The logic that we implemented to prevent this is: the first time a user logs in to the application a DB connection will be opened and the connection will not be closed until he logs out.
When the second user connects the application using the same username, we will kill the first connection using the KILL command (this logic is implemented inside a stored procedure) after this when the first user does some DB operation the connection StateChange event will be fired and the application will be closed.

This was working perfectly up to ms SQL Server 2012. Recently we have migrated our application to framework 4.7 and SQL Server 2016 after that we are having this issue. In SQL Server 2016 when we kill the first user connection it will disappear from the SYSPROCESSES table but if the user performs any DB fetching the connection will be reopened automatically (with the same connection id) and the StateChange event will not fire. We are not using any connection pooling. I have tried different combinations of .NET framework and SQL Server (not checked in SQL Server 2014)

• Up to SQL Server 2012, it will work in all dot net frameworks
• In SQL Server 2016, this will work only if the framework is 3.5.

Connection string used:
Data Source=DBServer;Network Library=DBMSSOCN;Initial Catalog=DBName; User ID=DBUserName; Password=DBPassword; POOLING=false;Trusted_Connection=false;APPLICATION NAME = STATECHANGE_ISSUE

SQL Server 2016 version

Microsoft SQL Server 2016 (SP1-GDR) (KB4019089) - 13.0.4206.0 (X64) Standard Edition (64-bit)

Did anyone face this issue before? Is there any workaround for this in .Net framework 4.7.
AnswerRe: StateChange event issue in SQL Server 2016 and .net 4.7 ado.net Pin
Gerry Schmitz20-Apr-18 20:19
mveGerry Schmitz20-Apr-18 20:19 
QuestionHow can we copy and move folders in one folder to another folder. Pin
Member 1377710419-Apr-18 20:14
Member 1377710419-Apr-18 20:14 
AnswerRe: How can we copy and move folders in one folder to another folder. Pin
OriginalGriff19-Apr-18 21:35
mveOriginalGriff19-Apr-18 21:35 
AnswerRe: How can we copy and move folders in one folder to another folder. Pin
BillWoodruff20-Apr-18 3:29
professionalBillWoodruff20-Apr-18 3:29 
GeneralRe: How can we copy and move folders in one folder to another folder. Pin
OriginalGriff20-Apr-18 4:09
mveOriginalGriff20-Apr-18 4:09 
GeneralRe: How can we copy and move folders in one folder to another folder. Pin
BillWoodruff20-Apr-18 15:32
professionalBillWoodruff20-Apr-18 15:32 
AnswerRe: How can we copy and move folders in one folder to another folder. Pin
Gerry Schmitz20-Apr-18 7:09
mveGerry Schmitz20-Apr-18 7:09 
QuestionPLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Jens Eckervogt 19-Apr-18 11:03
Jens Eckervogt 19-Apr-18 11:03 
AnswerRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Gerry Schmitz20-Apr-18 7:26
mveGerry Schmitz20-Apr-18 7:26 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Jens Eckervogt 20-Apr-18 10:21
Jens Eckervogt 20-Apr-18 10:21 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Gerry Schmitz20-Apr-18 12:37
mveGerry Schmitz20-Apr-18 12:37 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Jens Eckervogt 21-Apr-18 0:04
Jens Eckervogt 21-Apr-18 0:04 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Jens Eckervogt 20-Apr-18 9:39
Jens Eckervogt 20-Apr-18 9:39 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Gerry Schmitz20-Apr-18 13:08
mveGerry Schmitz20-Apr-18 13:08 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Pete O'Hanlon20-Apr-18 22:11
mvePete O'Hanlon20-Apr-18 22:11 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Jens Eckervogt 21-Apr-18 5:15
Jens Eckervogt 21-Apr-18 5:15 
GeneralRe: PLEASE HELP ME - I have problem with OpenTK and Loading WaveFront ( obj without materials ) Pin
Pete O'Hanlon21-Apr-18 5:38
mvePete O'Hanlon21-Apr-18 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.