Search found 14981 matches

by jvierra
Wed Nov 17, 2021 5:18 am
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 421

Re: dgv cell click setting column header selection state

Here is some more good background on app.config files, how they are used and how they cannot be eliminated. There is actually no way to eliminate them. If you ship an exe without an app.config the EXE will create one the first time it is run. The short article has two links to more detailed informat...
by jvierra
Fri Nov 12, 2021 1:12 pm
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1008

Re: posh studio EXE gets an ODBC connection error

If you have the connection object in a function then it will be out-of-scope when the function ends.

Create all data object for the connection in a global scope and this won't happen.

Again, without your code there is no perfect way to understand your issue.
by jvierra
Fri Nov 12, 2021 6:01 am
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 502

Re: How to delete my .EXE script just before exit it?

You can't delete any executable while it is running. The OS owns and controls teh EXE whie it is running. You can schedule a one-shot task to delete the exe after it ends.
by jvierra
Thu Nov 11, 2021 9:16 am
Forum: PowerShell
Topic: Wrong encoding from - Invoke-WebRequest
Replies: 4
Views: 350

Re: Wrong encoding from - Invoke-WebRequest

JUst note that what you get back from "Invoke-WebRequest" is an object and cannot be displayed as text. If you output to a file the web page is converted to text so it will be readable. The issue is as I noted above, the objects text from the remote server does not have a BOM so it won't convert cor...
by jvierra
Wed Nov 10, 2021 10:57 pm
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 421

Re: dgv cell click setting column header selection state

Yes, I can reproduce that when the form is packaged. Since this is an engine issue you will have to open a support request and have Sapien investigate why teh engine changes teh behavior of the control.
by jvierra
Wed Nov 10, 2021 2:55 pm
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 421

Re: dgv cell click setting column header selection state

It is clear that you have added some code somewhere that has caused this. Be sure that all properties are set to default and then test again.
by jvierra
Wed Nov 10, 2021 12:17 pm
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1008

Re: posh studio EXE gets an ODBC connection error

Don't give up just drop the need for a console and output to a textbox on the form. Using a co-console with a form always finds conflicts in third-party tools often due to threading issues. The AS400 drivers have always had critical requirements. Take the simple approach. Place connection code in ne...
by jvierra
Wed Nov 10, 2021 11:20 am
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1008

Re: posh studio EXE gets an ODBC connection error

Here is a test step that will clear up the differences between using a forms mode and a console.

Build with "Sapien PowerShell V5 Host (Commandline)" and be sure that STA remains checked. Run the EXE and see if you get the same error. This will be closer to PS Console" than the Application host.
by jvierra
Wed Nov 10, 2021 11:14 am
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1008

Re: posh studio EXE gets an ODBC connection error

The most common reason for this is that your code is written wrong and without the connection code there is no way to know how you have done this. If you use "Fill" wrong then you can get this error. Remember that an EXE is not a console and it does not load the environment in the same way. This can...
by jvierra
Wed Nov 10, 2021 9:46 am
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1008

Re: posh studio EXE gets an ODBC connection error

It looks like you have no connection. Why are you creating a GUI app with Windows Application Host? YOu should be using the Windows Forms host for a GUI app. Note your error: "- Remote address could not be resolved"". This means you have no name resolution on your system. Likely your AS400 configura...