NewsDemon Banner

And thus begins my foray in to X++ development for Dynamics AX 2009. Here’s a proof of concept Job that I created to stuff multiple values into a Map using a Container. This allows me to lookup a few customer details without repeatedly making trips back to CustTable.

static void MapContainerTest(Args _args)
{
    Map                     custNotesMap;
    Container               custContainer;
    CustTable               custTable;
    SalesSourceSystemId     admarcSystemId = "DPRADM";
    Container               conCustDetails;
        str                     admarcAccountId = "000123456";
    ;
 
    custNotesMap = new Map(Types::String, Types::Container);
    while select AdmarcAccountId, RecId, TableId, dataAreaId, PartyId from custTable where custTable.AdmarcSystemId == admarcSystemId
    {
        custContainer = conNull();
        custContainer = [custTable.RecId, custTable.TableId, custTable.dataAreaId, custTable.PartyId];
 
        custNotesMap.insert(custTable.AdmarcAccountId, custContainer);
    }
 
    if (custNotesMap.exists(admarcAccountId))
        conCustDetails = custNotesMap.lookup(admarcAccountId);
    else
        error("Customer not found.");
 
    info(strfmt("RecId: %1", conpeek(conCustDetails, 1)));
    info(strfmt("TableId: %1", conpeek(conCustDetails, 2)));
    info(strfmt("dataAreaId: %1", conpeek(conCustDetails, 3)));
    info(strfmt("PartyId: %1", conpeek(conCustDetails, 4)));
}

In fact, it’s pretty fast and I’m using similar caching technique all over the place to speed up large jobs.

Although the last article on running a VirtualBox server gets you up and running with a minimum installation, there are several things that can be configured or installed to make the experience of managing a VirtualBox server much easier.
Read the rest of this entry »

Thanks to my friend Paul Mayle for putting this one out there:

Given a table with columns:
A: int, primary key, identity
B: int, not null

How can I set a default for column B to be the value in column A?

This is an interesting problem on a couple levels. First, a computed column won’t work, because we need the ability to arbitrarily update column B. We could program a trigger, but I prefer to avoid them when possible. Preferably, we could actualize the purpose of the DEFAULT option. Unfortunately, this isn’t immediately an apparent choice because SQL Server doesn’t allow you to reference a column in a DEFAULT specification. In fact, according to BOL, “Only a constant value, such as a character string; a scalar function (either a system, user-defined, or CLR function); or NULL can be used as a default.”
Read the rest of this entry »

Both VirtualBox and Ubuntu have drastically changed since I wrote HOWTO: Ubuntu VirtualBox Server. In fact, they’ve change to such a degree that the previous article isn’t even relevant. Fret not, as I’ve rebuilt the guide from scratch based on Ubuntu 9.10 Karmic Koala and VirtualBox 3.1.2, which has since been upgraded to 3.1.4.

The only assumptions I’m making is that a fresh, recent version of Ubuntu is installed on some relatively recent hardware and you have an ISO of the OS installation. Ideally, you’re using an Intel Core 2 Duo or better. I installed it with a normal Desktop Edition, but this guide is targeted at command-line management. You’re welcome to install Server Edition in which you’re getting a command-line only version of Ubuntu to reduce system requirements and operate with utmost efficiency.
Read the rest of this entry »

If you’ve previously connected to an ssh server on a machine and reformatted or fundamentally changed the OS in some way, the RSA host key will have changed, causing ssh to throw up an ugly error as exhibited here:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
8b:ff:a1:b5:32:06:4d:fd:2e:2f:67:80:9e:ba:8d:ff.
Please contact your system administrator.
Add correct host key in /home/taylorg/.ssh/known_hosts to get rid of this message.
Offending key in /home/taylorg/.ssh/known_hosts:2
RSA host key for 192.168.1.100 has changed and you have requested strict checking.
Host key verification failed.

All the message says is that the fingerprint for the host that was previously stored no longer matches the target. If you know this is okay and want to clear out the error, the process is very simple – just remove the stored fingerprint.
Read the rest of this entry »

  • shiva ramani: good instruction. How to push data to MySQL from SQL 2005 [...]
  • Winkey: I've created a linked server for mysql successfully, and also can do Insert, Select. But when I try [...]
  • RaghuRam: Thanks a lot buddy it helped me to change the root password when I got the error trying to c [...]
  • Taylor Gerring: If you're on a 64-bit OS, did you run the 32-bit version of ODBC applet? Run: odbcad32 [...]
  • Taylor Gerring: If the issue is the guest sync'ing to the host, can't you just force time sync the host if you can't [...]


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States.