DB functionality failing for no apparent reason

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
LtMandella
Posts: 61
Last visit: Mon May 07, 2018 4:03 pm

DB functionality failing for no apparent reason

Post by LtMandella »

Product, version and build:2015 4.2.99
32 or 64 bit version of product:64
Operating system:win server 2008 r2 standard sp1 (in VM)
32 or 64 bit OS:64
PowerShell Version:2

About once a week under heavy editing/run cycles of a winform app, the app will execute but for no apparent reason will no longer make any connection to db. No error, but none of the db queries will execute. I am not changing the connection code or sql query code when this happens.

I have to restore from backup. This usually happens after I abort a run attempt, or if the app encounters a run time error.
thanks,
ken
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: DB functionality failing for no apparent reason

Post by davidc »

[TOPIC MOVED TO THE POWERSHELL GUIS FORUM BY MODERATOR]
David
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: DB functionality failing for no apparent reason

Post by jvierra »

What app. This is a scripting forum for PowerShell. Are you asking about a PowerShell Windows Forms script?
User avatar
LtMandella
Posts: 61
Last visit: Mon May 07, 2018 4:03 pm

Re: DB functionality failing for no apparent reason

Post by LtMandella »

jvierra wrote:What app. This is a scripting forum for PowerShell. Are you asking about a PowerShell Windows Forms script?
powershell studio winform app. I will try again in that forum. thanks.
User avatar
LtMandella
Posts: 61
Last visit: Mon May 07, 2018 4:03 pm

winform script will not make db connection, must restore from backup

Post by LtMandella »

Product, version and build: powershell studio 2015 4.2.99
32 or 64 bit version of product:64
Operating system:win server 2008 r2 standard sp1 (in VM)
32 or 64 bit OS:64
PowerShell Version:2

About once a week under heavy editing/run cycles of a winform app, the app will execute but for no apparent reason will no longer make any connection to db. No error, but none of the db queries will execute. I am not changing the connection code or sql query code when this happens.

I have to restore from backup. This usually happens after I abort a run attempt, or if the app encounters a run time error.
thanks,
ken
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: DB functionality failing for no apparent reason

Post by jvierra »

You are in the correct forum but I do not understand your question. You are saying that something doesn't work but there is no detail and no code illustrating the issue.

Without some information there is no way to even guess t what the issue is.

Provide a minimal piece of code that demonstrates the issue along with any errors.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: DB functionality failing for no apparent reason

Post by jvierra »

LtMandella wrote:I have to restore from backup. This usually happens after I abort a run attempt, or if the app encounters a run time error.
thanks,
ken
This sounds like something is corrupting your disk. Running an EXE cannot change the exe. Try running disk and system diagnostics.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: winform script will not make db connection, must restore from backup

Post by davidc »

[TOPIC MOVED TO POWERSHELL GUI FORUMS]

This is probably happening because the connections aren't properly closed (possibly because you hit the stop button in debug) and you end up running out of available connections. Without any error messages or code it is hard to tell what is happening.
David
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: winform script will not make db connection, must restore from backup

Post by jvierra »

I have merged the duplicate topics.
User avatar
LtMandella
Posts: 61
Last visit: Mon May 07, 2018 4:03 pm

Re: DB functionality failing for no apparent reason

Post by LtMandella »

thanks guys,

I will see if I can record any error messages. I can't recall seeing any in the output window of powershell studio when this happens.

I will run some sql on the db server side to examine the open connections next time this happens.
This topic is 7 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked