DeadDante's Q&A profile
SQL Server How can I compare datetime in a query???
I have a table with the following columns company_Id employee_id logon_time_id logoff_time start_valid_period end_valid_period Employee's working time should only be counted if it is between start_valid_period and end_valid_period So, if I have for employee1 from company1 logon_time_id = 04/07/2006 11:00 loggoff_time = 04/07/2006 12:20 start_valid_period = 04/07/2006 12:10 end_valid_period = 04/07/2006 12:30 I should consider 04/07/2006 12:10 as the initial datetime, 04/07/2006 12:20 as the final datetime, and count only 10min of work to him. In code: if(logon_time_id < start_valid_period) initialDatetime = start_valid_period else initialDatetime = logon_time_id if(logoff_time < end_valid_period) finalDateti ...Show All
Game Technologies: DirectX, XNA, XACT, etc. CreateDevice Failed.
So I have just recently started into DirectX native programming, and I had my application running without error; but I changed something within the code and now I am having a crash when trying to run the application though no compiler error on compile. Comming to forums have been my last resort, but I can not for the life of me figure out why or what I can do to fix this crash. Below is a link to the related code and the output from the debugger. Any help would be greatly appriciated, thank you in advanced for any insight given. Related files: http://www.dev.zetahost.net/public/D3DError.txt It might be that a certain D3D object creation call is failing and your code is not checking for that, and you're jus ...Show All
Visual C++ DLLMain defined in .obj file?
Does anyone know if when you use the wizard to create a dll in visual c++, it puts the definition of DLL_Main in the Project_Name.obj file I get an error when I add in a definition of it in the cpp file, saying its already defined in the obj file. It's not in the cpp file when I first create the workspace. " The wizard isn't creating the DLLMain entry point in the cpp file" But what does the wizard add in the cpp file Are you sure you are using the DLL wizard "but the calling program (in VB) still is able to call the dll function" Do you mean that you are calling DllMain from VB explicitly ! You should not do this, it's the system's job to do it. ...Show All
Windows Forms Strange Toolbar Error
I'm building a simple C# WinForms app and am getting a strange error. Upon starting the application I check whether certain key registry values have been set. If not, then I display a little "Options" dialog box to collect them. Prior to doing this I display the regular main form in the background to give a more pleasing aesthetic feel to the user. Both of these forms are launched from "Main". Here's the strange thing though: When the app is run the first time as described, the toolbar buttons refuse to fire an event.. The menu events work fine but not the toolbar ones. So I guess the toolbar's event handler isn't getting activated but why wouldn't it Is this a known bug with the toolbar or I have done something wrong ...Show All
Visual Basic Dynamic drawings in VB.Net
Hi, Is there any VB.Net equivalent to the vbXorPen and vbNotXorPen options of the DrawMode property in VB6 These options were very usefull to create dynamic drawings. Thanks by advance, Pierre Hi Reed, There must be something I missunderstand. Trying your sample code in my application, I actually obtain an ellips that moves with the mouse pointer, but the initial drawings are all deleted as soon as the mouse pointer enters into the PictureBox. So the ellips moves on a white surface ... For information, my PictureBox contains axis and scales plus several curves ploted point by point. I have implemented a re-drawing of all these items in the form_paint event of the form that contains ...Show All
Visual Studio Crystal Report with Window Services
Scenario : text file generated from a separated system into a folder. Then I wrote a window services to monitor the incoming of the text file. Once the text file is detected, crystal report within the window services will generate a dataset for the crystal report source and will output to a printer. I have tested the logic with a window console application and everything seems to work. Unfortunately, with window services the report is not generated. I am just wondering, is crystal report able to work in such an environment Or perhaps due to the permission issue BTW, the window services is installed via Local Services permission. Please advice. TIA What may be happening is that because you are running it ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Textures don't show up when using Basiceffect
Hi, I'm just trying to create a couple of walls and apply a texture to them. Unfortunately, when running the program the walls just come out as a grey sort of colour (depending on the texture, the shade of grey seems to change). I'm assuming there's something obvious I'm missing, so I'm hoping someone can help me out. Here's snippets of code handling the basiceffect: //In loadgraphicscontent: Texture2D wallTexture = content.Load<Texture2D>("Content\\Textures\\em2"); theWalls = new Walls(wallTexture); wallEffect = new BasicEffect(graphics.GraphicsDevice, null); //wallEffect.DiffuseColor = theWalls.TheColor.ToVector3(); wallEffect.TextureEnabled = true; wallEffect.Texture = theWalls.WallTexture; w ...Show All
Visual Studio Express Editions Unable to read data from the transport connection:
hi, i am trying to send email using VB2005 but i am getting this Exception. "System.IO.IOException = {"Unable to read data from the transport connection: net_io_connectionclosed."}" while from same machine i am able to send email with same SMTP server from OutLook Express. what could be the reason objSMTPclient.PickupDirectoryLocation = "C:\Inetpub\mailroot\Queue" Try objSMTPclient.Send(objMailMessage) ' Should be linefeed after try Catch ex As Exception End Try If this is just a typo I don't know what's wrong, otherwise you should edit that. Grtz, Tom. ...Show All
Visual Studio MSBuild VSS Integration
Hi, I want to retrieve the latest version of source code from CVS through MSBuild. What modifications should i make in the .csproj file (I am developing c# application in visual studio environment) to get this working. It would be great if you can give some insights into this through sample codes or help documents. thanks, -rajesh Hi, I would ideally want to get the latest version of source code if there are any changes commited by any of the users. Basically i want to know how to get the latest code from VSS through MSBuild. I may not build the project from VS rather from VS Command Prompt. thanks, -rajesh ...Show All
Visual Studio Team System MSF 4.0 related exams
Is there any MCP exam related to MSF 4.0 Not yet. In the short term we will have one for TFS as a whole. A specific MSF4 exam is still in the planning stage. Regards, Clementino Mendonca ...Show All
Software Development for Windows Vista Advise on creating Oracle Persistence
Hi Everyone, I've started to attempt an oracle persistence service as i've no choice on database. I've taken the schema scripts from the sql server persistence and mapped them into a set of oracle tables. Now its the stored procs. For now i'm not wrrying about locking or anything like that but am looking purely at getting the data in. The signature for the sql server sp is: Create Procedure [dbo] . [InsertInstanceState] @uidInstanceID uniqueidentifier , @state image , @status int , @unlocked int , @blocked int , @info ntext , @ownerID uniqueidentifier = NULL, @ownedUntil datetime = NULL, @nextTimer datetime , @result int output , @currentOwnerID uniqueidentifier output Wha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Need help with joint rotations
Yes, I'm creating my own skeleton system. I'm getting some strange behavior. I have the following recursive function to set the global transformation matrix for each joint. I know I've named a class bone, but more accurately, it should be named joint. public void SetGlobalMatrix(Matrix parent) { Matrix quat = Matrix.CreateFromQuaternion(m_orientation); m_globalTransformation = parent * m_translation; Matrix temp = m_globalTransformation * quat; foreach(Bone bone in m_children) { bone.SetGlobalMatrix(temp); } } The translation matrix is creating with the following function: public ...Show All
Visual Studio Express Editions Showing "1 000" instead of "1000" in textbox.
OIkai, this might be very simple, but I have a textbox with "1000000" in it. And I want it to be shown as "1 000 000". There must be a way to get the data out and change it, and then put it back in the textbox again. Anyone know how And question 2, I found a old vb6 code: If KeyAscii > 26 Then If InStr("0123456789", Chr(KeyAscii)) = 0 Then KeyAscii = 0 Its for making a texbox accept numbers only, but it keeps giving me error on KeyAscii. How can I make it work in vb exp bankbalanse.Text = Trim(Format(CLng(bankbalanse.Text), "# ### ### ### ###")) It made this error: System.StackOverflowException was unhandled But the strange thing is, it only make that error when I add more than one of those codelines. If I like add another to an ...Show All
Visual C++ C2555 error in VS C++
I received error C2555 when trying to compile my VS 2005 C++ code. I found the following reference and it said under STATUS it has been fixed in Visual C++ .NET version. http://support.microsoft.com/kb/240862/ Should I not be getting this error anymore or am I missing something I am running Microsoft Visual Studio 2005 Version 8.0.50727.42, .Net 2.0.50727, Visual C++ 2005. That's also ill-formed code. In VC8 (VS2005) you get the error: error C2955: 'OptionFactoryTemplate' : use of class template requires template argument list ...Show All
SQL Server MDX SQL Report Parameter
I am trying to filter a hierarchy with another hierarchy but I don't seem to be able to get it working.. I am not sure if it is possible but I can't even do that in the UI itself so I am not very sure. I have two hierarchies called "Region - District" and "Account Unit - Account", what I want to do is simple -- filter the Account Unit - Account hierarchy with a member in Region - District. Here's what I have tried but both return the whole thing for me. Any help will be appreciated! WITH MEMBER [Measures].[ParameterCaption] AS '[Dim Account].[Account Unit - Account].CURRENTMEMBER.MEMBER_CAPTION' MEMBER [Measures].[ParameterValue] AS '[Dim Account].[Account Unit - Account].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures] ...Show All
