System.data.dataset Problem

Hi All : I am writing the following to use Powershell to get SQL server information:
Add-Type -Path 'C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll'
$finalDataSet = New-Object System.Data.Dataset
get-content 'C:\Serverlist.txt' | where { ($_ -eq "server2") -or ($_ -eq "server1")  } | foreach-object {
$SQLServer=$_
$SQLDBName = "master"
$SqlQuery = "select * from master.sys.databases"
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Server = $SQLServer; Database = $SQLDBName; Integrated Security = True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = $SqlQuery
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$SqlConnection.Close()
clear
$DataSet.Tables[0] | select name
$finaldataset.Tables.add($dataset.tables[0])
$finaldataset | select name
but get the following error:
Exception calling "Add" with "1" argument(s): "DataTable already belongs to another DataSet."
At line:24 char:25
+ $finaldataset.Tables.add <<<< ($dataset.tables[0])
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException
Any problem in the script??

Hi Sakurai,
Apparently you can't just copy a DataTable object from one DataSet object to another DataSet object using the Add method or assign a DataTable object to multiple DataSet objects.
However you can try the following: Instead of creating an inner DataSet object you create a DataTable object:
$DataTable = New-Object System.Data.DataTable
$SqlAdapter.Fill($DataTable)
After that you assign your DataTable object to the outer DataSet object:
$DataTable | select name
$finaldataset.Tables.add($DataTable)
Good luck.
Best regards,
Arjen

Similar Messages

  • Oracle 9i Client and System.Data.OracleClient Problems

    I have an application server that has an ASP.NET webpage that queries an Oracle database on another machine through ODP.NET.
    The app server's machine's OS is Microsoft Windows XP SP2 with IIS and .NET 2.0 Framework installed and configured correctly.
    The following Oracle software is installed (from OUI inventory listing)
    Oracle Services For Microsoft Transaction Server 9.2.0.7.0
    Oracle ODBC Driver 9.2.0.7.0
    Oracle Provider for OLE DB 9.2.0.7.0
    Oracle Objects for OLE 9.2.0.7.0
    Oracle Data Provider for .NET 9.2.0.7.0
    Oracle 9i Client 9.2.0.1.0
    Sun JDK 1.3.1.0.1a
    When the ASP.NET page attempts to connect to the Oracle instance on the remote machine via the Data provider I get the following message...
    System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    <<snipped>>
    I know the connectivity between the client on the app server (SQL*Plus: Release 9.2.0.1.0)
    and the remote database (Oracle Database 10g Enterprise Edition Release 10.2.0.3.0)
    is working since sqlplus sessions connect and the NET Manager tests through Local Service Naming succceed.
    I've tried the "ORACLE_HOME permission changes" solution for Autenticated users as articulated here ....
    http://jasondotnet.spaces.live.com/blog/cns!BD40DBF53845E64F!122.entry
    but the error persists.
    In the list of oracle installed products above, I installed the first 5 (ODP.NET) before the last 2 (Oracle 9i client). Would this matter ? At first I thought perhaps the ODP.NET component didn't "know" about the client since it was installed before there was one on that app server.
    Feeback much appreciated.

    Well I figured it out. I guess...
    1) Uninstalled all Oracle Software Products
    2) Rebooted the machine.
    3) Manually removed C:\oracle\ora92\.
    4) Installed and configured the following
    * Oracle 9i Client 9.2.0.1.0
    5) Installed and configured the following
    * Oracle Services for Microsoft Transaction Server 9.2.0.7.0
    * Oracle ODBC Driver 9.2.0.7.0
    * Oracle Provider for OLE DB 9.2.0.7.0
    * Oracle Objects for OLE 9.2.0.7.0
    * Oracle Data Provider for .NET 9.2.0.7.0
    6) Gave the following accounts Full Control over the ORACLE_HOME directory
    * ASP.NET Machine Account
    * Internet Guest Account
    * Launch IIAS Process Account
    6) iisreset
    Conclusion....
    The order in which Oracle components are installed does matter.

  • System.Data - Crash during DataTable.Load

    Hello
    I encountered a (random) crash of my executable during a DataTable.Load when i do a "select" request with a big CLOB (> 24000 characters).
    I have coded a test and the error happen after 5 or 6 execution. I find a way to correct the problem by adding a Thread.Sleep after the DataTable.Load.
    But it's clearly not a solution
    DataTable myTable = new DataTable();
            myTable.Load(myReader);
    => This code crash
    DataTable myTable = new DataTable();
            myTable.Load(myReader);
            Thread.Sleep(1000);
    => this code work
    I have the same problem with a myReader.GetValue() and a myReader.GetString()
    If someone could provide an explanation...
    Thanks
    My configuration : 
    Oracle driver : OraOleDb v11.1.0.6
    My assembly if compiled on Framework 4.0 x86
    Here is the detail of the exception : 
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AccessViolationException
    Stack:
       at System.Data.Common.UnsafeNativeMethods+IRowset.GetData(IntPtr, IntPtr, IntPtr)
       at System.Data.OleDb.OleDbDataReader.GetRowDataFromHandle()
       at System.Data.OleDb.OleDbDataReader.GetValueBinding(System.Data.OleDb.MetaData)
       at System.Data.OleDb.OleDbDataReader.GetValues(System.Object[])
       at System.Data.ProviderBase.DataReaderContainer+CommonLanguageSubsetDataReader.GetValues(System.Object[])
       at System.Data.ProviderBase.SchemaMapping.LoadDataRow()
       at System.Data.Common.DataAdapter.FillLoadDataRow(System.Data.ProviderBase.SchemaMapping)
       at System.Data.Common.DataAdapter.FillFromReader(System.Data.DataSet, System.Data.DataTable, System.String, System.Data.ProviderBase.DataReaderContainer, Int32, Int32, System.Data.DataColumn, System.Object)
       at System.Data.Common.DataAdapter.Fill(System.Data.DataTable[], System.Data.IDataReader, Int32, Int32)
       at System.Data.Common.LoadAdapter.FillFromReader(System.Data.DataTable[], System.Data.IDataReader, Int32, Int32)
       at System.Data.DataTable.Load(System.Data.IDataReader, System.Data.LoadOption, System.Data.FillErrorEventHandler)
       at eWorkflow.Dal.Dal.DalBase.ExecuteReader(System.String)

    Hi,
    Sorry so late to answer your question.
    Per my understanding, you have load a large of data,and don't have enough memory.
    But form the exception Info: System.AccessViolationException
    It seems as joel said, maybe some others attempt to read/write the same data. Please exclude these
    factors and try again.  Good Luck!Best wishes!
    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.

  • Data Mismatch problem in Production system

    Dear Experts,
    We have been encountering serious data mismatch problems with our source system since 29th Dec 2010.
    We have realized this mismatch only on 11th Jan 2011. So, we have deleted entire data from 29th Dec 2010 onwards to 11th Jan 2011. Then we tried to load delta again as per our Process Chain sequence. Since then, our production system has become very inconsistent. We found that the entire data from 29th Dec 2010 to till date is started giving mismatch.
    Our system got damaged in terms of data drastically. If I delete any bad requests from our Cubes & Data Store Objects, the next time when we try to load data, cube & Data Store Objects is showing the deleted request no. is not updated properly. Because of this, our Process chain is daily failing to complete and giving so many technical errors. We are totally confused to restore our data from 29th Dec 2010 to till date.
    Can any one please help us to restore our data fully and Process Chain to run successfully...............?
    Thanks in Advance,
    Suman

    Hi Suman,
    I understood that you are using 3.x version of BW
    such kind of issues occurs if you distrub the delta sequence by deleting the requests without making them red.
    you can resolve this two ways......
    1) Go to reconstruction tab of the DSO and CUBE, select all the req from 29th Dec 2010 thru 11th Jan 2011 and reconstruct them. once they appear in the request tab. make all the requests to red (set the QM status to RED) one by one and delete them from the CUBE and DSO.
    This should set the delta status  back to 29th and you will be able to run a repeat delta from then in your next delta.
    2) Go to RSRQ and give the SID or the Request ID one by one that it is giving you ( request no. which is not updated properly)
        Mke the QM status as RED for all of them.
    Since you have already deleted them from the targets, just changing the QM status to RED will be sufficinet.
    You have make the QM status to RED inorder to inform the system that the requset is incorrect one and has been deleted.
    Once it is set to RED, system will not prompt any req and say "request no.# not updated properly".
    i suggest you the second option.
    Once you resume the delta load, it should run successfully.....and if you feel some data is still missing from 29th Dec 2010 thru 11th Jan 2011, just run a full repair load the get the data back.
    If your Datasource is of LO extraction u may need to fill the setup tables to perform full repair.
    Please let me know if the Datasource is of LO extraction. Also let me know once the issue is resolved.
    Regards,
    Sudheer.
    Edited by: Sudheer Kumar Kurra on Jan 22, 2011 7:58 AM
    Edited by: Sudheer Kumar Kurra on Jan 22, 2011 8:03 AM

  • Printing System Date on Report Title

    How can I print the system date on the title of report generated by SQL*Plus?
    I remember it is possible to include SQL.PNO in the statement TTITLE to print the page number. Is there any variable like SQL.PNO which represent system date?
    Previously I've include SYSDATE to the SELECT statement of the report. It is the column named TODAY, with option NOPRINT and NEW_VALUE TT_TODAY, where TT_TODAY is include in TTITLE statement. The problem is: if the SELECT statement returns nothing, TT_TODAY will be blank/Null.
    How can I work around with this problem?

    Dear all,
    My colleague told me the way to print System Date on title of SQL*Plus report as followed:
    COLUMN today NEW_VALUE tt_today NOPRINT FORMAT A1 TRUNC
    TTITLE CENTER tt_today RIGHT SQL.PNO
    SET FEEDBACK OFF
    SET TERMOUT OFF
    SELECT SYSDATE AS today FROM DUAL;
    SPOOL RPTFILE
    SELECT ....... << to generate report output >> .......
    SPOOL OFF
    SET TERMOUT ON
    SET FEEDBACK ON
    It works! The output file contains System Date on each page title.
    I don't understand why Oracle didn't implement variable similar to SQL.PNO to represent the System Date. If Oracle is able to create SQL.PNO which can increment on each page break, why not the System Date which remains the same on each page?

  • Visual Composer 7.0: system (data source) does not appear

    Hi...
    There is a problem: system (data source) does not appear in Visual Composer 7.0
    1. There is a connector MDM. It is made by PCD. It has been tested. The test is ok.
    2. However, as the data source in Visual Composer a connector MDM does not appear.
    3. This problem affects all types of connectors, but the Web Service Connector. Connector Web Service is always there.
    What the .....?
    P.S. The role of the creator of the connector is the same user of Visual Composer
    Thanks...

    Hi...
    There is a problem: system (data source) does not appear in Visual Composer 7.0
    1. There is a connector MDM. It is made by PCD. It has been tested. The test is ok.
    2. However, as the data source in Visual Composer a connector MDM does not appear.
    3. This problem affects all types of connectors, but the Web Service Connector. Connector Web Service is always there.
    What the .....?
    P.S. The role of the creator of the connector is the same user of Visual Composer
    Thanks...

  • The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. InnerException: Requested registry access is not allowed.

    I have read some of the other posts for people that got this error, but none seem to apply to me.
    My program has been working for weeks.  I made some minor changes, and started getting the error (full details below).
    I did a TFS "undo pending changes" and still getting the same error, even after logging off.  The one odd thing is that I did change my Windows password this week. The connection string is using a SQL user id and password that has no issues.
    I'm an Admin own my own box (running WIn XP SP3).  I even tried "Run as Admin" on Visual Studio.
    I'm doing a Debug-Start, running a Console-Test-Program that calls a WCF service, which on local machine is hosted by "ASP.NET Development Server".
    We have two other developers, one has the same problem, one does not.  In theory, we have all done "get latest" and are running the same code.
    The SQL Connection is related to a trace database; we are using this library http://ukadcdiagnostics.codeplex.com which has worked fine for months.
    When I do "Start Run" in Visual Studio, I get this error:
    {"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. "}
    with InnerException: {"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."}
    and it has InnerException: {"Requested registry access is not allowed. "}
    Outmost StackTrace:
       at System.Data.SqlClient.SqlConnection..ctor()
       at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
       at FRB.Diagnostics.Listeners.SqlDataAccessCommand..ctor(String connectionString, String commandText, CommandType commandType)
       at FRB.Diagnostics.Listeners.SqlDataAccessAdapter.CreateCommand()
       at FRB.Diagnostics.Listeners.SqlTraceListener.TraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.FilterTraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceInformation(String message)
       at FRB.EC.AdminService.AdminService.TestHelloWorldWithTrace(String name)
       at SyncInvokeTestHelloWorldWithTrace(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    Second Inner StackTrace:
       at System.Data.SqlClient.SqlConnection..cctor()
    Third Inner StackTrace:
          at System.Data.SqlClient.SqlConnectionFactory..cctor()
    When I do "Run as Admin", I get this error:
    {"Could not load file or assembly 'FRB.EFDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. "}
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at FRB.EC.AdminService.ConsoleTester.svcRef.IAdminService.GetDispositionStatusTypeList()
       at FRB.EC.AdminService.ConsoleTester.svcRef.AdminServiceClient.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\Service References\svcRef\Reference.cs:line 2459
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 565
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.ExecuteNewRelease103QueryMethods() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 189
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.Main(String[] args) in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 76
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    I am also posting the web.config/app.config, but I would rather not focus on that since there were absolutely no changes to it between the time it was working and the time it began failing. 
    Client app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <connectionStrings>
      </connectionStrings>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <serviceAuthorization impersonateCallerForAllOperations="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxReceivedMessageSize="5565536"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
              allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                  algorithmSuite="Default" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
            <client>
                  <endpoint address="http://localhost:3588/AdminService.svc" binding="wsHttpBinding"
                        bindingConfiguration="WSHttpBinding_IAdminService" contract="svcRef.IAdminService"
                        name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
        </system.serviceModel>
    </configuration>
    web.config of WCF service:
      <?xml version="1.0"?>
    <configuration>
        <configSections>
        <section name="FRB.Diagnostics" type="FRB.Diagnostics.Configuration.UkadcDiagnosticsSection, FRB.Diagnostics"/>
      </configSections>
        <appSettings>
           <!-- whatever goes here -->
        </appSettings>
        <!-- connection string section -->
      <connectionStrings>
        <add name="log" connectionString="Data Source=myserver;Initial Catalog=ECWCFLOG_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="DBConn" connectionString="Data Source=myserver;Initial Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="EagleConnectEntities" connectionString="metadata=res://*/EagleConnect.csdl|res://*/EagleConnect.ssdl|res://*/EagleConnect.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=myserver;Initial
    Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
      </connectionStrings>
        <!-- FRB.Diagnostics logging section -->
        <FRB.Diagnostics>
            <sqlTraceListeners>
                <sqlTraceListener name="sqlTraceListenerSettings"
                            connectionStringName="log"
                            commandText="INSERT INTO LogStore VALUES(@Source, @ActivityId, @ProcessId, @ThreadId, @EventType, @Message, @Timestamp)"
                            commandType="Text">
                    <parameters>
                        <parameter name="@Source" propertyToken="{Source}"/>
                        <parameter name="@ActivityId" propertyToken="{ActivityId}"/>
                        <parameter name="@ProcessId" propertyToken="{ProcessId}"/>
                        <parameter name="@ThreadId" propertyToken="{ThreadId}"/>
                        <parameter name="@EventType" propertyToken="{EventType}" callToString="true"/>
                        <parameter name="@Message" propertyToken="{Message}"/>
                        <parameter name="@Timestamp" propertyToken="{DateTime}"/>
              <!-- <parameter name="@UserId" propertyToken="{WindowsIdentity}"/> -->
            </parameters>
                </sqlTraceListener>
            </sqlTraceListeners>
            <smtpTraceListeners>
                <smtpTraceListener name="smtpTraceListenerSettings"
                             host="vssmtp"
                             port="25"
                             from="[email protected]"
                             to="[email protected]"
                             subject="AdminService Logging Event: {EventType}, {MachineName}"
                             body="{Message}&#xA;=======&#xA;Process={ProcessId},&#xA;Thread={ThreadId},&#xA;ActivityId={ActivityId}"/>
            </smtpTraceListeners>
        </FRB.Diagnostics>
        <!-- System.Diagnostics logging section -->
        <system.diagnostics>
            <sources>
                <source name="FRB.EC.AdminService" switchValue="All">
                    <listeners>
                        <clear/>
                        <add name="ods"/>
                        <add name="smtp"/>
                        <add name="sql"/>
                    </listeners>
                </source>
                <source name="System.ServiceModel" switchValue="Off" propagateActivity="true">
                    <listeners>
                        <add name="ignored" type="System.Diagnostics.ConsoleTraceListener"/>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <!-- OutputDebugStringTraceListener -->
                <add name="ods"
               type="FRB.Diagnostics.Listeners.OutputDebugStringTraceListener, FRB.Diagnostics"
               initializeData="{ActivityId}|{EventType}: {Message} - {DateTime}, Process={ProcessId}, Thread={ThreadId}"/>
                <!-- SqlTraceListener -->
                <add name="sql"
               type="FRB.Diagnostics.Listeners.SqlTraceListener, FRB.Diagnostics"
               initializeData="sqlTraceListenerSettings"
               traceOutputOptions="Timestamp"/>
                <!-- SmtpTraceListener -->
                <add name="smtp"
               type="FRB.Diagnostics.Listeners.SmtpTraceListener, FRB.Diagnostics"
               initializeData="smtpTraceListenerSettings">
                       <filter type="System.Diagnostics.EventTypeFilter"
                       initializeData="Error"/>
                </add>
            </sharedListeners>
            <trace autoflush="true"/>
        </system.diagnostics>
        <system.web>
        <compilation debug="true" targetFramework="4.0">
        </compilation>
            <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
        </system.web>
        <system.serviceModel>
            <services>
                <service name="FRB.EC.AdminService.AdminService"
                   behaviorConfiguration="FRB.EC.AdminService.AdminServiceBehavior">
                    <!-- Service Endpoints -->
                    <endpoint address="" binding="wsHttpBinding"
                      bindingConfiguration="wsHttpEndpointBinding"
                      contract="FRB.EC.AdminService.IAdminService">
                        <!--
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs. 
                  If removed, WCF will infer an appropriate identity automatically.
              -->
                        <identity>
                            <dns value="localhost"/>
                        </identity>
                    </endpoint>
                    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                </service>
            </services>
            <bindings>
                <wsHttpBinding>
                    <binding name="wsHttpEndpointBinding"
                     maxBufferPoolSize="2147483647"
                     maxReceivedMessageSize="500000000">
                        <readerQuotas maxDepth="2147483647"
                            maxStringContentLength="2147483647"
                            maxArrayLength="2147483647"
                            maxBytesPerRead="2147483647"
                            maxNameTableCharCount="2147483647"/>
                        <security>
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                </wsHttpBinding>
            </bindings>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="FRB.EC.AdminService.AdminServiceBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="true"/>
                        <serviceCredentials>
                        </serviceCredentials>
                        <!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
                    roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
                        <serviceAuthorization principalPermissionMode="UseWindowsGroups"
                                    impersonateCallerForAllOperations="true"/>
                    </behavior>
                    <behavior name="FRB.EC.AdminService.IAdminServiceTransportBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="false"/>
                        <serviceCredentials>
                            <clientCertificate>
                                <authentication certificateValidationMode="PeerTrust"/>
                                <!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="DataFactionServices.FRBX509CertificateValidator"/>-->
                            </clientCertificate>
                            <serviceCertificate findValue="WCfServer"
                                    storeLocation="LocalMachine"
                                    storeName="My" x509FindType="FindBySubjectName"/>
                        </serviceCredentials>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>
    </configuration>
    Thanks for any help.
    Neal

    I think I found it... this is sure a strange error for what is really happening.
    Apparently it had happened to me before, and fortuantely, I actually added the following comment:
                // Above is related to the WCFLOG SQL Diagnostics Trace 
                // If you get error here an inner exception "requested registry access is not allowed"
                // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                // then make sure you have impersonation enabled in your client.
                // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
    Now I think I will do a try catch and spit out the same text.
    Still testing to assure that this really was the issue.
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate ">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
    The line below in BOLD below is what somehow seemed to disappear from my app.config - probably due to a TFS human error - still checking that also:
            <client>
                  <endpoint address="http://localhost:4998/AdminService.svc"
                                  behaviorConfiguration="FRB.AllowImpersonate"
                                  binding="wsHttpBinding"
                                  bindingConfiguration="WSHttpBinding_IAdminService"
                                 contract="svcRef.IAdminService"
                            name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
    Here's how I "idiot-proofed" this error for now, to give an error that actually at least points to a solution:
            public SqlDataAccessCommand(string connectionString, string commandText, CommandType commandType)
                try
                    _connection = new SqlConnection(connectionString);
                    // Above is related to the WCFLOG SQL Diagnostics Trace  
                    // If you get error here an inner exception "requested registry access is not allowed"
                    // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                    // then make sure you have impersonation enabled in your client.
                    // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
                catch (Exception ex)
                    if (ex.ToString().Contains("The type initializer for"))
                    throw new System.ApplicationException(@"
                    Your client app <endpoint> must be cofigured have a
                  'behaviorConfiguration' attribute like this:
                    behaviorConfiguration='FRB.AllowImpersonate'
                   that points back to a behavior that has this syntax:         
              <behavior name='FRB.AllowImpersonate'>
                 <clientCredentials>
                     <windows allowedImpersonationLevel='Impersonation'/>
                 </clientCredentials>
              </behavior>
              ", ex);
                   else
                        throw ex;
                _command = _connection.CreateCommand();
                _command.CommandText = commandText;
                _command.CommandType = commandType;
                // TODO _command.CommandTimeout = ;
    Neal

  • How to Insert the System Date in the entity object

    Hello,
    I have the problem - in entity object I have one attribute as 'Created_Date' in the <entity>Impl.java,
    to this attribute I want to assign the value as a System Date. Could someone please let me know how to do this?
    Thanks

    Hint for all who are trying another solution. You might think it's easier to assign a SystemDate using this method:row.setDate(new Timestamp(System.currentTimeMillis())); But unfortunately this solution has a real gotcha! Doing this you are writing an Attribute with a precision of milliseconds. Unfortunately the SQL-Date type can hold only full seconds. So this solution sometimes leads to the Problem that BC4J complains that "someon else has changed the row" (in reality the database has simply stripped off the seconds).
    Even if you are trying to convert the Timestamp to an oracle.jbo.domain.Date like this Date myDate = new Timestamp(System.currentTimeMillis()));
    row.setDate(myDate); you will not be able to solve the problem. 'myDate' still holds the milliseconds, it only doesn't display them. You might still discover that BC4J complains for modified rows.
    So the solution given by Faraz is definitively the best solution, even if it looks complicated, as it strips off the milliseconds.

  • How to show date with format conforming to system date format ?

    Hi all,
    I write Java program running on Windows 2000 Advanced Server.
    I want to show date in a status bar with the format the same as that in system date format where the program resides, so when I change the date format through the regional setting, I expect that the date format in the status bar will adjust accordingly.
    But it seems that program fails to do so, the program keeps showing short date format MM/dd/yy. I've tried to use SimpleDateFormat.getDateInstance() method, but the result is the same.
    Any suggestion would be greatly appreciated.
    Setya

    Hello Setya !!
    I have the same problem as you.. Did you find any solution for this?
    Thank you,
    Claudia

  • Report 6i Arabic Date alignment problem in Windows 7

    Hi
    We have 6i Forms and Report and wanna run in windows 7. But we found arabic Date disaplay problem in reports. As you know arabic writting from right. But date display like 21/10/1431 and I wanna like 1431/10//21.
    I tried from regional setting and change date format from report. but this is problem from system it self,
    not accept right alignment. Even I install left to right patch (KB979643-x86).
    Please Help
    Thanks

    Like others have said you need to run the bootcamp installer to install the drivers.
    The time issue was a constant annoyance rebooting with OSX and my old XP bootcamp setup but it's gone with Windows 7 once you set your time to UTC format in the date and time properties instead of local time which OSX uses and XP couldn't support.

  • Quicken 2007 date format problem in Mavericks

    Objective: Get date format in dd/mm/yyyy format in Quicken 2007 (Lion compatible version).
    Current OS: Mavericks 10.9.4
    Hardware: Retina MacBook Pro & iMac 27" 3.2Ghz
    Problem:
    On my rMBP with Mavericks 10.9.4, I’m able to get Quicken 2007 data in dd/mm/yyyy format, as desired.
    On my new iMac (late 2013) with 10.9.4, Quicken recognises the System date formats dd/mm/yyyy (setting up a new register shows System date format) but the registers and data are all in m/d/yy.
    Quicken prefs are set to Canadian, so date formats should automatically be in dd/mm/yyyy, but aren't.
    The Quicken data file is identical on both Macs. The original file goes back to 1991, and has been through all Mac OS iterations since then.
    Pre-Lion, I remember that the workaround was to set the Language & Region to something (English / US, don’t remember which) and then change date formats. Anyway, the dd/mm/yyyy stuck, through Lion and Mavericks on my rMBP, but is causing a problem in the iMac.
    My guess is that Quicken is unable to / blocked out from accessing System date formats in Mavericks 10.9.4.
    Wondering if there’s some way to make Quicken access the Mavericks System date format, and stick to it?
    Possible approach: If some expert in these forums knows how Mavericks works under the hood, how it allows other apps access to System Prefs like date formats etc., perhaps a script or Terminal command could force Quicken 2007 to recognise and accept date formats from System Prefs (Language & Regional settings).
    I'd really appreciate the help; needless to say, the Quicken data is vital to my work.

    Hi Marlon,
    The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
    Regards,
    Vítor Vieira

  • Time Stamp Error: Cannot display system date and time. My VI display "YYYY-MM-DD" instead of "2014-08-02".

    Hi All,
    I am using Labview8.5 and Windows XP OS.
    My Problem is my Labview TimeStamp cannot display current system date and time.
    Please see my attachment for the screentshot.
    The TimeStamp or ever Format Date/Time String display "YYYY-MM-DD" instead of  "2014-08-02".
    I tried other computer machine and it works. There are some computer machine has this problem.
    How can I resolve this issue? Please advice. Thanks.
    Best Thanks,
    Jessie
    Attachments:
    Time Stamp error.JPG ‏68 KB

    Bill,
    reviewing the thread Dennis linked (thanks for that) reveals that it is the same account which opened this thread here three month later.
    What bothers me is the fact, that the past thread is marked "solved" even though it obviously isn't. Or the OP is trolling us.....
    Nevertheless, it seems like systematic error. Connected to specific machines.
    What makes the machines where the time stamp issue occurs "unique"? If there are several, is that source really "unique"?
    Most obvious reasons would be:
    - Language settings (possibly the infamous "dot-comma-issue")
    - Time zone settings (e.g. what happens if you switch Ulaanbaatar to Perth or maybe even some US time zone?)
    - Missing hotfixes for Win and LV
    - Is the system running as virtual machine vs. "native"?
    Not so obvious differences:
    - Specific CPU type
    - Motherboard/BIOS
    - LV ini settings
    There are tons of other possible reasons (e.g. corrupt LV installation), but these are the ones i came up with within a couple of minutes....
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Why does my Powerbook system date reset?

    Every so often the system date and time on my Powerbook G4 resets? I then get a warning from the OS stating that it has lost time? I thought OSX (Leopard) updated it's time and date upon boot?? Any ideas?

    The TiBook backup battery is a bit of a problem, as it is a Li-ion unit no longer manufactured by Panasonic.  It resides in a small printed wiring board assembly under the optical drive and is soldered to same.  The youngest one would be on the order of eight years ago, which is pretty long in the tooth.
    You can get a replacement new and compatible battery from iFixit, at least, which requires some soldering skill and equipment.  (I will be installing one in a few days, as Ijust ordered one of the batteries from them.)
    The TiBook battery is a little heartier than just a clock battery, as it needs to be able to hold up the computer in sleep mode for at least a couple of minutes while a battery is being changed.

  • How to use Db Provider Factories with System.Data.SqlServerCe

    I'm using SQL Server Compact Edition, but in the future I would like to be able to switch to another SQL Server Edition or even a different database. To achieve this, Microsoft recommends using DB Provider Factories (see: Writing Provider Independent Code in ADO.NET, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=674426&SiteID=1).
    I enumerated the available data providers on my PC with:
    Code Snippet
    System.Reflection.Assembly[] myAssemblies = System.Threading.Thread.GetDomain().GetAssemblies();
    The important entry is:
    "SQL Server CE Data Provider"
    ".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition"
    "Microsoft.SqlServerCe.Client"
    "Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    When executing:
    Code SnippetdataFactory = DbProviderFactories.GetFactory("System.Data.SqlServerCe");
    I got at first this error run time message:
    Failed to find or load the registered .Net Framework Data Provider.
    I added a reference to "Microsoft.SqlServerCe.Client" at C:\Programme\Microsoft Visual Studio 8\Common7\IDE\Microsoft.SqlServerCe.Client.dll and the program runs.
    Of course, it uses "Microsoft.SqlServerCe.Client" instead of "System.Data.SqlServerCe". Laxmi Narsimha Rao ORUGANTI from Microsoft writes in the post  "SSev and Enterprise Library" that "Microsoft.SqlServerCe.Client" is not meant to be used and that we should add the following entry to the machine.config file:
    Code Snippet<add name="SQL Server Everywhere Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    After changing the code to:
    Code Snippet
    dataFactory = DbProviderFactories.GetFactory("Microsoft.SqlServerCe.Client");
    I get the same error message as before, even after adding a reference to "System.Data.SqlServerCe"  at C:\Programme\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll.
    Any suggestion what I should do ? Just use "Microsoft.SqlServerCe.Client" ? Anyway, I don’t like the idea that I have to change the machine.config file, since I want to use click once deployment.

    It seems there is no DbProviderFactory for System.Data.SqlServerCe. At least I couldn’t find one, no matter how hard I searched on the Internet. I only found Microsoft.SqlServerCe.Client.SqlCeClientFactory. But we are not supposed to use Microsoft.SqlServerCe.Client and the 2 classes do have quiet some differences among their members. So I decided to write my own factory:
    Code Snippet
    public class SqlCeClientFactory: DbProviderFactory {
    public static readonly SqlCeClientFactory Instance = new SqlCeClientFactory();
    public override DbCommand CreateCommand() {
    return new SqlCeCommand();
    public override DbCommandBuilder CreateCommandBuilder() {
    return new SqlCeCommandBuilder();
    public override DbConnection CreateConnection() {
    return new SqlCeConnection();
    public override DbDataAdapter CreateDataAdapter() {
    return new SqlCeDataAdapter();
    public override DbParameter CreateParameter() {
    return new SqlCeParameter();
    That was easy enough, right ? I spent 1 week investigating the problem, 10 minutes solving it. I wonder why Microsoft didn’t include this class, because they have already the code in Microsoft.SqlServerCe.Client. I guess they have their reasons, but of course, they don’t tell us. After wasting one more month, I probably can tell. Oh, how I hate this.
    Or has anyone an idea what might be the problem ?

  • Document Journal s_alr_87012287 -   System date

    Hi,
    A company was late to deliver the Document Journal.
    Is it possible to leave out the system date on the Document Journal?
    Thank you for your feedback.
    Kind regards,
    Linda

    Hello,
    In S_ALR_87012287 selection parameters give the document number or the periods.
    Click on Line Item pages only radio button. This will give the line item details.
    Execute.
    You can press Ctrl+P (Printing Short Cut)
    Give your local printer name.
    print.
    Alternatively,
    Go to FB12
    Give the company code.
    Give the correspondence type (preferably SAP09)
    Give the document number
    and Year.
    Then go to F.61
    Give correspondence type
    Company code.
    Execute
    In case if it is asking, give the device name (your local printer). It triggers a spool request.
    Now go to SP02. You can see your own spool requests.
    Double click on page icon.
    Click on print button.
    Hope this solves your problem.
    Regards,
    Ravi

Maybe you are looking for

  • Re Creating  a chart getting an error with a 'Union All' statement

    Hi I have some data to chart with the following fields; Product , Jul-08 , Aug-08, Sep-08 etc ...... to Jan-10. The PRODUCT field is text showing the numerous Product Names The Jul-08 & other month fields have numbers per product that is to be aggreg

  • Itunes corrupted after update. asking to reinstall itunes

    After I updated my itunes i clicked to open it an this message appears. This copy of itunes is corrupted or not installed correctly. Please reinstall itunes. My mac is. Mac book pro 5, mac os x version 10.6.8 Please help!!

  • How Do I Find the Partition GUID?

    I'm new to server administration and I've been looking for a way to find the GUID of a partition on a hard drive.  I've read a lot of articles on GPT and partitioning in general, and I reviewed all the articles suggested in the Related Topics section

  • Need to associate two record types

    Hi, I am trying to associate custom object 14 record to Custom Object 2 record as Custom Object 2's related record. I tried it with the help of integration. Everytime, it created a new custom object 14 record instead of associating the existing recor

  • Save as a video type file??

    I'm working on a Flash movie that I'll have to include some work from Captivate in. I'd like to save a Captivate move as raw video that can be edited i.e. .avi or.mov then do some editing in Premier if needed, then import into Flash. However it appea