Archive for September, 2009

ODBC Administrator Tool for 64-bit OS

Thursday, September 24th, 2009

Both the 32-bit and 64-bit versions of the Microsoft Open Database Connectivity  (ODBC) Administrator tool display both the 32-bit user DSNs and the 64-bit user DSNs in a 64-bit version of the Windows Operating System.

A 64-bit version of the Microsoft Windows Operating System includes the following versions of the ODBC Data Source Administrator tool (Odbcad32.exe):

  • The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
  • The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.

The Odbcad32.exe file displays the following types of data source names (DSNs):

  • System DSNs
  • User DSNs

The 32-bit version of the ODBC Administrator tool displays 32-bit system DSNs, 32-bit user DSNs, and 64-bit user DSNs. The 64-bit version of the ODBC Administrator tool displays 64-bit system DSNs, 32-bit user DSNs, and 64-bit user DSNs.

To work around this problem, use the appropriate version of the ODBC Administrator tool. If you build and then run an application as a 32-bit application on a 64-bit operating system, you must create the ODBC data source by using the ODBC Administrator tool in %windir%\SysWOW64\odbcad32.exe. To indicate the type of DSN, you can add “_32″ to the 32-bit user DSNs and “_64″ to the 64-bit user DSNs.

The 64-bit ODBC Administrator tool can be invoked from Control Panel to manage user DSNs and system DSNs that are used by 64-bit processes. On a 64-bit operating system, the 32-bit ODBC Administrator tool is used for Windows on Windows 64 (WOW64) processes. You must directly invoke the 32-bit ODBC Administrator tool from the SysWoW64 folder. You can use the 32-bit ODBC Administrator tool to manage user DSNs and system DSNs that are used by WOW64 processes.

VN:F [1.0.8_357]
Rating: 6.0/10 (1 vote cast)

Share/Save/Bookmark

Scripting SQL 2008 Objects and Data with Backward Compatibility

Wednesday, September 23rd, 2009

I had a chance to work with a 3rd-Party tool that dumps data into SQL Server.  An issue came up because it only works with SQL Server 2008. In order to support a customer case, I had to have that data in SQL Server 2005 (it doesn’t happen often to take you too much time to migrate data from a newer version of SQL Server to the older one).

Luckily, SQL Server 2008 has a great feature. The feature is Generating Scripts. It makes it possibile for users to generate script for creation of any scope of database objects very easily.

The feature is accessed by right clicking the database then choosing “Tasks >> Generate Scripts”. The wizard is very intuitive and enables the creation of script compatible even with SQL Server 2000 - which generates the whole database, with all tables, data in tables, indexes, triggers, stored procedures, collations, and anything else that comes to mind.

In my case, I was not able to do this through Access, Excel or any other way. Without this feature I, the case would be stuck.

VN:F [1.0.8_357]
Rating: 0.0/10 (0 votes cast)

Share/Save/Bookmark

New DATETIME Data Types in SQL 2008

Thursday, September 17th, 2009

With new versions of any software comes the new features. That brings us some benefits when we work only with new software version but it might bring us some headaches if we have to maintain compatibility with older versions. Anyhow, we have to utilize the advantages of new versions where ever we can so the first step toward that goal is to learn what the new features are and what they offer.

One of the new function’s regarding DATETIME in SQL Server 2008 are four new data types introduced. They are DATE, TIME, DATETIMEOFFSET and DATETIME2.

The great article which describes what those data types offer and what are the changes in standard function libraries is:
http://www.sql-server-performance.com/articles/dev/datetime_2008_p1.aspx

It provides very detailed explanation for most of the new functionalities that those new data types bring. I highly recommend it.

VN:F [1.0.8_357]
Rating: 0.0/10 (0 votes cast)

Share/Save/Bookmark

Save 10% on Dynamics AX Development Projects

Monday, September 14th, 2009

Merit Solutions is proud to announce a 10% discount on all Microsoft Dynamics AX Development projects engaged by October 31, 2009! Maximize your investment in Microsoft Dynamics AX while reducing your operating costs. Reap the benefits of hybrid fixed-price offshore custom development while enjoying the security and simplicity of working with a local 2009 President’s Club Member. Contact Merit Solutions to take advantage of this opportunity - or visit us at the AXUG Summit in Booth 512!

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

Share/Save/Bookmark

InfoPath and MOSS Web Services

Friday, September 11th, 2009

InfoPath form templates in MOSS are widely used because there are many reasons that empower both servers.

The most common situation is that you need to pick-up some user information from MOSS and show / manipulate it on an InfoPath form. There are a few possible ways to make it work, with or without coding. The most powerful thing is by using web services provided by MOSS.

To be able to use web services in InfoPath, you should create a new Data Connection (Tools-> Data Connection). When the wizard starts, define what you would like to do with the data: submit or receive. Select Web services as a source of data and define the web service’s location. For getting user profile information (email, phone number, preferred name, etc) use MOSS services located at http://MOSSServerName/_vti_bin/UserProfileService.asmx.

  • This service is not available if you are using Windows Share Point Services but only Microsoft Offices SharePoint Server.
  • Some of available public methods are listed below:
    • AddColleague
    • AddLink
    • AddMembership
    • AddPinnedLink
    • CreateMemberGroup
    • CreateUserProfileByAccountName
    • GetCommonColleagues
    • GetCommonManager
    • GetUserLinks
    • GetUserProfileByGuid
    • GetUserProfileByIndex
    • GetUserProfileByName
    • ModifyUserPropertyByAccountName
    • RemoveMembership
    • UpdatePinnedLink, etc.

Moving forward, you can take the profile data for any current or other MOSS user. For users currently logged on, you should be able to pick-up some profile info when the form is loading. For non-current users, you have a lot different cases and you can pick data on the field value changed or drop down list value selected or something else.

If you need to handle some of the available events, you should have VSTA installed (Visual Studio Tools for Applications). If you do not have it, you will not be able to create event handlers at all. To enable it, find Microsoft Office in list of Add/Remove programs. Select Change option and add find those tools for InfoPath. Select the option to install it.

Now you can create event handlers by selecting a control, right click on it, then Programming and selecting the desired event. The most interesting case is if you have a drop down list with a few names and you would like to send an email to the selected one. Before we continue, just to note that the drop down list item has a Value and a Display Name. This can give us the possibility to hide non user-friendly data. So, if you decide to get email defined in MOSS for selected user, assign the Account Name as Value for each item in the drop down. Display value can be as you wish…

When VSTA is running, add reference to UserProfileService and name it. Code in the event handler should look like:

XPathNavigator XPathNav = MainDataSource.CreateNavigator();

 

ServiceReferenceName.UserProfileService profile = new ServiceReferenceName.UserProfileService();

   profile.UseDefaultCredentials = true

   profile.PropertyData[] userProperties = null;

 

    try {

              userProperties = profile.GetUserProfileByName(SelectedDDLValue);

    }

    catch { }

 

    if (userProperties == null || userProperties.Length == 0) {

        return;

    }

    for (int i = 0; i < userProperties.Length; i++) {

        XPathNavigator node = null;       

            case “workemail”:

                node = XPathNav.SelectSingleNode(“/my:emailField/my:userEmail”, NamespaceManager);

                break;

            default:

                continue;

        }

       ServiceReferenceName.ValueData[] values = userProps[i].Values;

        if (values.Length > 0) {

            if (node != null && string.IsNullOrEmpty(node.Value)) {

                node.SetValue(values[0].Value.ToString());

            }…

The email field can be hidden or visible, it depends on what information you would like to share with the user.

  • In some cases, you can experience that drop down list events do not react as you expect. Try to avoid this by setting “Always Postback” option on drop down list property.
VN:F [1.0.8_357]
Rating: 7.7/10 (3 votes cast)

Share/Save/Bookmark

Problem Solving in Microsoft Dynamics AX

Tuesday, September 8th, 2009

I found a nice article on the Art of Creation Dynamics AX Blog. It discusses things you can try (in the order the author does it) to resolve issues while developing for Dynamics AX.

Here are a couple of ideas discussed:

Close the debugger
Sometimes, when the debugger is active, AX will keep executing ‘old’ code. Close the debugger to make sure the latest code is executing.

Synchronize data dictionary
You may have made changes to application objects that haven’t been synchronized with the database. Open the AOT, right click on the Data Dictionary node and choose Synchronize.

Refresh AOD, Dictionary and Data
You can flush cashed information using three option in the Tools > Development tools menu: refresh AOD, refresh Dictionary and refresh Data. This can be useful when you just imported an xpo file, or when you are developing for the enterprise portal.

Remove .aoi file
When the AOS is stopped, you can delete the .aoi file from the application files. This file will be rebuilt when the AOS starts.

Use the link above to see the rest!

VN:F [1.0.8_357]
Rating: 7.0/10 (3 votes cast)

Share/Save/Bookmark