MaxHeadCase's Q&A profile
Visual C# Convert String to DateTime Object
Hi All I am new to this forum... I am storing string "21-07-2006" (21 July 2006) in a string variable and want to store this value in a DateTime Object. As it takes value in format #MM-dd-yyyy# i have to convert this value into this format. I have tried this string Objdate = "21-07-2006"; Response.Write(Convert.ToDateTime(Objdate ).ToString("mm-dd-yyyy").ToString()); But It generate Errors "String is not n correct date time format" ...something..2 Pls help Sachin Fine, string to DateTime can be handled by Convert class. Look the following code snippet: <code> // Display the value and Kind property of a DateTim ...Show All
SQL Server SQL Everywhere SLSErver to SQLEv without SSI & IIS
Due to client requirements i have found it necessary to write an application that moves data from SQL Server to SQLEv To do this I open the SQLServer table and using a FOREACH Statement track through the table I then cast each of the fields I require into a variable Each record then calls and INSERT INTO statement to insert the data into SQLEV One serious problem is how do I get round NULLs ie if contents = ( string )ditem[ "CONTENTS" ]; returns a NULL it crashes So I want something like IF ditem[ "CONTENTS" ] = NULL contents = "" else contents = ( string )ditem[ "CONTENTS" ] It is very slow the insert statement takes about .7 of a second (although it does ...Show All
Visual Studio 2008 (Pre-release) binding within animation not being updated?
i'm trying to create a digital clock in XAML only. i can get the current time, and its in a repeating animation. the problem is that the binding only occurs once. is there a way i can force the binding to update each time the animation runs Thanks, casey <Page xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " Name="myRootElement" xmlns:s="clr-namespace:System;assembly=mscorlib" WindowTitle="StringAnimationUsingKeyFrames Example"> <Page.Resources> <ObjectDataProvider ObjectInstance="{x:Static s:DateTime.Now}" MethodName="ToString" x:Key="odpToString"> ...Show All
Windows Forms RichText Box
Hi, I need help from somebody as I am not familiar much in Visual basic.In my application,I am using a RichTextbox control.When I type some text and selecting that text without hitting the enter key,the value of RichBox.SelectedText comes as null.Once I leave that control and selected again,it works fine.I know the problem is with the 'vblf' char.If it is there as the last character of the text it works well.If i type some text and hit the enter key,the select the text,RichTextbox.selectedtext has a value.But i need to select the text without hitting the enter key.if anybody know,please help me. Thanks Odd problem, I can't reproduce it. Please give us a step-by-step guide to reproduce the problem and show the code that uses the Sele ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 1 question...
Hi. My question: Will finall release of xna include some physics engine Im very interested in it. Thx for any response. Thx for response, but notice that i just want to know that i dont waste my time to do my own phisycs engine (I know that it is fun to do it, but why do it, if its already done ). Now I'm waiting for finall release to write my games in 3d. ...Show All
.NET Development Why does AppDomain.CreateInstanceAndUnwrap(..) work and AppDomain.CreateInstanceFrom(...).UnWrap doesn't?
Why does AppDomain.CreateInstanceAndUnwrap(..) work and AppDomain.CreateInstanceFrom(...).UnWrap doesn't I'm trying to load an assembly in a AppDomain. The AppDomain.CreateInstanceAndUnwrap works but only when the assembly is in the GAC. I do not want to use the GAC so I've tried to use the AppDomain.CreateInstanceFrom and then use the ObjectHandle.Unwrap() to ge the Object but this fails when I try to cast it to my Object with: Unable to cast transparent proxy to type 'Configuration.CompileProxy.Compiler'. Here's the code: AppDomain ad = AppDomain.CreateDomain("Temp Domain"); // create a new try { //Configuration.CompileProxy.Compiler galaxyCompiler = (Configuration.CompileProxy.Compiler)ad.C ...Show All
Visual Studio 2008 (Pre-release) System.Data.Dlinq.DataQuery Issue
In the following code, first I created the query in Linq format and let the Linq framework to create the Expression Tree and then I created the Expression Tree on my own try to achieve the same thing. It throws an exception at the following statement. Expression where = QueryExpression .Where(q.Expression,predicate); // Exception occured Also I observed that, when the Linq framework assigns System.Data.Dlinq.DataQuery type to Var Cust, where as when I create thru IQueryable<Customer> q assigns System.Data.Dlinq.Table<Customer> type. I try to cast q to DataQuery type. It's inaccessible. Is there any plan to expose System.Data.Dlinq.DataQuery type and let the user to build their own expression tree // Use a stand ...Show All
SQL Server Mimic SQL Server Management Studio behavior inside RS Report
I want to know how to mimic the SSMS behavior inside an Reporting Services report when querying an XML field. In SSMS, a field that is XML shows up as a link, and when the use clicks on the XML, it opens then entire XML document in a new window. I need this exact behavior in RS, but can't accomplish it. Any smart people out there who can do this I didn't realize you were trying to get an interactive representation of the XML. You can't really accomplish what you want in a report as we don't deal with XML data hierarchically - the XML data extension will flatten it and the binding it into a textbox will simply display the string. (Native XML support is in the long term plans) So, if you want an in ...Show All
SQL Server Problem with distribution agent
Can anyone help me on this I have a transactional replication going on from Server A to server B (Sql Server 2005) The replication was working well till yesterday.. But now, the replicated transactions are not getting applied at the subscriber. When I see the Log reader agent, its working fine...delivering the transactions to the distributor. When I see the replication monitor status ..it says 'delivering replicated transactions'...however the number of undistriuted transactions is very high..its getting bigger and bigger..not decreasing...I dont see any errors..So my guess is the distribution agent is not working eventhough its says 'delivering replicated transactions'..Other thing is if i see the replication monitor it says sta ...Show All
Visual Studio Team System How to create report on custom defined plain text fields
I added a release notes text field to my work item definition and would like to get this text in a report. What datasource should I use to retrieve this data. I'm now using TfsWorkItemTracking but I do not know if this is the best way to go. Hi Paso, Good question. You can get the custom fields you defined from the TFSWarehouse database. In this database, find the table called Current Work Item from there you can query the same to get the Custom fields. If not check with Work Item table also. Regards, Kathir ...Show All
.NET Development P/Invoke DeviceIOControl Failing depending on cdrom status
Apologies if this should be in the c# forum. Hello, I am experimenting with some basic CDROM control using c# and calling deviceiocontrol. Calling the functions all works fine with one exception: If I send a test device ready command to the drive via SCSI_PASS_THROUGH_DIRECT (CDB of 00 00 00 00 00 00) it will fail upon the conditions of 1. a previously loaded disc is ejected or 2. a blank disc is in the drive. The call to deviceiocontrol itself fails, and Marshal.GetLastWin32Error returns error code 1117 - The request could not be performed because of an I/O device error. While in any other state the call works perfectly and how it should. Similar code I have seen in c++ does an identical thing yet the call to deviceiocontrol succeeds and ...Show All
SQL Server ReportExecutionService
Hello all I am trying to build a web user interface to render a report using web service. In my code (Vs2003 - Visual Basic) of the web form, I have the following 3 lines in various placces. 1. Dim rs As myserver.ReportExecutionService = New localhost.ReportExecutionService 2. Dim execInfo As New myserver.ExecutionInfo 3. Dim execHeader As New myserver.ExecutionHeader When I run the code the debugger says myserver.ReportExecutionService, myserver.ExecutionInfo, myserver.ExecutionHeader are not defined. Environment: win2003 ent, Sql2000, SQL 2000 report service Prof sp2, Vs2003 sp1 What am I doing wrong The CodeProject web site has a SQL Report Service web UI using the SOAP API that is ...Show All
SQL Server Having problem to open DatabaseMailWizard
Version: SQL Server 2005 Standard Traditional Chinese 32 bit 標題: Microsoft SQL Server Management Studio ------------------------------ 無法顯示要求的對話方塊。 ------------------------------ 其他資訊: 無法載入檔案或組件 'DatabaseMailWizard, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 或其相依性的其中之一。 模組應該含有組件資訊清單。 (mscorlib) ------------------------------ 按鈕: 確定 ------------------------------ ...Show All
SQL Server SCD component - is there an alternative?
Hi, I have several SCD components in my project. As I have to process millions of records, SCD's are taking a lot of time. Is there a way to speed them up Work arounds Any tip is welcome -Tom Tom De Cort wrote: Rafael, Could you be a bit more specific Because the workaround you are suggesting brought me to the following thought: why not just replacing the whole data flow task (with the scd) by two SQL-tasks An update and an insert... What do you think Jamie -Tom Set-based operations will nearly always be quicker than the SSIS pipeline. Of course, they are not always possible which is why the SSIS pipeline exists. If you can do this inside an Execute SQL Task and you are happy to use the ...Show All
Visual Studio Express Editions "Invoke or BeginInvoke cannot be called on a control until the window handle has been created" error message
Turning my single threaded application into a multithreaded application has made it much too complicated for me to handle, that's why I need someone's help. My problem is extremely similar to the thread posted by AlexJstubbs titled "Error: Invoke or BeginInvoke cannot be called on a control until the window handle has been created". I basically have a long calculation that I used backgroundworker to handle so that my main form can update a progress bar (a different form with panels and extend) using the backgroundworker_progresschanged event handler. Initially, it threw the "Invoke or BeginInvoke cannot be called....." InvalidOperationException, and I don't really get it because I had the display shown prior to the r ...Show All
