Cannot convert value "......." to type

I'm running the following script on Exchange 2010. The script reads 3 text files and then removes everyone from the Distribution Group / Universal Distribution Group  "Messages Delivery Restrictions - Accept Messages Only From" before adding
a new list of users
$People = gc C:\ps_scripts\Staff_Aliases.txt
$UDGroups = gc C:\ps_scripts\Universal_Distribution_Groups.txt
$DDGroups = gc C:\ps_scripts\Dynamic_Distribution_Groups.txt
ForEach ($UDGroup in $UDGroups) {
   Set-DistributionGroup $UDGroup -AcceptMessagesOnlyFrom $null
   Set-DistributionGroup $UDGroup -AcceptMessagesOnlyFrom((Get-DistributionGroup $UDGroup).AcceptMessagesOnlyFrom + $People)
ForEach ($DDGroup in $DDGroups) {
   Set-DynamicDistributionGroup $DDGroup -AcceptMessagesOnlyFrom $null
   Set-DynamicDistributionGroup $DDGroup -AcceptMessagesOnlyFrom((Get-DistributionGroup $DDGroup).AcceptMessagesOnlyFrom + $People)
and I'm getting the following error:
Cannot convert value "a.abcd h.qwerty staff-abc staff.bcd" to type "Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Configuration.Tasks.DeliveryRecipientIdParameter
]". Error: "Cannot convert value "" to type "Microsoft.Exchange.Configuration.Tasks.DeliveryRecipientIdParameter". Error: "Parameter values of type Microsoft.Exchange.Configuration.Tasks.DeliveryRecipientIdParameter can't
be empty. Specify a value, and try again.
Parameter name: identity""
    + CategoryInfo          : InvalidData: (:) [Set-DynamicDistributionGroup], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-DynamicDistributionGroup
I'm getting the content from three text files, the first contains the User Alias and the 2nd/3rd contain the Universal and Dynamic Distribution Groups.
This is an exact copy and paste from the EMC screen and I know that the script should work but I can't see what I'm doing wrong
Help or ideas please
Darryn

Set-DynamicDistributionGroup $DDGroup -AcceptMessagesOnlyFrom((Get-DistributionGroup $DDGroup).AcceptMessagesOnlyFrom + $People)
Look closely at this line.  Read the documentation to see how it is used.
What you h ave typed makes no sense and I cannot understand what you want to do with this.
Start here for a tutorial on how to use these CmdLets:
http://blogs.msdn.com/b/ukeducloud/archive/2011/10/05/dynamic-distribution-groups-part-1.aspx
http://blogs.technet.com/b/educloud/archive/2011/10/06/dynamic-distribution-groups-part-2.aspx
¯\_(ツ)_/¯

Similar Messages

  • Java.sql.SQLException: Cannot convert value

    I have a database table - name is client. It has one field with TimeStamp Datatype.
    I am using mysql-3.23.51-win and j2sdk-1_4_0_01-windows-i586.
    create table client (
    MODIFIED timestamp(14)
    while I am doing select MODIFIED from client that time I am receiving 00000000000000.
    So It has 00000000000000 value in databse.
    Now I am getting this value using ResultSet. for that
    I have a one Client Object class name is GenericClient
    public class GenericClient {
    private java.util.Date _modified;
    public java.util.Date getModified() {
    return _modified;
    public void setModified(java.util.Date newVal) {
    this._modified = newVal;
    In my database processing class I am getting database value and set that value in setModified(java.util.Date newVal).
    like
    private Client decodeRow(ResultSet rs) throws SQLException {
    GenericClient obj = new GenericClient();
    obj.setModified(rs.getTimestamp(1));
    return obj;
    So at obj.setModified(rs.getTimestamp(1)); line I am received error message
    java.sql.SQLException: Cannot convert value '00000000000000' from column 1 to TIMESTAMP.
    Please guide me why I am receiving the above error.
    Thanks
    Amit

    Please find some more information from my side
    1) I am passing Timestamp Object
    2) I am using PreparedStatement
    3) code
    Table : client
    create table client (
         MODIFIED timestamp(14)
    );Bean Class
    public class GenericClient {
         private java.util.Date _modified;
         public java.util.Date getModified() {
              return _modified;
         public void setModified(java.util.Date newVal) {
              this._modified = newVal;
    }Method - which is fired error
    private Client decodeRow(ResultSet rs) throws SQLException {
         GenericClient obj = new GenericClient();
         obj.setModified(rs.getTimestamp(1));
         return obj;
    }3) Error Stack
    ==========
    java.sql.SQLException: Cannot convert value '00000000000000' from column 1 to TIMESTAMP.
            at com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:5538)
            at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:5566)
            at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5219)
            at com.ksea.manager.ClientManager.decodeRow(ClientManager.java:463)
            at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:266)
            at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:221)
            at com.ksea.manager.ClientManager.loadByWhere(ClientManager.java:203)
            at com.ksea.manager.ClientManager.loadByUsername(ClientManager.java:53)
            at com.ksea.nt.DBSynch.synchEmployees(DBSynch.java:83)
            at com.ksea.nt.DBSynch.synchAll(DBSynch.java:35)
            at com.ksea.nt.DBSynch.main(DBSynch.java:168)4) db Info
    =======
    I am using mysql-3.23.51-win and j2sdk-1_4_0_01-windows-i586.

  • SOS: XAML binding Error: Converter failed to convert value of type '...' to to type '...'

    Hi, I'm working on a small Windows store App project using C# + XAML, and encountered a really weird problem with data binding in XAML. The error message is:
    Error: Converter failed to convert value of type 'Neptune.MyMatch, SkyNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' to type
    'ProgressableBase'; BindingExpression: Path='' DataItem='Neptune.MyMatch, SkyNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; target element is 'MyControls.ProgressableViewControl' (Name='root'); target property is 'Progressable'
    (type 'ProgressableBase').
    Error: Converter failed to convert value of type 'Neptune.MyMatch, SkyNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' to type
    'IMatchWrapper'; BindingExpression: Path='' DataItem='Neptune.MyMatch, SkyNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; target element is 'MyControls.MatchScoreControl' (Name='root'); target property is 'Match' (type 'IMatchWrapper').
    the XAML code snippet involved is:
    <local:MatchScoreControl Match="{Binding Converter={StaticResource TestConverter}}" />
    here:
    1) The type of the 'Match' property of 'MatchScoreControl' is 'IMatchWrapper', the type of the DataContext is 'MyMatch';
    2) 'MyMatch' is derived from 'ProgressableBase' and implemented
    'IMatchWrapper';
    3) below is the definition of 'MatchScoreControl' and its dependency property 'Match':
    public sealed partial class MatchScoreControl : UserControl
    public IMatchWrapper Match
    get { return (IMatchWrapper)GetValue(MatchProperty); }
    set { SetValue(MatchProperty, value); }
    public static readonly DependencyProperty MatchProperty =
    DependencyProperty.Register("Match", typeof(IMatchWrapper), typeof(MatchScoreControl), new PropertyMetadata(null, OnMatchPropertyChanged));
    private static void OnMatchPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    // this line will never get called
    Debug.WriteLine(e.NewValue.GetType().FullName);
    } //more code...
    4) TestConverter is a dummy value converter(IValueConverter) which does nothing just to make sure the binding object and target type is as expected:
    public sealed class TestConverter : IValueConverter
    public object Convert(object value, Type targetType, object parameter, string language)
    if (targetType != typeof(IMatchWrapper))
    throw new NotImplementedException("Error: targetType is not IMatchWrapper.....");
    if (!(value is IMatchWrapper))
    throw new NotImplementedException("Error: value is not IMatchWrapper...");
    return (IMatchWrapper)value;
    public object ConvertBack(object value, Type targetType, object parameter, string language)
    throw new NotImplementedException();
    When I run the app, none of the two exceptions in the TestConverter.Convert() is thrown, which is right and as expected. But the out window keeps throwing the error message as above. This is pretty weird!
    I've tried adding a parameterless constructor to the class 'MyMatch', but it doesn't work.
    Any suggestion would be appreciated!

    Good to know you have the solution and thanks for sharing the experience.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Cannot convert string to date

    Hey Guys,
    I'm starting powershell and I'm having a headheck (I'm searching for hours) with a piece of code :)
    I'm trying to do that :
    $LogLines = (Get-Content -Path $LogPath)
    Foreach ($LogLine in $LogLines) {
    $LogSubString = $LogLine.Substring(21,15)
    [datetime]$date = $LogSubString
    But I have an error
    Cannot convert value "‎10‎-‎22‎-‎2014" to type "System.DateTime". Error: "String was not
    recognized as a valid DateTime."
    As you see, the value I read from a file is "10-22-2014".
    When I try this, it is working :
    $LogLines = (Get-Content -Path $LogPath)
    Foreach ($LogLine in $LogLines) {
    $LogSubString = "10-22-2014"
    [datetime]$date = $LogSubString
    So I don't understand why it's not working since "10-22-2014" and $LogLine.Substring(21,15) represents the same value but one is not working.
    Can someone please help me ? :)
    Cheers,
    Jeremie

    Get-Content has a parameter -Encoding UTF-8
    But I not sure that's the way to go, that could result in data loss / confusion
    Or take a good look at the string, leave $LogLine.Substring(21,15)
    as is.
    $LogLines = (Get-Content -Path $LogPath)
    Foreach ($LogLine in $LogLines) {
    $LogSubString = $LogLine.Substring(21,15)
    "LogSubString=$LogSubString"
    "LogSubString.Length=$($LogSubString.Length)"
    FOR ($I=0;$I -LT $LogSubString.Length;$I++)
    $Char = $LogSubString.Chars($I)
    "I=$I Char=$Char Int=$($Char -as [Int])"
    [datetime]$date = $LogSubString

  • RFC Function Error: Cannot convert a value of 'MM/DD/YYYY' from type java.l

    hi experts,
    iam calling an RFC using SAP_JCO_Function. one of the input parameters is date which shud be in the format 'MM/DD/YYYY' but when i create a transaction property of data type DATETIME the format changes to " 2007-06-21 14:31:50 ". to refrain form passing this value at run time i have defined the transaction property as string and defaulted the value to MM/DD/YYYY.
    When i execute the RFC i get the error "Cannot convert a value of 'MM/DD/YYYY' from type java.l".
    Issue is with time field as well. Any suggestions would be appreciated.
    Thanks,
    Avinash

    Hi
    You can use datefromxmlformat( datetime, toformat ) .
    in toformat you give: "MM/dd/yyyy" and in datetime you pass your xml format date like: 2007-06-21 T14:31:50.
    Try like this. Hope this may help you.
    Thanks

  • Value cannot be converted to requested type

    hi.
    can anyone tell me why i get the following error:
    [sunm][Oracle JDBC Driver]Value can not be converted to requested type
    I get this error when i try to execute a SQL query like the one below:
    SELECT * FROM orders WHERE orders.date BETWEEN '20-SEP-05' AND '22-SEP-05'
    this is not the exact query i am trying to excute, but serves the purpose of this forum post.
    ideally, i'd like to use the "?" parameter instead of the dates written above. the application's user selects a StartDate and EndDate for his search. this should display a list of orders within that date range.
    i have tried using several date formats, as well as the TO_DATE() function. i always get this error when using the "?" parameter but it displays the correct records when i use an actual date.
    i also only get this error when working with dates. i can use the "?" parameter with no problems for any other table column.
    someone please help!!

    How is the user selecting a start and end date? By using the calendar? You might need to convert the calendar's date into an SQL friendly date. For instance, try this:
    somethingRowSet.setObject(1, (new java.sql.Timestamp(((java.util.Date)StartDate.getValue()).getTime()).toString()))You might also want to try turning on printStatements in the row set's properties. This will cause the row set to print out the parameters to the log file so you can then analyze what exactly the row set is doing.
    Hope this helps.
    -Jeff

  • Cannot convert ÿØÿà of type class java.lang.String to class BFileDomain.

    Hi All,
    I am using Jdeveloper 11.1.2.3.0.
    I have a scenario of making an ADF page where I have a IMAGE field to show on the page. So,I have a table called "PRODUCT" with fields called photo with BFILE type. Now when I the data i have inserted using the DML command and i can see the path at the backend.
    However,when i am runnig my ADF page in the Filed called "PHOTO" I can only see a junk character stating 'yoyo'.
    When I click on it, it says ERROR "Cannot convert ÿØÿà of type class java.lang.String to class oracle.jbo.domain.BFileDomain".
    Your help will be appreciated ASAP.
    Regards,
    Shahnawaz

    Hi,
    did you show the id-value in the user interface as a input-component, and did the input-component include a converter?
    If yes, show the id as output-text and remove any existing converter-components.
    Best Regards

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

  • Error:Type mismatch: cannot convert from Long to Long

    hi friends,
    I've a problem.I've a JSP that does some long converions,and its working fine when i make it run on my machine i.e
    (Running Tomcat5.0),but when I deploy this file on the server which runs Tomcat 5.5.7,it throws this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 20 in the jsp file: /abc.jsp
    Generated servlet error:
    Type mismatch: cannot convert from Long to Long
    Can anyone of you,tell me where i am going wrong???

    Here is an example of doing it with a JavaBean... the bean looks like this:
    package net.thelukes.steven;
    import java.io.Serializable;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class FormHandlerBean implements Serializable {
         private static final long serialVersionUID = 1L;
         private Date startTime = null;
         private DateFormat dateFormatter;
         public FormHandlerBean() {
              setDateFormat("yyyy-MM-dd hh:mm:ss");
         public void setStart(String strt) {
              setStartAsString(strt);
         private void setStartAsString(String strt) {
              setStartAsDate(getDate(strt));
         private void setStartAsDate(Date d) {
              startTime = d;
         private Date getDate(String s) {
              Date d = null;
                   try {
                        d = dateFormatter.parse(s);
                   } catch (ParseException pe) {
                        System.err.print("Error Parsing Date for "+s);
                        System.err.println(".  Using default date (right now)");
                        pe.printStackTrace(System.err);
                        d = new Date();
              return d;
         public long getStartAsLong() {
              return getStart().getTime();
         public String getStartAsString() {
              return Long.toString(getStartAsLong());
         public Date getStart() {
              return startTime;
         public void setDateFormat(String format) {
              dateFormatter = new SimpleDateFormat(format);
    }You would only need to make the getStartXXX methods public that need to be accessed from the JSP. For example, if you will not need to get the Long value of the time, then you do not need to make getStartAsLong public...
    The JSP looks like this:
    <html>
      <head>
        <title>I got the Form</title>
      </head>
      <body>
        <h3>The Output</h3>
        <jsp:useBean class="net.thelukes.steven.FormHandlerBean" id="formHandler"/>
        <%
             formHandler.setStart(request.getParameter("start"));
        %>
        <table>
          <tr><td>Start as String</td><td><jsp:getProperty name="formHandler" property="startAsString"/></td></tr>
          <tr><td>Start as Date</td><td><jsp:getProperty name="formHandler" property="start"/></td></tr>
          <tr><td>Start as long</td><td><jsp:getProperty name="formHandler" property="startAsLong"/></td></tr>
        </table>
      </body>
    </html>If this were a servlet processing the form rather than a JSP, I might throw the ParseException that might occur in getDate and catch it in the Servlet, with which I could then forward back to the form telling the user they entered mis-formatted text value... But since JSPs should be mainly display, I catch the exception internally in the Bean and assign a safe value...

  • BAdI error : type of EXIT_REF1 cannot be converted to the type of EXIT_REF

    Hi all,
    The below was the posted earlier for BAdI. Ihave followed all the steps. And i have written the below code. Syntactically it is not showing any errors, but when i am activating i am getting error
    like " The type of EXIT_REF1 cannot be converted to the type of EXIT_REF". where i am doing the mistake..??
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.   "" The type of EXIT_REF1 cannot be converted to the type of EXIT_REF"
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    Thanks in advance
    krupali.

    Hi,
    Both are of different types
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    Assiging one type another type is not allowed.
    Rhea.

  • CF9 Problems with Select * query, resulting in Value can not be converted to requested type.

    So, I work on a legacy CF web site and there are numerous SELECT * FROM USERS_TABLE queries all over the site.
    Well, we changed the structure of said table in the database on our Testing and Staging sites, with no issues.
    When we pushed up to our production environment and changed the structure of the production DB table, the server kept kicking back "Value can not be converted to requested type."
    After doing some searching out there, it looks like CF caches the structure of the table, and you either have to restart CF to clear it, or rename and then name-back the DSN to fix the issue.
    http://www.bennadel.com/blog/194-ColdFusion-Query-Error-Value-Can-Not-Be-Converted-To-Requ ested-Type.htm
    That said, this doesn't happen in our testing and staging environments - so what would be the difference?
    Is there some setting I need to change in the CF Admin to keep this from happening again?

    Also, if you can use a Stored Procedure to retrieve the data, do so.  Standard queries gets all the information, anyway, chokes bandwidth passing it all to the CF server, and forces the CF server to filter, sort, and format the data.  SPs tell the db server to get ONLY the data requested, and forces the db server to filter and sort the data, leaving only formatting to the CF server.
    That's not true. The only time CF messes with data returned from the DB is if there's a maxrows attribute, and the record set returnded from the DB has more than that number of records... which causes CF to truncate the recordset to the correct size before returning it. The DB might or might not stop sending rows down to CF after CF says "yeah, I've got all I want now".
    Other than that, for all intents and purposes all CF does with the SQL is pass it to the DB and wait for an answer. The only thing it does to the returned data is to create a CF record set ("query") with it... this does not involve any filtering and sorting.
    Adam

  • ActionScript 3.0: Error #1034: Type Coercion failed: cannot convert displayObject$ to DefaultPackage

    I'm a student I have a final project want to deliver it after two days.
    I'm making a drag and drop game, I watched a tutorial to do that.
    But after ending coding I faced a weird error!
    I've I checked that my code is the same as the code in the tutorial.
    This is the Debug error report:
        Attempting to launch and connect to Player using URL E:\FL\ActionScript\Drag and Drop Project\DragAndDrop.swf
        [SWF] E:\FL\ActionScript\Drag and Drop Project\DragAndDrop.swf - 87403 bytes after decompression
        TypeError: Error #1034: Type Coercion failed: cannot convert paper1$ to DragDrop.
                  at Targets()[E:\FL\ActionScript\Drag and Drop Project\Targets.as:23]
    My `.fla` File is containing 12 Objects to drag and another 12 Objects to drop on it.
    The idea here is when drop the Object on the target the Object will become invisible and the target become visible (in `.fla` file `target alpha = 0`).
    I made two classes:
    DragDrop.as : for the objects that I'm going to drag.
    Targets.as  : for the targets that I'm going to drop Objects on it.
    Note: match function is to animate "GameOver" MovieClip When complete the game.
    DragDrop.as:
        package
                  import flash.display.*;
                  import flash.events.*;
                  public class DragDrop extends Sprite
                            var origX:Number;
                            var origY:Number;
                            var target:DisplayObject;
                            public function DragDrop()
                                      // constructor code
                                      origX = x;
                                      origY = y;
                                      addEventListener(MouseEvent.MOUSE_DOWN, drag);
                                      buttonMode = true;
                            function drag(evt:MouseEvent):void
                                      stage.addEventListener(MouseEvent.MOUSE_UP, drop);
                                      startDrag();
                                      parent.addChild(this);
                            function drop(evt:MouseEvent):void
                                      stage.removeEventListener(MouseEvent.MOUSE_UP, drop);
                                      stopDrag();
                                      if(hitTestObject(target))
                                                visible = false;
                                                target.alpha = 1;
                                                Object(parent).match();
                                      x = origX;
                                      y = origY;
    Targets.as:
        package
                  import flash.display.*;
                  import flash.events.*;
                  public class Targets extends MovieClip
                            var dragdrops:Array;
                            var numOfMatches:uint = 0;
                            var speed:Number = 25;
                            public function Targets()
                                      // constructor code
                                      dragdrops = [paper1,paper2,paper3,paper4,paper5,paper6,
                                                                     paper7,paper8,paper9,paper10,paper11,paper12,];
                                      var currentObject:DragDrop;
                                      for(var i:uint = 0; i < dragdrops.length; i++)
                                                currentObject = dragdrops[i];
                                                currentObject.target = getChildByName(currentObject.name + "_target");
                            public function match():void
                                      numOfMatches++;
                                      if(numOfMatches == dragdrops.length)
                                                win.addEventListener(Event.ENTER_FRAME, winGame);
                            function winGame(event:Event):void
                                      win.y -= speed;
                                      if(win.y <= 0)
                                                win.y = 0;
                                                win.removeEventListener(Event.ENTER_FRAME, winGame);
                                                win.addEventListener(MouseEvent.CLICK, clickWin);
                            function clickWin(event:MouseEvent):void
                                      win.removeEventListener(MouseEvent.CLICK, clickWin);
                                      win.addEventListener(Event.ENTER_FRAME, animateDown);
                                      var currentObject:DragDrop;
                                      for(var i:uint = 0; i < dragdrops.length; i++)
                                                currentObject = dragdrops[i];
                                                getChildByName(currentObject.name + "_target").alpha = 0;
                                                currentObject.visible = true;
                                      numOfMatches = 0;
                                      addChild(win);
                            function animateDown(event:Event):void
                                      win.y += speed;
                                      if(win.y >= stage.stageHeight)
                                                win.y = stage.stageHeight;
                                                win.removeEventListener(Event.ENTER_FRAME, animateDown);
    ...Thanks

    Thank you very much for replying.
    - dragdrops represents: the dragable objects.
    - Targets obtaining the dropable objects by hitTestObject, then the dropable objects visible is turned to false, & the target visible turned to true.
    Dragable objects is a 12 elements all of them have an instance names: paper1....paper12.
    When I focused to the project I noticed that I forget to give the dragable objects an instance names!
    after making the instance names to them, a new error occures:
    E:\FL\ActionScript\Drag and Drop Project\Targets.as, Line 11
    1046: Type was not found or was not a compile-time constant: paper1.
    This error is continuing to paper2, paper3.....paper12 !
    Please download my project, I must deliver it to my college in 24/12. I will never forget your favor. thanks.
    https://www.dropbox.com/s/8mdg5w17vvryzso/Drag%20and%20Drop%20Project.rar | 715KB

  • Exception --- Value can not be converted to requested type.Error Code: 0

    Inside my query, I try to use function,like
    Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
    sometimes query works fine and sometimes got following exception, can anyone here help me out..
    Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
    Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
    Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
         at com.cad.report.data.DocumentReturnedDataGenImpl.loadData(DocumentReturnedDataGenImpl.java:130)
         at com.cad.report.data.AbstractDataGen.getReport(AbstractDataGen.java:96)
         at com.cad.report.command.ProcessReportRequestOnMessage.run(ProcessReportRequestOnMessage.java:74)
         at com.cad.registration.command.AbstractCommand.execute(AbstractCommand.java:106)
         at com.cad.flow.core.Run.run(Unknown Source)
         at com.cad.flow.core.WorkflowComponent.run(Unknown Source)
         at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:238)
         at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:135)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl.execute(WorkflowManager_uh667k_EOImpl.java:132)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_1001_WLStub.execute(Unknown Source)
         at com.cad.util.WorkflowProxy.runWorkflow(WorkflowProxy.java:128)
         at com.cad.kbd.messenger.listener.mdb.ReportRequestMDB.onMessage(ReportRequestMDB.java:84)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3964)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070620)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
    Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
    Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:988)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:780)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:562)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:441)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:457)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:481)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:825)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:791)
         at oracle.toplink.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:518)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:965)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:878)
         at com.cad.persistence.toplink.TopLinkPersistenceBrokerImpl.executeQuery(TopLinkPersistenceBrokerImpl.java:420)
         at com.cad.report.data.DocumentSys.getSummitedDocumentNumber(DocumentSys.java:332)
         at com.cad.report.data.DocumentSys.loadData(DocumentSys.java:110)
         ... 24 more
    Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BaseData.getTimestamp(Unknown Source)
         at weblogic.jdbc.base.BaseResultSet.getTimestamp(Unknown Source)
         at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_base_BaseResultSet.getTimestamp(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObjectThroughOptimizedDataConversion(DatabaseAccessor.java:1038)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:942)
         ... 45 more

    Here is my code
    ExpressionBuilder builder = new ExpressionBuilder();
    ReportQuery query = new ReportQuery(RegistrationDetailImpl.class, builder);
    query.addArgument("startTime");
    query.addArgument("endTime");
    query.addArgument("lro");
    Expression lroCol = builder.get("lro");
    Expression regDateCol = builder.get(
    QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_NUMBER_COL).get(
    QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_DATE_COL);
    Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
    Expression timeExp = regDateCol.between(builder.getParameter("startTime"), builder
    .getParameter("endTime"));
    Expression lroExp = lroCol.equal(builder.getParameter("lro"));
    query.setSelectionCriteria(timeExp.and(lroExp));
    query.addCount();
    query.addAttribute("regDate", formattedRegDateCol);
    query.addGrouping(formattedRegDateCol);
    query.addOrdering(formattedRegDateCol.ascending());
    descriptor.getDescriptorQueryManager().addQuery("testquery", query);

  • Column "A" cannot convert between unicode and non-unicode string data types

    I am following the SSIS overview video-
    https://secure.cbtnuggets.com/it-training-videos/series/microsoft-sql-server-2008-business-development/6143?autostart=true
    I have a flat file that i want to import the contents onto a SQL database.
    I created a Dataflow task, source file and oledb destination.
    I am getting the folliwung error -
    "column "A" cannot convert between unicode and non-unicode string data types"
    in the origin file the data type is coming as string[DT_STR] and in the destination object it is coming as "Unicode string [DT_WSTR]"
    I used a data conversion object in between, dosent works very well
    Please help what to do

    I see this often.
    Right Click on FlatFileSource --> Show Advanced Editor --> 'Input and Output Properties' tab --> Expand 'Flat File Source Output' --> Expand 'Output Columns' --> Select your field and set the datatype to DT_WSTR.
    Let me know if you still have issues.
    Thank You,
    Jay

  • Column cannot convert between unicode and non-unicode string data types

    I am converting SSIS jobs from SQL Server 2005 running on a Windows 2003 server to 2008R2 running on a Windows 2008 server.&nbsp; I have a dataflow with an OLE DB Source which is selecting from an Oracle view.&nbsp; This of course worked fine in
    2005.&nbsp;&nbsp; This OLE DB Source will not even read the data from Oracle without the error "Column "UWI" cannot convert between unicode and non-unicode.  The select is:
    SELECT SOME_VIEW.UWI AS UWI,
                 CAST(SOME_VIEW.OIL_NET AS NUMERIC(9,8)) AS OIL_NET
    FROM SOME_SCHEMA.SOME_VIEW
    WHERE OIL_NET IS NOT NULL AND UWI IS NOT NULL
    ORDER BY UWI
    When I do "Show Advanced Editor" on this component, in the Input and Output Properties, I show the OLE DB External Column as DT_STR length 40 for the UWI column and for the Output Columns I see the UWI as the same DT_STR.
    How can I get past this?  I have tried doing a cast...cast(SOME_VIEW.UWI AS VARCHAR(40)) AS UWI and this gives the same error.  The column in Oracle is a varchar2(40).
    Any help is greatly appreciated.  Thanks.

    Please check the data type for UWI using advanced editor for Oledb Source under
    external columns and output columns. Are the data types same?
    If not, try changing the data type (underoutput columns) same as data type shown under
    external columns
    Nitesh Rai- Please mark the post as answered if it answers your question

Maybe you are looking for