Click here to Skip to main content
14,936,653 members

Comments by Ger Hayden (Top 119 by date)

Ger Hayden 25-Sep-20 1:16am View
   
I've had a small outbreak of common sense. From here on, composite keys will only be editable prior to their initial commit. After that, they will have to be end dated and replaced by a new row.
Ger Hayden 18-Sep-20 9:44am View
   
Thanks for the input Gerry. If a client came over the hill tomorrow and insisted on taking my system then that is what I would do to get it into production. However this is, and will probably always be no more than a training sandbox for me. So the "business case" is something like I have a new product to go on sale on 01/10/2020, but it gets deferred to 01/01/2021. In that scenario the user wants to change the fromdate on the price table to reflect this rather than ending the current entry to reflect that the product will commence sale on the new date.

I can do this by tracking the original key, but I am curious as to whether or not there is an Entity Framework specific approach to changing composite key.

The other thing to consider is while I dont have much in the way of foreign keys from MySql, I have them now as part of the migration I did recently to Sql Server (adding entity framework is part of this - and this is the first table). I will need to consider that too. Perhaps allowing key updates is not a good idea any more. But regardless of it being a pigheadded thing to do, I would still like to see how EF might go about it.
Ger Hayden 31-Jul-20 3:17am View
   
So far I have implemented both the example in Rick's solution and the deep clone from https://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-of-an-object-in-net. Both are popping out when the memory stream statement is first run. I havent done any checking as to why yet.
Ger Hayden 29-Jul-20 9:16am View
   
I will explore that thought, it might well be the solution.
Ger Hayden 8-Jul-20 2:15am View
   
I wasn't aware of that.
Ger Hayden 6-Jul-20 17:24pm View
   
Hi Gerry, It has to or I scrap WPF and go back to forms. As I type an idea is forming around rowEndEdit that might just work.
Ger
Ger Hayden 20-Apr-20 1:22am View
   
I have just discovered a binding error: System.Windows.Data Error: 40 : BindingExpression path error: 'p_photo' property not found on 'object' ''CPersonMasterBase' (HashCode=65257631)'. BindingExpression:Path=p_photo; DataItem='CPersonMasterBase' (HashCode=65257631); target element is 'Image' (Name='PersonImage'); target property is 'Source' (type 'ImageSource')

And it turned out to be a case of PICNIC (Problem In Chair Not In Computer) - the correct property name is p_Photo, not p_photo.
Ger Hayden 17-Apr-20 6:22am View
   
Apart from what I have in the opening line, when I put it into debug the breakpoint in the converter (class ByteArrayToImageSourceConverter) is not hit so I suspect the problem is around that - I am not able to get any closer to where the problem might lie. The code runs cleanly and just ignores the conversion call.

Ger Hayden 26-Feb-20 3:36am View
   
That as it. Much appreciated.
Ger Hayden 20-Feb-20 9:00am View
   
I'm going to have to think about this. Session has privacy issues, and I would have made those worse if I have got the service approach to work. Maybe I need to persist that information to a table. That is something that could morph into a feature - allowing a user to save a purchase without completing it and return to it later.
Ger Hayden 20-Feb-20 8:26am View
   
Hi Richard, I have been using session state with some success - I was trying to achieve the same effect using a service.
Ger Hayden 7-Feb-20 9:27am View
   
That will be the case. If I have to show my code to a prospective employer, it would look much better for this advice.
Ger Hayden 7-Feb-20 6:49am View
   
Never thought of filters - this action will apply to all post requests, and is the first hurdle any post must pass, otherwise it is rejected. Perfect for a filter.
Ger Hayden 7-Feb-20 6:46am View
   
That would make an excellent learning exercise.
Ger Hayden 7-Feb-20 4:51am View
   
If I continue down the helper class route, I will take the instantiation overhead rather than static.
Ger Hayden 16-Jan-20 2:47am View
   
Absolutely correct. Some combination of database calls and paging is going to have to happen. Either I allow entity framework to pull back pages as they are called, use the paged list (as I am currently doing with key bug that needs fixing) or page in javascript.

My preference is the paged list approach.
Ger Hayden 14-Jan-20 10:40am View
   
Yes, if you never leave the page, then it remains cached, I would be happy with that. But I want it gone as soon as the user goes to a new page, and while for now the dataset is small, this is for the eventuality that it becomes too large for caching.
Ger Hayden 18-Dec-19 3:33am View
   
Hi Richard,
Both signatures were identical. The problem was a missing attribute at class level.

Ger
Ger Hayden 6-Dec-19 18:18pm View
   
I will get there - but I would like to see how my C++/CLI some of it more than 10 years old gets on when I port it. If it doesn't behave, the 16.5 here I come...
Ger Hayden 5-Dec-19 16:20pm View
   
I was on 16.2 - and whats better I see they have brought C++/CLI into the fold. I thought that was never going to happen.
Ger Hayden 12-Nov-19 12:34pm View
   
And for the benefit of future readers, this definition is closer to my real solution:
  public class TestSubClass
    {
        public string SampleStr { get; set; }
    }
    public class TestUserParameters
    {
        public string UserName { get; set; }
        public TestSubClass MySubClass {get; set;}
    }
 


and the postman Body
{"UserName" : "testUser", "MySubClass" : {"SampleStr" : "Mysample"}}


Again, thanks to Richard for setting me on the right path.
Ger Hayden 12-Nov-19 12:23pm View
   
Absolutely perfect - the reality is that I will be passing a complex class rather than a simple type and your example sends me in the direction I want to go.
Ger Hayden 12-Nov-19 5:30am View
   
Sorry, that is pretty much what I have been doing (that is how I learned that the stream may be getting hijacked by the logger). I had a quick look at your search string and 3 of the first 5 hits deal with multiple parameters. This is not a multiple parameter scenario, and common fixes like FromBody have been tried to no avail.

I will try block off log4Net and see if that resolves the issue.
Ger Hayden 8-Nov-19 15:46pm View
   
I discovered this after solution one failed by commenting them all out, consulting my copy of Freeman and bringing them back in small groups.
Ger Hayden 7-Nov-19 2:10am View
   
I haven't tested it yet, but these look like my choices,

Using OnModelCreating
             builder.Entity<CConfigMasterBase>().Property(e => e.p_Accept_Changeovers).HasConversion<bool?>(f => f, t => t ?? false);


Or similar to something I've done before (battling the coercion bug in MySQL):
 
        [Column("Accept_Changeovers")]
        public Int16 p_Accept_Changeovers
        {
            get
            {
                return (m_Accept_Changeovers);
            }
            set
            {
                m_Accept_Changeovers = value;
            }
        }
        [NotMapped]
        public bool p_Accept_ChangeoversCoerced
        {
            get
            {
                return (p_Accept_Changeovers == 1);
            }
            set
            {
                p_Accept_Changeovers = value ? (Int16)1 : (Int16)0;
            }
        }



At face value the OnModelCreating is neater, but can I also update the column or is it a read only solution?
Ger Hayden 6-Nov-19 15:26pm View
   
Thanks, I will try that. All the research i did had me thinking it was a straight load. I have used OnModelCreating previously for composite keys. I could also do something with properties and map that way.
Ger Hayden 2-Jul-19 13:02pm View
   
That is doing it.
Ger Hayden 27-Jun-19 1:10am View
   
Thanks Afzaal, Plenty to work with there. This is a page I bolted onto on of the Identity Server examples and the bootstrap / jquery calls are being pulled in automatically.

This is the last part of the _layout.chstml:

@RenderBody()




@RenderSection("scripts", required: false)



My script code was comming in as part of the body rather than the scripts section.

I have corrected that and reduced the function body in each case to just the alert with no success, and when I put it into chrome I see this error:
Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-UT3bVGIVpElFF57vLK9xLpaZaM/Mf01HLSt+X8TN2EA='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

It will probably be tomorrow, but I will move the scripts out to their own file and see how that goes.
Ger Hayden 14-Jun-19 6:18am View
   
I ended up using SQL Server for Identity Server, but I subsequently ran into the same issue on one of my own data stores and this solution was just perfect.
Ger Hayden 13-May-19 10:31am View
   
Bipin Joshi has a working example here. http://www.binaryintellect.net/articles/df920caf-ba69-4714-938f-fbb358532c0f.aspx which I followed for my own work.
Ger Hayden 24-Apr-19 9:01am View
   
I've tried partials and extensions on both the entity and the context, now I'm cloning as per your suggestion. Nothing else was satisfactory.
Ger Hayden 23-Apr-19 5:39am View
   
Thanks Gerry, I'll look into it, but I will need to see if the entity definition is part of the Identity Server Nuget packages, if it is, I am reluctant to change it because it puts me out on my own fork of the code. Now, your last thought, adding it as a Partial might be a winner!
Ger Hayden 23-Apr-19 5:36am View
   
Hi Christian, that is one of my choices, but against it is that every time they publish a change, I have to merge it with my fork.
Ger Hayden 18-Apr-19 2:00am View
   
It doesn't. The offending table, 'aspnetuserlogins' which was part of the migration that comes with the Identity Server examples. I did a Find all on the IS example to illustrate this reply. It is only ever referenced in the migration as is the case with the other Identity related tables. It is using the machinery of Microsoft Identity to manage its data. Using a different key to that table is putting me off. I have gone with reducing the length of the existing key components.

That said, this interaction is becomming increasingly useful as its making me think - I have a 90 minute window twice a day for this stuff and its consumed most of this morning. Since we are talking a key here, the change I have made in reducing the length of the key components comes with risk. Adding a column and deeming it to be the key, say a Guid as per your suggestion. It won't break anything because Identity is not looking for it, particularly If I use the same name, it gaurantees that any reference to it is. I might need some wizardry under the hood to ensure that if there is a query based on it then the same data is retrieved.
Ger Hayden 18-Apr-19 1:17am View
   
Trouble is, I'm not confident enough to go changing said key and risk getting ground up in the gears of Identity Server or Microsoft Identity. My original response stems as much from frustration with that restriction as any other. Also to your credit, it was Richard who used the T word.
Ger Hayden 18-Apr-19 1:05am View
   
Could someone please do an audit of my interaction with this forum and point out what marks me as troll - or a bigot? Neither are something I would intentionally set out to be. If there was an error in my response to this solution it is that this key has its origins in Microsoft rather than Identity Server. The solution offered in this thread is both useless and unhelpful. I gave up searching for it on Stackoverflow because I got tired of reading key choice criticisms rather than any attempt to explain why 1 + 1 > 4. Kudos to GKP1992 for actually digging one out.
Ger Hayden 17-Apr-19 4:36am View
   
That might just be it. I will need to read it a little more carefully but at a glance it looks promising.
Ger Hayden 16-Apr-19 13:02pm View
   
To be precise, how do I change the encoding so that a composite key of 1600 does not exceed the 3072 limit? I have updated the question with more detail.
Ger Hayden 16-Apr-19 1:52am View
   
You may take that up with Brock Allen & Dominick Baier at IdentityServer.io - It's a migration from thier sample code. My only intervention was to apply it to MySql.
Ger Hayden 21-Mar-19 2:24am View
   
The workaround published here https://github.com/dotnet/corefx/issues/23686 will do. I cant publish my solution yet because I have a key length error in the decryption now...
Ger Hayden 20-Mar-19 17:09pm View
   
It all compiles, but at run time it gives a message saying that it is not implemented on this platform. Its a known issue.
Ger Hayden 4-Mar-19 3:38am View
   
I'll try that later today when I get the day job behind me. Its exactly what I am looking for.
Ger Hayden 16-Dec-18 14:16pm View
   
I've just posted a workaround
Ger Hayden 14-Dec-18 16:04pm View
   
Checked that. Since I wrapped up for the day, it occurred to me that this is my first time accessing a table with an enumerated data type. That's trouble! I found something that might work on Stackoverflow https://stackoverflow.com/questions/44262314/how-can-i-make-ef-core-database-first-use-enums/48237275

If that fails then I may have to dust off my data handler module for that table that is part of the suite that have served the winform part of the system since the .NET migration in 08. They were only set aside to make room for me to learn EF core.
Ger Hayden 14-Dec-18 12:29pm View
   
Something I will consider going forward, but for now it is not relevant to the problem at hand because it persists even when the date fields are removed from the query. This is one of many similar queries where all the others perform as expected. It is a subtle difference that remains to be spotted.
Ger Hayden 14-Dec-18 6:11am View
   
That particular nasty originated in 2005 when it was not possible (or I did not know how) to have a null value in a MySQL Datetime field and has carried forward since. From what I can see there are still some issue around the same. In the meantime I will strip out the date conditions and hardcode the expiry ID to 1 then see what happens and report back
Ger Hayden 31-Oct-18 18:08pm View
   
I've worked around the issue by reverting to the last commit, but I am interested in opinions on what may have caused it.
Ger Hayden 25-Oct-18 1:08am View
   
It was the missing Hiddens. Much appreciated.
Ger Hayden 24-Oct-18 16:46pm View
   
Thanks Richard, I was about to write that I already have the @Html.Hidden for all properties including those two when that little voice suggested checking the cshtml first. They are not there! Interesting use of the property, I'll add them and try your suggestion on the property in the morning and report back.
Ger Hayden 12-Oct-18 6:45am View
   
I'm happy with slow and the concept of faking the hash time in the event of an invalid username being provided to disguise that Bcrypt has not fired. Is it any better than the hashing that comes as standard with Identity?
Ger Hayden 4-Oct-18 7:02am View
   
Yes, its my internal training project.
Ger Hayden 19-Sep-18 13:02pm View
   
Its a solution! Put it in the Solution box so that I can accept and rate it.
Ger Hayden 19-Sep-18 4:15am View
   
Hi Maciej, I will be trying that this evening (once I get the day job out of the way). I have only just learned that this is possible.
Ger Hayden 7-Sep-18 9:33am View
   
True, the date comparison is the easy part. The difficulties lie in supplying a seed date to the analyzer, and getting the last modified date of the source file, say as opposed to the date it was checked out of source control.

Another option I am considering is to only apply the rule if the code has changed since the last run of the rules - if I can come up with an efficient convention for marking a code file as 'Analyzed'.
Ger Hayden 19-Apr-18 7:09am View
   
Thank you lw@zi, I should be able to change the URL to use query string. I will need to investigate how, but since it is my own project I have full control over what I try. This is the answer I needed to this question.
Ger Hayden 19-Apr-18 7:07am View
   
Yes, if I persist with having each in its own view component because the selection is needed to refine the other dropdowns. But I'm thinking if I go with partials I might be able get around that.

My immediate requirement is to establish if what I have outlined is possible. If so then I will invest time in figuring it out but if not, then I try something else like partials.

I am not looking for suggested solutions or sample code at this point.
Ger Hayden 19-Apr-18 3:44am View
   
Drop downs are bus routes, start stage, end stage and ticket type. Most passengers are expected to start from route and proceed logically but I want to allow passengers who are served by differnt routes to start with the ticket type because not all tickets will be available on all routes. MVC Routes and Bus Routes are bound to get confusing.
Ger Hayden 28-Sep-17 9:17am View
   
This is code that predates my time in the organisation - I don't know what library underpins it, if any. However I have a leave event on one page and an enter event on the next one now and I can hit them at run time. I just need to figure out how to have them communicate because they were architected to be independent and ignorant of each other.
Ger Hayden 4-Jul-15 11:16am View
   
Hi Phil,

My investigations did little more than highlight the limits of my knowledge!

Ger
Ger Hayden 4-Jul-15 6:37am View
   
This is the CSPROJ from SharpMrcMain. I can see the "Log.Debug.config" but it's outside the compile block

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<ProjectGuid>{AE7247D6-6E76-4C64-8085-3FEE43AF1D97}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>SharpMrc</RootNamespace>
<AssemblyName>SharpMrc</AssemblyName>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\SharpMrc.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
<OutputPath>..\..\..\..\bin\</OutputPath>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<StartupObject>SharpMrc.SharpMrcMain</StartupObject>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Globalization#CA1303</CodeAnalysisRules>
<ApplicationIcon>..\..\..\Images\Locomotive.ico</ApplicationIcon>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\..\Libraries\ICSharpCode.Core\ICSharpCode.Core.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\..\packages\log4net.2.0.3\lib\net20-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<None Include="Configuration\AssemblyInfo.template.cs" />
<Compile Include="Src\SharpMrcMain.cs" />
<Compile Include="Src\SplashScreenForm.cs">
<SubType>
Ger Hayden 4-Jul-15 4:50am View
   
Hi Phil.

That is what I have to check. When I last tried it all I did was the Project > Add Existing Item

Ger
Ger Hayden 3-Jul-15 15:35pm View
   
However - there are a few extra tricks in your link that I will have to explore...
Ger Hayden 3-Jul-15 15:34pm View
   
I forgot to mention I have added the file to the project but it did not resolve the error.
Ger Hayden 21-Sep-14 6:11am View
   
Hi Bill,

I've seen that video/article among others. Trouble is even when I click Turn On Now in the action center, the button flickers but nothing else happens.

Ger
Ger Hayden 21-Jun-14 11:53am View
   
See my comment above - works from browsers launched via desktop but not from the Win8 dashboard!
Ger Hayden 21-Jun-14 11:53am View
   
Everything present and correct there - and it works in firefox, chrome and IE10 from the desktop. Just not from the windows 8 start page which is where I was looking!
Ger Hayden 21-Jun-14 11:45am View
   
Hi Peter,

I've been to various pages online and they all say the same thing - inluding this link. But it still does not appear.
Ger Hayden 21-Jun-14 11:35am View
   
The manager says yes, but http://Localhost is not finding it.
Ger Hayden 6-Jun-14 17:23pm View
   
Apologies - omitted the declaration from the OP, but I've added it now. The C# is from a working example, so it's good.
Ger Hayden 7-Mar-13 3:55am View
   
This is waht I settled on - thanks for the steer:
<pre>
echo on
echo %DATE%
echo %TIME%
set Z=%time:~0,1%
ECHO FIRST TEST
if 1 NEQ %Z% ECHO GOTO NEQ1
GOTO TIMELABEL
:NEQ1
ECHO AT NEQ1
if 2 NEQ %Z% ECHO goto NEQ2
GOTO TIMELABEL
:NEQ2
ECHO AT NEQ2
SET Z=0
:TIMELABEL
set newtime=%Z%%time:~1,7%
echo %newtime%
</pre>
Ger Hayden 11-Jan-13 5:13am View
   
I think I have it solved by serializing the class. I need to iron out a few things before adding a solution.
Ger Hayden 26-Nov-12 3:54am View
   
Perfect. This DC is only to be used to supply various comms details on the message header rather than mixing them in with the business data that will be exchanged. The body of the implementing method is just ";" but that is all that is needed in this case!
Ger Hayden 25-Nov-12 13:43pm View
   
I have made this change with no improvement:
<pre>
public string PublishToAddress { get; set; }
</pre>
Ger Hayden 25-Nov-12 13:21pm View
   
Hi,

No - And I cannot see where it is done in Dennis Van der Stelt's example. I can see him use it as as parameter to a method but not exposed in its own right.
Ger Hayden 6-Oct-12 14:21pm View
   
No they would be quite equal. All clients will feed in logs as well as sales/validation. The logs will not be redistributed. Customer accounts will only live in the back office and only the balance will ever reach the clients.
Ger Hayden 6-Oct-12 5:06am View
   
I've taken a look at the FEDERATED Solutions. The client databases will be on busses and constant connectivity cannot be gauranteed.
Ger Hayden 6-Oct-12 5:04am View
   
I will have a fixed number of known clients.
Ger Hayden 3-Jul-12 3:43am View
   
Thanks Again Sergey. The translation was no difficutly - but I hit an issue with "SetUpSomeMethod" because I am using a loop. The compiler didnt want me making new function definitions in it! I assume that if the loop were to call an instance of a new class to conduct its functionality on each iteration then you solution would work as is. I had about 90 minutes with it on the way to work this morning. I'll explore some more on the route home.

I have also found that since all I need is an ID, I can cheat by passing it to Process_btnCancelThisValidation as the button name...which works until I need a second piece of data, then I have to look at applying your solution.
Ger Hayden 2-Jul-12 14:51pm View
   
That too! Got it now. I'll go through it in the morning. Much appreciated.
Ger Hayden 2-Jul-12 14:37pm View
   
The problem is a lack of ability on my part...
Ger Hayden 26-Jun-12 3:20am View
   
Perfect. Its the only install package that blindly defaults to whereever! The only reason I can think of as to why the Canon print folder is that that was the previous install when I first put 5.5 on.
Ger Hayden 26-Jun-12 3:18am View
   
Done that - helped get a new clean install. Now if I can only get the instance configurator over the line....
Ger Hayden 10-Mar-12 6:09am View
   
Hi Purnananda,
It would be well worth your while looking at the express versions of VC++ 08, 10 or even 12 where you have the ease of .NET - but if you need MFC then it would have to be full versions of Visual Studio.
Ger Hayden 8-Mar-12 3:38am View
   
Excellent train of thinking and similarly a Route has Stages...

But a stage is a constituent of the route!
Ger Hayden 8-Mar-12 3:35am View
   
Ivor Hortons Intro to C++ using VS2008, and Stephen Fraser's Introdcing Pro C++/CLI using .NET 3.5 under VS2008. But they were a couple of years back. I'm now workng through Andrew Troelsons C# for VS2010 tome. Just reaching the class chapters this weekend.
Ger Hayden 24-Feb-12 0:54am View
   
Deleted
I checked th GAC, and fixed the paths. Did a rebuild all and no joy. A text search finds no reference to 6.3.6 anywhere, but it is still showing up in the console compile:
1>------ Build started: Project: VT_Console, Configuration: Debug Win32 ------
1>Build started 24/02/2012 05:44:25.
1>ResolveAssemblyReferences:
1> Consider app.config remapping of assembly "MySql.Data, Culture=neutral, PublicKeyToken=c5687fc88969c44d" from Version "6.3.6.0" [] to Version "6.4.4.0" [C:\Program Files (x86)\MySQL\Connector NET 6.4.4\Assemblies\v4.0\MySql.Data.dll] to solve conflict and get rid of warning.
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1490,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
1>InitializeBuildStatus:
1> Creating "Debug\VT_Console.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>ClCompile:
1> All outputs are up-to-date.
1> All outputs are up-to-date.
1> All outputs are up-to-date.
1>CoreResGen:
1> Processing resource file "Form1.resX" into "Debug\VT_Console.Form1.resources".
1>ResourceCompile:
1> All outputs are up-to-date.
1>Link:
1> VT_Console.vcxproj -> C:\SBSB\systems\debug\VT_Console.exe
1>PostBuildEvent:
1> 1 file(s) copied.
1>FinalizeBuildStatus:
1> Deleting file "Debug\VT_Console.unsuccessfulbuild".
1> Touching "Debug\VT_Console.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:05.77
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


This is app.config:
<pre>

<configuration>
<connectionstrings>
<add name="SQLConnection"
="" connectionstring="Server=localhost;
user id=root;
password=gh30subs;
persist security info=True;
database=vendatic" providername="System.Data.SqlClient">

<!--For COM Interfacing-->
<!--ComConnection User="root" Password="gh30subs" Host="localhost" database="vendatic" /-->
<!-- Consider removing from released version-->
<!--system.windows.forms jitDebugging="true" /-->
</pre>
Ger Hayden 5-Jan-12 14:40pm View
   
<pre> radioButton1->Text = L"New Text";</pre>
is not working.
the debugger shows it successfully assigned, but the form still shows the original value
Ger Hayden 5-Jan-12 14:35pm View
   
Heres the code
<pre> myRadioButton->Text = L"New Text";</pre>
The debugger shows the new value successfully assigned, but the form still shows the original value.
Ger Hayden 12-Nov-11 9:48am View
   
This link has promise. Will read it in detail and see if it provides the answer
Ger Hayden 12-Nov-11 9:48am View
   
No - this challenge is within the confines of a datagridview
Ger Hayden 14-Sep-11 14:38pm View
   
5 back!
Ger Hayden 10-Sep-11 7:58am View
   
I am using MySqlTransaction very successfully, in scenarios where a sale might hit 5 or 6 tables but if it doesnt go through fully then everything has to be rolled back. Its an excellent approach. I have also included commit and rollback buttons on my forms where users are updating information.
Ger Hayden 1-Aug-11 9:58am View
   
I am writing up an article on saving a datagrid to XML - I am on leave at the moment but I will resume working on it next week.
Ger Hayden 24-Jul-11 6:50am View
   
You have the makings of a good introductory article when you get this working.
Ger Hayden 19-Jul-11 0:31am View
   
Hmmm,and what if the tutor keys the question into google. Likely to arrive exactly here...
Ger Hayden 13-Jul-11 5:39am View
   
Watching this with interest. In time I am going to have to do something similar with my ticketing system, where individual services notify home office of tickets purchased and used when operating in stand alone mode while also receiving from home office details of all tickets purchased or used on other services for use in the next standalone session. But it will be MySql to MySql.
Ger Hayden 12-Jul-11 14:32pm View
   
OK, so what is wrong with this. The OP put the question up twice, and having answered it felt that a link to the original answer was in order rather than cut and paste.
Ger Hayden 12-Jul-11 4:22am View
   
Thanks - I'll write them out 10 times (without using copy and paste).
Ger Hayden 9-Jul-11 7:40am View
   
The Irish government has one sitting new and unused for the past 10 years or so...
Ger Hayden 8-Jul-11 6:44am View
   
Faced with a similar challenge, I gave up and migrated to .NET where everything including saving a BLOB to MySql is so much easier.
Ger Hayden 28-Jun-11 16:11pm View
   
Perfect Graham. I am going to have to review other queries and either include quotes or go YYYYMMDD because I have unreliable results using YYYY-MM-DD without quotes. The problem with unreliable as opposed to consistant is that they can give the illusion of correct in a lightweight test.
Ger Hayden 22-Jun-11 3:14am View
   
Hi Premkumar,
After a further two hours of experiment with the Paint and RowPostPaint events, I now have an acceptable work around.
RowPostPaint is closer to what I want than CellBeginEdit.

Meantime comments on the reentrant issue are still welcome
Ger Hayden 22-Jun-11 0:30am View
   
Apologies premkumar - got you confused with another poster - this is the cellbeginedit code:
<pre>
if(Set_some_cells_readonly && (e.ColumnIndex == 0
|| e.ColumnIndex == 1
|| e.ColumnIndex == 2))
{
// The cells must be set readonly otherwise edit proceeds as normal
// even with an e.cancel - all that does is kill the begin process
dgv.Rows[e.RowIndex].Cells[0].ReadOnly = true;
dgv.Rows[e.RowIndex].Cells[1].ReadOnly = true;
dgv.Rows[e.RowIndex].Cells[2].ReadOnly = true;
dgv.CurrentCell.Selected = false;
// It is not enough to end the edit, we must leave the cell otherwise
// it remains in write mode for this turn and only becomes readonly
// after this edit event ends.
dgv.CurrentCell = nullptr;
return; // just in case any other code 'slips in' at a later date
}
else
{
dgv.Rows[e.RowIndex].Cells[0].ReadOnly = false;
dgv.Rows[e.RowIndex].Cells[1].ReadOnly = false;
dgv.Rows[e.RowIndex].Cells[2].ReadOnly = false;
}
</pre>
Ger Hayden 22-Jun-11 0:25am View
   
Good morning,
My solution is simpler than Clay's on this link - but using CellBeginEdit doesnt get me past what I was the reentrant issue. Scrolling down, Linda Liu's offering might just do. Meantime I will post my CellBeginEdit as a proposed answer to your question.
Ger Hayden 21-Jun-11 10:35am View
   
Thanks - thats right along the lines of what I was thinking - has it worked?
Ger Hayden 14-Jun-11 3:07am View
   
Apologies Chris and anyone else investigating this one - it belongs in the hall of shame - theres a rogue ; at the end of the third line.

Chris - I am accepting your solution to 'Close' the question.
Ger Hayden 14-Jun-11 0:24am View
   
Hi Chris,
That should not happen in practice, any given stage can only occur once on a route and so will have a unique sequence number. The sequencenumber is introduced to allow flexibility in reorganizing routes. If this were a real example, Stages 1 and 3 would have been shortened where they meet with the gab becomming a new stage - the next ID being 7, which it why the sequence in 1, 7, 3. (Stage 2 is long moved to a differant route).
Ger Hayden 5-Apr-11 15:42pm View
   
I have just updated the key request in the question, bearing in mind that ArgKey value will only be a six line if-else construct.
Ger Hayden 5-Apr-11 15:40pm View
   
Apologies if the english is not Oxford Standard, but your interpretation is not far off the mark. A small code footprint is attractive, but if it is going to run more slowly than any other option then it is off the table.
Ger Hayden 5-Apr-11 15:34pm View
   
No - It will ever only be int or String^
Ger
Ger Hayden 18-Mar-11 18:53pm View
   
Most development enviromnets have an option to run in debug mode e.g. F5 will do it in Visual Studio.

Now if you are working from the command line it may not be possible, then I recommend writing your query to the screen immediately before you execute it so that you can copy it from there.
Ger Hayden 5-Mar-11 18:01pm View
   
Thanks for a superbly detailed answer - It will take me a while to apply it. Its late at the end of a long week. I had hoped that the XSD.exe would have kicked out accurate code...
Ger Hayden 28-Jan-11 7:05am View
   
Will give this a shot this afternoon
Ger Hayden 21-Jan-11 3:27am View
   
No, I tried that in advance of posting the question. The rowvalidation occurs first.
Ger
Ger Hayden 5-Jan-11 9:34am View
   
I've just voted on 4 of the 5 anwsers. I'll have to look at the other later. Nothing less than a 4 awarded. Trouble is all those 1's are weighing down some very specific, accurate and helpfull answers
Ger Hayden 5-Jan-11 9:33am View
   
As with Ans 3, its what I needed to look up but the Rumsfeld factor got me
Ger Hayden 5-Jan-11 9:32am View
   
Perfect, as is Ans 1
Ger Hayden 5-Jan-11 9:30am View
   
I am. But I was having a Donald Rumsfeld moment.
Ger Hayden 5-Jan-11 9:28am View
   
Perfect. Exactly what I want. Looking at it I was sceptical about getting a value up out of T2 but it is a thing of beauty in its simplicity.