Re: Application Interface Options for Integration

2012-05-15 Thread Jason Keats
If I were the source system vendor I would be implementing webhooks if I
cared at all about integration of my application.

http://www.entechsolutions.com/hooks-and-sockets-for-web-apps

If I were you I would be asking for webhooks.

But, maybe, that's just me.

I would probably also look at using ZeroMQ if I were going to create
middleware for disparate clients.

On Mon, May 14, 2012 at 5:20 AM, Michael O'Dea-Jones mich...@wardyit.comwrote:

 Hi all,

 ** **

 Scenario: 

 ** **

 **1.   **Two systems need to be able to communicate via middleware

 **2.   **Source System is ASP.Net 4.0 web application

 **a.   **Has SQL Server Database

 **b.  **Exports via Export tables in SQL database

 **3.   **Destination System is not a .Net application

 **a.   **Has SQL Server Database

 **b.  **Imports via control tables in SQL database

 **4.   **Middleware is .Net 4.0 system with WCF services

 **a.   **Customised .Net plug-ins will be written to ETL from source
 to destination systems

 ** **

 Current ETL is via SSIS packages and there are issues with sequencing,
 performance and lack of business rules, logging and alerting. Source System
 Vendor is happy to implement WCF services to push data to middleware though
 they need time to upskill. 

 ** **

 Could I have an opinion on this idea:

 ** **

 Developer supply Source System Vendor with .Net library which they
 integrate into the source system. Library has a couple of method calls that
 submit messages from source system to middleware via WCF. A provider
 pattern could be implemented in the class library so other clients could
 supply their own “export” providers.

 ** **

 Pros: 

 ** **

 Easy for source system vendor to implement as they don’t have to research
 and develop WCF solution

 Costs client less because fewer changes are required to the source system*
 ***

 Client gets update quicker

 Client has the flexibility to update Export Provider any time they like***
 *

 Other Clients could implement non-WCF Export 

 ** **

 Cons:

 ** **

 Architecturally it might be better to implement WCF from the start

 Might reduce operational calls and issue complexity for the Vendor if
 there is only one way to export data

 ** **

 ** **

 Regards,

 ** **

 Michael O'Dea-Jones

 ** **



Re: OT: windows environment variables not working

2012-03-10 Thread Jason Keats
If you mean apart from using
Tools  Internet Options  Programs  Manage Add-ons  Toolbars and
Extensions

then there is also
http://www.nirsoft.net/utils/shexview.html

HTH

On Sat, Mar 10, 2012 at 7:35 PM, Peter Maddin petermad...@iinet.net.auwrote:

  Did you follow up on finding which non-Microsoft shell extensions you
 have installed? 

 ** **

 Is there an easy way to discover what shell extensions have added
 themselves to windows explorer?

 ** **

 I can see Hg Workbench and TortiseHg but not sure what else is there.

 ** **

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*

 *Phone : +618 9346 4372 (Tuesday, Thursday)**
 Mobile: 0423 540 825*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network
 are intended solely for the named recipient's), may be confidential, and
 may be privileged or otherwise protected from disclosure in the public
 interest. The use, reproduction, disclosure or distribution of the contents
 of this e-mail transmission by any person other than the named recipient(s)
 is prohibited. If you are not a named recipient please notify the sender
 immediately**.*

 ** **

 *From:* ozdotnet-boun...@ozdotnet.com [mailto:
 ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ken Schaefer
 *Sent:* Saturday, 10 March 2012 1:29 PM

 *To:* ozDotNet
 *Subject:* RE: OT: windows environment variables not working

 ** **

 +1 on checking your shell extensions. Not saying it’s the culprit here,
 but it is the #1 cause of explorer issues that I’ve seen.

 ** **

 *From:* ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas
 *Sent:* Saturday, 10 March 2012 9:32 AM
 *To:* 'ozDotNet'
 *Subject:* RE: OT: windows environment variables not working

 ** **

 Peter

 That is strange. The advice I saw (months ago, but I may be able to
 relocate the website) was that the files causing problems were  1Mb (ie,
 very large for an index to a simple list of recent activity). Perhaps these
 are hidden, system files?

 Did you follow up on finding which non-Microsoft shell extensions you have
 installed? 
 --

 **Ian Thomas**
 Victoria Park, Western Australia
 --

 *From:* ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Peter Maddin
 *Sent:* Saturday, March 10, 2012 8:59 AM
 *To:* 'ozDotNet'
 *Subject:* RE: OT: windows environment variables not working

 ** **

 I followed Ian Thomas’ advice again.

 Removed all the files in ‘Recent Items’, all of which were very small,
 rebooted and problem fixed.

 ** **

 At least its fixable if not very annoying.

 ** **

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*

 *Phone : +618 9346 4372 (Tuesday, Thursday)
 Mobile: 0423 540 825*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network
 are intended solely for the named recipient's), may be confidential, and
 may be privileged or otherwise protected from disclosure in the public
 interest. The use, reproduction, disclosure or distribution of the contents
 of this e-mail transmission by any person other than the named recipient(s)
 is prohibited. If you are not a named recipient please notify the sender
 immediately**.*

 *From:* ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Peter Maddin
 *Sent:* Saturday, 10 March 2012 7:55 AM
 *To:* 'ozDotNet'
 *Subject:* RE: OT: windows environment variables not working

 ** **

 This has come back to haunt me.

 ** **

 %windir% is no longer resolved again.

 ** **

 Using cmd.exe

 ** **

 Microsoft Windows [Version 6.1.7601]

 Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

 ** **

 C:\Users\PeterMaddinecho %windir%

 %windir%

 ** **

 C:\Users\PeterMaddin

 ** **

 I am not sure what causes this, but its really annoying.

 ** **

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*

 *Phone : +618 9346 4372 (Tuesday, Thursday)
 Mobile: 0423 540 825*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network
 are intended solely for the named recipient's), may be confidential, and
 may be privileged or otherwise protected from disclosure in the public
 interest. The use, reproduction, disclosure or distribution of the contents
 of this e-mail transmission by any person other than the named recipient(s)
 is prohibited. If you are not a named 

Re: OT: windows environment variables not working

2012-03-10 Thread Jason Keats
I obviously had IE on my mind, rather than Explorer, but I hope ShellExView
helped.

AutoRuns may be of use too:
http://technet.microsoft.com/en-us/sysinternals/bb963902

Good luck.

On Sat, Mar 10, 2012 at 9:05 PM, Peter Maddin petermad...@iinet.net.auwrote:

 Thanks for the link to ShellExView.

 ** **

 I found lots of links to Internet explorer add ons but not windows
 explorer add ons

 ** **

 For windows explorer there is no 

 Tools  Internet Options  Programs  Manage Add-ons  Toolbars and
 Extensions
 Unless my visual acuity has declined even further since the last time I
 looked ( a definite possibility)

 ** **

 Possibly this covers both !?

 ** **

 I have just checked Internet Explorer and most add-ons are disabled except
 those I would like to keep, i.e. 

 Shockwave flash,  RMGetLIcense, Silverlight and Java.

 ** **

 How does one find out what add-ons are windows explorer specific?

 ** **

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*

 *Phone : +618 9346 4372 (Tuesday, Thursday)**
 Mobile: 0423 540 825*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network
 are intended solely for the named recipient's), may be confidential, and
 may be privileged or otherwise protected from disclosure in the public
 interest. The use, reproduction, disclosure or distribution of the contents
 of this e-mail transmission by any person other than the named recipient(s)
 is prohibited. If you are not a named recipient please notify the sender
 immediately**.*

  *From:* ozdotnet-boun...@ozdotnet.com [mailto:
 ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jason Keats
 *Sent:* Saturday, 10 March 2012 5:07 PM
 *To:* ozDotNet
 *Subject:* Re: OT: windows environment variables not working

 ** **

 If you mean apart from using
 Tools  Internet Options  Programs  Manage Add-ons  Toolbars and
 Extensions

 then there is also
 http://www.nirsoft.net/utils/shexview.html

 HTH

 On Sat, Mar 10, 2012 at 7:35 PM, Peter Maddin petermad...@iinet.net.au
 wrote:

  Did you follow up on finding which non-Microsoft shell extensions you
 have installed? 

  

 Is there an easy way to discover what shell extensions have added
 themselves to windows explorer?

  

 I can see Hg Workbench and TortiseHg but not sure what else is there.

  

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*

 *Phone : +618 9346 4372 (Tuesday, Thursday)
 Mobile: 0423 540 825*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network
 are intended solely for the named recipient's), may be confidential, and
 may be privileged or otherwise protected from disclosure in the public
 interest. The use, reproduction, disclosure or distribution of the contents
 of this e-mail transmission by any person other than the named recipient(s)
 is prohibited. If you are not a named recipient please notify the sender
 immediately**.*

  

 *From:* ozdotnet-boun...@ozdotnet.com [mailto:
 ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ken Schaefer
 *Sent:* Saturday, 10 March 2012 1:29 PM


 *To:* ozDotNet
 *Subject:* RE: OT: windows environment variables not working

  

 +1 on checking your shell extensions. Not saying it’s the culprit here,
 but it is the #1 cause of explorer issues that I’ve seen.

  

 *From:* ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas
 *Sent:* Saturday, 10 March 2012 9:32 AM
 *To:* 'ozDotNet'
 *Subject:* RE: OT: windows environment variables not working

  

 Peter

 That is strange. The advice I saw (months ago, but I may be able to
 relocate the website) was that the files causing problems were  1Mb (ie,
 very large for an index to a simple list of recent activity). Perhaps these
 are hidden, system files?

 Did you follow up on finding which non-Microsoft shell extensions you have
 installed? 
 --

 Ian Thomas
 Victoria Park, Western Australia
 --

 *From:* ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Peter Maddin
 *Sent:* Saturday, March 10, 2012 8:59 AM
 *To:* 'ozDotNet'
 *Subject:* RE: OT: windows environment variables not working

  

 I followed Ian Thomas’ advice again.

 Removed all the files in ‘Recent Items’, all of which were very small,
 rebooted and problem fixed.

  

 At least its fixable if not very annoying.

  

 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285 (Monday, Wednesday,Friday

Re: EF4 and SQLite monitoring

2011-07-18 Thread Jason Keats
http://efprof.com/ ?

HTH

On 18/07/2011, at 17:09, Greg Keogh g...@mira.net wrote:

 On a more sensible subject ... I’ve been building an app that uses Entity 
 Framework 4 and SQLite for the data layer. As I reported a few weeks ago, I’m 
 quite happy with the way the two work together. I guess I must mostly thank 
 the people who wrote the ADO.NET provider which is nicely compliant.
 
  
 
 It’s nice that EF4 and ORMs generally hide you from the low-level commands 
 being sent to the database, but as a developer, I’d like to know what the 
 traffic is down at the lower level. In code I can eager/lazy load related 
 data, perform complex nested deletes, etc, but I have no idea what’s actually 
 happening under the covers.
 
  
 
 I can’t find any specific hooks in EF4 or SQLite to help me monitor the 
 underlying database commands, but I’m still looking. Has anyone else looked 
 into this issue?
 
  
 
 Greg


Re: REST to SugarCRM from .Net

2011-07-03 Thread Jason Keats
I've no experience of SugarCRM, but a quick search turned up:

http://www.sugarcrm.com/kb/system/web/soap-in-csharp/
http://code.google.com/p/candywrapper/

My reading of things is that SugarDev.Net was also using PHP ...
http://www.sugarforge.org/projects/sugardevtools/

HTH

On Sun, Jul 3, 2011 at 10:45 PM, Corneliu I. Tusnea
corne...@acorns.com.auwrote:

 Hi,

 I'm trying to connect to SugarCRM from .Net. Apparently there is (or used
 to be a .Net library called SugarDev.Net but that domain/site does not exist
 any more).
 The documentation I found is all PHP/curl which I don't mind it's just hard
 to read. These guys never explain the data structures only the random
 commands and string building they use in the most ugly string concatenation
 design possible.

 Anyone has any experience with talking to SugarCRM? Sample code or links to
 sample code would be great, otherwise anything will do.

 Thanks,
 Corneliu.




Re: REST call (obvious solution)

2011-06-18 Thread Jason Keats
My guess:

http://weblogs.asp.net/wim/archive/2004/04/02/106281.aspx

HTH

On Sat, Jun 18, 2011 at 1:36 PM, Greg Keogh g...@mira.net wrote:

 I just realised that I don’t add that extra information manually to the
 Request, it’s the extra part after the uri. So if I request
 https://place.com/v1/blahblah then it generates GET /v1/blah/blah HTTP/1.1
 

 ** **

 However, now I’m getting this dreaded error:

 ** **

 FAILED: TrustFailure | The underlying connection was closed: Could not
 establish trust relationship for the SSL/TLS secure channel.

 ** **

 20 minutes of web searching so far without luck.

 ** **

 Greg

 ** **

 ** **



Re: COM problems in Visual Studio 2010

2011-04-26 Thread Jason Keats
I tried your code (a week ago) on VS2010, but couldn't get it to fail when
running as Administrator on Windows XP 32.

What was I doing wrong? :-)


On Wed, Apr 20, 2011 at 4:48 PM, Scott Baldwin carpenoctur...@gmail.comwrote:

 Does anyone know if COM Interop has changed in any way in VS2010?

 I am getting COM exceptions when debugging an existing application in
 VS2010 when working with IShellItem. These COM exceptions did not occur in
 VS2008, and I can't find any difference in the code. The exceptions don't
 actually change the way in which the application works, and don't come up
 when not in debug mode, but I would like to get to the bottom of why they
 are occuring.

 Attached is a minimal VS2010 solution that exhibits the behaviour, any help
 would be much appreciated.

 Thanks.
 --
 Scott Baldwin
 Senior Developer - QSR International http://www.qsrinternational.com

 blog: http://sjbdeveloper.blogspot.com



Re: COM problems in Visual Studio 2010

2011-04-26 Thread Jason Keats
I tried running compiled versions and in the IDE and stepping through the
code - because I couldn't make much sense of your message.

As I said, I encountered no problems/errors/exceptions - so didn't bother
responding, then.

There are known issues when debugging under a 64 bit O/S, but I don't know
if that would cause your problem...

http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/


On Wed, Apr 27, 2011 at 1:35 PM, Scott Baldwin carpenoctur...@gmail.comwrote:

 Jason, the problem is that when running in Visual Studio 2010 in debug
 mode, it throws COM Exceptions, whereas it did no such thing in Visual
 Studio 2008. Perhaps the issue only occurs on Windows 7, or perhaps you have
 break on exceptions turned off.

 Ian, I have tried it in a 32bit environment, and the same problem occurs,
 so it's not likely a x64 problem.

 On Wed, Apr 27, 2011 at 12:55 PM, Ian Thomas il.tho...@iinet.net.auwrote:

  I also tried the code sometime last week, on Win7 64-bit, and (in debug)
 got the  System.Runtime.InteropServices.COMException There are a number
 of similar reports of this COM exception on the web.

 When poking through the code, I saw exception messages that were something
 to do with wrong # of parameters – but I haven’t seen nor found an
 explanation.

 There is a suggestion that it is a 64-bit Windows problem only.

 As you say, the test app still works (I have not tried it in XP Mode or on
 a real XP, but I assume that it does there too).
  --

 Ian Thomas
 Victoria Park, Western Australia
   --

 *From:* ozdotnet-boun...@ozdotnet.com [mailto:
 ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jason Keats
 *Sent:* Wednesday, April 27, 2011 10:06 AM

 *To:* ozDotNet
 *Subject:* Re: COM problems in Visual Studio 2010



 I tried your code (a week ago) on VS2010, but couldn't get it to fail when
 running as Administrator on Windows XP 32.



 What was I doing wrong? :-)





 On Wed, Apr 20, 2011 at 4:48 PM, Scott Baldwin carpenoctur...@gmail.com
 wrote:

 Does anyone know if COM Interop has changed in any way in VS2010?



 I am getting COM exceptions when debugging an existing application in
 VS2010 when working with IShellItem. These COM exceptions did not occur in
 VS2008, and I can't find any difference in the code. The exceptions don't
 actually change the way in which the application works, and don't come up
 when not in debug mode, but I would like to get to the bottom of why they
 are occuring.



 Attached is a minimal VS2010 solution that exhibits the behaviour, any
 help would be much appreciated.


 Thanks.
 --
 Scott Baldwin
 Senior Developer - QSR International http://www.qsrinternational.com

 blog: http://sjbdeveloper.blogspot.com






 --
 Scott Baldwin
 Senior Developer - QSR International http://www.qsrinternational.com

 blog: http://sjbdeveloper.blogspot.com



Re: Writing NULL value to MS SQL Database

2011-04-08 Thread Jason Keats
Try vbNull, rather than DBNull.Value.

On Fri, Apr 8, 2011 at 9:36 PM, Darron and Kerrie 
dkpritch...@optusnet.com.au wrote:

  I have just started programming in VB.net.

 I am recoding an old VB6.0 program to VB.net, and having a problem with
 setting a database field back to null.

 The VB6.0 code was:

 Set rs = OpenTable(select * from tblunits where unit =   '  temp 
 ')
 rs!status = Available
 rs!eventnum = Null
 rs.Update

 I have tried a number of different way in VB.net but always get errors.
 Here is my current code.


 Dim
 sqlda As New SqlDataAdapter

 Dim SQLcmd As New SqlCommand

 Dim TableFlag As DataTable

 Dim drunitstatus As DataRow

 With SQLcmd

 .Connection = conn

 .CommandType =
 CommandType.Text

 .CommandText = (
 select * from tblunits where unit = '  UnitName  ')

 End With

 sqlda =
 New SqlDataAdapter(SQLcmd)

 TableFlag =
 New DataTable

 sqlda.Fill(TableFlag)

 drunitstatus = TableFlag.Rows(0)

 drunitstatus(status) = Available

 drunitstatus(eventnum) = DBNull.value 'This appear to be the problem
 line eventnum is int32 and allow nulls

 Dim
 sCB As SqlCommandBuilder = New SqlCommandBuilder(sqlda)

 sqlda.Update(TableFlag)



 The Current error is NullReferenceException was Caught

 Can any one advise what I am doing wrong?

 Darron







Re: WPF dialog never displayed

2011-04-08 Thread Jason Keats
There is an alternative:

http://code.google.com/p/retlang/


On Wed, Apr 6, 2011 at 1:44 PM, Peter Maddin petermad...@iinet.net.auwrote:

 I need to display a small wpf windows that shows a progress bar while
 parsing an xml file and using this to add content to a flowdocument.



 This is done from within a user control.



 The dialog sets DialogResult to true if it works or false if an exception
 occurs.



 The dialog is working except it is never displayed.



 What does one need to do so that it is displayed.



 Code



  if (LogFilePath != null)

 {

 if (parentWindow != null)

 {

 var processingDialog = new PleaseWaitDialog();

 processingDialog.Owner = parentWindow;

 processingDialog.LogFilePath = LogFilePath + \\
  + logFile;

 processingDialog.IsForPrinter = false;

 processingDialog.IntializeDialog();

 if (processingDialog.ShowDialog() == true)

 {


 logDocumentUserControl.logFlowDocumentViewer.Document 
 = processingDialog.LogDocument;

 }

 }

 }



 While it functions, nothing is shown.



 Any clues as to what to do?



 Also the loaded event in my dialog window  is never triggered.



 (Also posted to the WPF list which is as not active as this one)





 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285
 Mobile: 0414 240 307*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network are
 intended solely for the named recipient's), may be confidential, and may be
 privileged or otherwise protected from disclosure in the public interest.
 The use, reproduction, disclosure or distribution of the contents of this
 e-mail transmission by any person other than the named recipient(s) is
 prohibited. If you are not a named recipient please notify the sender
 immediately**.*







Re: WPF dialog never displayed

2011-04-08 Thread Jason Keats
The source contains sample apps and unit tests. Study them for
enlightenment.

I used TortoiseSVN to download it (http://retlang.googlecode.com/svn/trunk/).
However, I can email it to you if you want.

You can ask questions at: http://groups.google.com/group/retlang-dev


On Sat, Apr 9, 2011 at 2:01 AM, Peter Maddin petermad...@iinet.net.auwrote:

 Thanks



 Looks very interesting.



 A working demo would be nice.

 There is a single dll and chm help file.

 There is a dropbox a presentation  which is quite nice.

 Still it sounds like it might solve a lot of problems



 Regards Peter



 *From:* ozdotnet-boun...@ozdotnet.com [mailto:
 ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jason Keats
 *Sent:* Friday, 8 April 2011 9:21 PM

 *To:* ozDotNet
 *Subject:* Re: WPF dialog never displayed



 There is an alternative:


 http://code.google.com/p/retlang/

 On Wed, Apr 6, 2011 at 1:44 PM, Peter Maddin petermad...@iinet.net.au
 wrote:

 I need to display a small wpf windows that shows a progress bar while
 parsing an xml file and using this to add content to a flowdocument.



 This is done from within a user control.



 The dialog sets DialogResult to true if it works or false if an exception
 occurs.



 The dialog is working except it is never displayed.



 What does one need to do so that it is displayed.



 Code



  if (LogFilePath != null)

 {

 if (parentWindow != null)

 {

 var processingDialog = new PleaseWaitDialog();

 processingDialog.Owner = parentWindow;

 processingDialog.LogFilePath = LogFilePath + \\
  + logFile;

 processingDialog.IsForPrinter = false;

 processingDialog.IntializeDialog();

 if (processingDialog.ShowDialog() == true)

 {


 logDocumentUserControl.logFlowDocumentViewer.Document 
 = processingDialog.LogDocument;

 }

 }

 }



 While it functions, nothing is shown.



 Any clues as to what to do?



 Also the loaded event in my dialog window  is never triggered.



 (Also posted to the WPF list which is as not active as this one)





 *Regards Peter Maddin*
 *Applications Development Officer*
 *Path**West Laboratory Medicine WA*
 *Phone : +618 6396 4285
 Mobile: 0414 240 307*
 *E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au*
 *The contents of this e-mail transmission outside of the WAGHS network are
 intended solely for the named recipient's), may be confidential, and may be
 privileged or otherwise protected from disclosure in the public interest.
 The use, reproduction, disclosure or distribution of the contents of this
 e-mail transmission by any person other than the named recipient(s) is
 prohibited. If you are not a named recipient please notify the sender
 immediately**.*









Re: Writing NULL value to MS SQL Database

2011-04-08 Thread Jason Keats
I just tried your example. It had no problem inserting a Null using
DBNull.Value.

It must be something else causing your problem.

Hopefully, I got it right this time - even with a hangover. ;-)


On Fri, Apr 8, 2011 at 9:36 PM, Darron and Kerrie 
dkpritch...@optusnet.com.au wrote:

  I have just started programming in VB.net.

 I am recoding an old VB6.0 program to VB.net, and having a problem with
 setting a database field back to null.

 The VB6.0 code was:

 Set rs = OpenTable(select * from tblunits where unit =   '  temp 
 ')
 rs!status = Available
 rs!eventnum = Null
 rs.Update

 I have tried a number of different way in VB.net but always get errors.
 Here is my current code.


 Dim
 sqlda As New SqlDataAdapter

 Dim SQLcmd As New SqlCommand

 Dim TableFlag As DataTable

 Dim drunitstatus As DataRow

 With SQLcmd

 .Connection = conn

 .CommandType =
 CommandType.Text

 .CommandText = (
 select * from tblunits where unit = '  UnitName  ')

 End With

 sqlda =
 New SqlDataAdapter(SQLcmd)

 TableFlag =
 New DataTable

 sqlda.Fill(TableFlag)

 drunitstatus = TableFlag.Rows(0)

 drunitstatus(status) = Available

 drunitstatus(eventnum) = DBNull.value 'This appear to be the problem
 line eventnum is int32 and allow nulls

 Dim
 sCB As SqlCommandBuilder = New SqlCommandBuilder(sqlda)

 sqlda.Update(TableFlag)



 The Current error is NullReferenceException was Caught

 Can any one advise what I am doing wrong?

 Darron







Re: Attaching event to child controls of UserControl

2011-03-15 Thread Jason Keats
Did you try setting the Form's KeyPreview property to True?

I would expect a well-behaved UserControl to handle the ParentChanged event.


On Tue, Mar 15, 2011 at 5:22 PM, Michael Ridland rid...@gmail.com wrote:

 Hi

 I need to catch a Control-Enter keyboard input on a UserControl and any of
 it's children, but it seems only the actual focused control gets the events.
 So I looked around the net and didn't find a solution. I came up with my own
 solution, which involved cycling through all the children and attaching a
 KeyDown event.


 public void Init()
 {
 RecursivelyAddEvent(this.Controls, 0);
 }

 public void RecursivelyAddEvent(ControlCollection controls, int level)
 {
 foreach(Control ctrl in controls)
 {
 ctrl.KeyDown += EmailEditor_KeyDown;
 if(level  3)
 RecursivelyAddEvent(ctrl.Controls, level+1);
  }
 }

 It works, but there must be a better solution?

 Thanks
 Noobie Winforms Dude








Re: UDP Broadcasting

2010-12-13 Thread Jason Keats
I'd try the following:

http://stackoverflow.com/questions/1096142/broadcasting-udp-message-to-all-the-available-network-cards
http://snipplr.com/view/28192/bind-a-socket-including-udpclient-and-tcpclient-to-a-local-network-interface-card-nic/

HTH

On Mon, Dec 13, 2010 at 5:56 PM, Greg Keogh g...@mira.net wrote:
 Folks, I’ve got old code that sends UDP broadcasts like this simple
 skeleton:



 UdpClient broadcaster = new udpClient();

 IPEndPoint ep = new IPEndPoint(IPAddress.Broadcast, );

 Broadcaster.Send(buffer, buffer.Length, ep);



 We have just found that if there are multiple network cards in the machine
 then it’s unpredictably broadcasting on the wrong interface and the
 listeners get nothing. I’m not sure how to code a fix for this. Do I need to
 do this to get an IPAddress array and then put them all into the Send call?
 Like this...?



 string hostname = Dns.GetHostName();

 IPHostEntry he = Dns.GetHostByName(hostname);

 foreach (IPAddress addr in he.AddressList)

 {

     // Send with an endpoint set to each addr instead of
 IPAddress.Broadcast?

 }



 I’m not sure if this is the correct technique. Any sockets boffins here know
 this sort of thing?



 Cheers,

 Greg


Re: [OT] VBScript return string runtime error

2010-11-29 Thread Jason Keats
I believe that wrapping a parameter in parentheses forces it to be
passed ByVal - even if you've coded ByRef.

And, in VBScript, everything is a Variant (not quite the same thing as
an Object) - so you may have to use CVar occasionally.

On Mon, Nov 29, 2010 at 8:32 PM, Mark Hurd markeh...@gmail.com wrote:
 I've replicated your problem with a simple VB6 class.

 I'm not sure of the actual cause but your fix is:

    id = client.SendRequest((request))

 because the working client.SendRequest(request)

 is really

    client.SendRequest (request)

 or

    Call client.SendRequest((request)).

 The call corresponding to the original id = line Call
 client.SendRequest(request)

 or

   client.SendRequest request

 fails with TypeMismatch for me.

 I assume the problem is VBScript only deals with Objects most of the
 time, and so doesn't like the original accurate type being passed to
 the (correct) accurate type, but the () returns the object to Object,
 which it doesn't mind passing anywhere.

 --
 Regards,
 Mark Hurd, B.Sc.(Ma.)(Hons.)

 On 28 November 2010 18:09, Greg Keogh g...@mira.net wrote:
 I’ve been running experiments for almost two hours solid now, making mock
 functions and passing different arguments and return types in all
 combinations I can think of. I’ve cleaned my environment, registered,
 unregistered, etc. Everything works perfectly in unit tests, only in the VBS
 file I find this specific failure rule:



 I cannot get a return value from a method call that has a COM object as an
 argument.



 Sadly, I can’t just pass primitive types as the arguments to the function,
 as it takes far too many and some are collections.



 I think I’ll give up and have a glass of wine.



 Greg



Re: OT - Mathematical computing

2010-07-30 Thread Jason Keats
I came across Sage http://sagemath.org/ the other day. It's trying
to be an open source alternative to programs like Mathematica - using
Python to glue together a collection of libraries.

It's been about 15 years since I last played with any mathematical
software - in a previous life as a maths teacher - so I can't help
further.


On Sat, Jul 31, 2010 at 11:29 AM, silky michaelsli...@gmail.com wrote:
 Does anyone do anything of this type?

 I'm currently playing with MATLAB, and it's pretty fun. There are some
 things that require a bit of getting used to, but it seems like it's
 the most used and programmable. We've got Maple at Uni as well, and I
 certainly prefer that for entering and manipulating equations. I
 haven't done much with Mathematica, and those are the only programs
 I'm familiar with. I'm under the impression that a component of the
 scientific community uses Python; but I suspect that's only because
 it's more accessible to them than other programming languages (and
 probably due to some existing math libraries which make things
 easier).

 Anyone have any thoughts on the matter? I believe MATLAB has some sort
 of interaction with Amazon EC2 for running distributed items, which
 seems very cool, but I'm yet to do anything anywhere near as
 interesting as requiring that.

 Interested to hear if anyone has done any work/investigation in this area.

 --
 silky

 Every morning when I wake up, I experience an exquisite joy — the joy
 of being this signature.