HiTech2k's Q&A profile
SQL Server Sproc sorting on float column: works in 2005, not in 2000
Hi Everyone- I inherited this client's app, which is a .NET 2.0 app running under SQL Server 2000 in a shared hosting environment. I am having problems using an ORDER BY clause on the main search stored procedure in that it will properly sort results in SQL Server 2005 on my dev server, but not in 2000 on the production server. In 2000, it seems to be somewhat random, where everyone once in awhile a result that is out of numerical sequence will sneak in. The column on which I am trying to sort is a float column called SquareFoot. Can anyone tell me what is wrong with the stored procedure below that might be causing this This is an existing stored procedure to which I added in the ORDER BY clause. I should note that .NET/SQL Server ...Show All
Visual Studio Tools for Office F5 -> "File already exists"
Hi, I'm new with VSTO development and been experiencing this really annoying issue. Everytime I hit F5, it launches the Excel document associated with the project. However once Excel launched, it often (not all the time but quite often) gives me the "File already exists" error message. I then must open the Excel file manually from File -> Open. Everything works then. Strange that it doesn't do this all the time, just occasionally. Any ideas Cheers, Victor Hmm didn't have time to try. But I found a 'workaround'. If I leave my original Excel file open, everytime I hit F5 from the Visual Studio it'll re-open the file but this time telling me the file is opened by another user (me) and if I want to open it as &q ...Show All
Visual C++ Getting the address of a reference.
Since a reference is a special kind of objects which holds the address of another object and often is not ever allocated, we cannot get the address of a reference using "&" operator. I think there is a situation when we really need the address of the location which is used as a reference. For example, let us try to implement an old-fashioned function having a variable number of arguments, like this: void MyPrintf(const std::string & format, ...) The implementation of such function will use the well-known va_start macro: void MyPrintf(const std::string & format, ...) { va_list argptr; va_start(argptr, format); // incorrect initialization of argptr ...Show All
Windows Forms Can't sign assembly (ClickOnce: Publisher cannot be verified)
I'm attempting to deploy a ClickOnce app and realize that I must sign the assembly as well as the ClickOnce manifests (AFAIK) to get rid of that "Publisher cannot be verified" and the Install and Don't Install buttons. (someone correct me if I'm wrong here). The problem is, I am using the famous "Microsoft.Msdn.Samples.BITS" dll found here ( http://msdn2.microsoft.com/en-us/library/ms997639.aspx ) in the application. When I sign the assembly within VS2005 and go to do a build, I get the following error: Error 1 Unable to emit assembly: Referenced assembly 'BackgroundCopyManager' does not have a strong name This occurs in the BITS project that contains a reference to 'BackgroundCopyManager.dll'. Unde ...Show All
Visual Studio Team System The internal state of the database project is inconsistent
I got this error Error: The internal state of the database project is inconsistent Unload the project and then reload it to resolve the issue. i already Unload and reload the project but not solved any help Please expand how to delete the Designer Database... I'm not finding this (no doubt not looking in the right place)! Thanks, Scott ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Matrix Interpolation and gameTime
I made a simple cube and created two translation matrices: start = Matrix .CreateTranslation(-20, 0, 0); finish = Matrix .CreateTranslation(20, 0, 0); Then, I figured I could create this simple animation using linear interpolation and the game time, by using the general formula inside a game component: effect.World = Matrix .Lerp(start, finish, (currentTime - startTime) / (endTime - startTime)); I tried all four permutations of updating the time (ElapsedGameTime in update/draw and ElapsedRealTime in update/draw), although I would think that updating in the draw method with ElapsedRealTime would provide the smoothest interpolation. The problem is that the animation is not completely smooth. It has some ...Show All
Windows Forms ClickOnce ISV Mode
Hi All, I've only been looking at ClickOnce for a very short time and so this question may be way too early. In any case: Is there a way ClickOnce can be used to distribute ShrinkWrapped Software. My question is specifically around building the bootstrap executable. Can we manage all of the following requirements: a) There are some redistributables that need to be set up and cannot just do an XCopy and so must be part of the Prerequisites. b) We dont want each customer hitting the Vendor's download area c) We dont want to host the downloads on our own site d) We only want to bundle all of the prerequisites with our deployment media (cd etc.) e) We want to let the customer choose a suitable distribution mode - CD/Network Share/ ...Show All
Windows Forms How to insert, update, delete using DataGrid ?
Hi I am develoing a C# and MS Access application in which I have to display table rows and columns in a DataGrid AND in the same form I have to perform insert, update, delete operations. Displaying the table's contents is not a problem but I need help in implementing insert, update and delete operations. Thanx. Hi, Yes, the DataGridView is a new control that supercedes the old DataGrid. In DataGridView you can take advantage of your old code (the code posted) or try modifying the data directly on the DataGridView by accessing the Rows collection of the grid... // add new dataGrid1.Rows.Add(); // remove dataGrid1.Rows.RemoveAt(<index>); cheers, Paul June A. Domag ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problem applying textures to 3D shapes - only uses 1 px of texture?
I have transparent textures working wonderfully, provided I want all faces to show the same thing. Even using the example in the documentation ( How to: Apply Textures to 3D Primitives) all it appears to use is the top-left pixel of the given texture, no matter what format.If I change the color of just that pixel, the entire face color changes. I've started a brand-new project with just the code from the documentation for the same results. Does anyone know what's going on here, or have a sample of working 3D textures on a face PS: Typo in that how-to. It says 'texturedCube' when the variable used above is 'nonIndexedCube'. Figures, after beating my head against the completely wrong example in the documen ...Show All
Visual Basic week number
Hi How can we calculate week number in one month. I am bit confused about caliculating this week number in one month for example if we take today date 8/12/2006. Now we are in which week 2nd or first week (in december month) Our zone is united kingdom.. Any help Thanks Imports vb = Microsoft . VisualBasic Dim d As Date = Now Dim WeekNumber As Integer = vb . DatePart ( DateInterval . WeekOfYear , d ) edit: sorry ...that gives you the week of the year not month Dim d As Date = Now Dim WeekNumber As Integer = CInt ( Math . Ceiling ( d . Day / 7)) Debug . Print ( CStr ( WeekNumber )) ...Show All
SQL Server SqlDMO connect error from Microsoft Operations manager (MOM)
MOM connects to 19 instances without issue and fails on one (1). The failing instance resides on a server with two(2) other instances that do not fail. Security is setup the same on windows and sqlserver. Receiving error in MOM: "Could not connect using SQLDMO to SQL Instance WEB. However, the instance is currently running." Presents in Event Viewer as: "18452: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." Troubleshooting so far: Created simple SqlDMO VBScript that uses a trusted connection. This works fine from my desktop to all twenty (20) instances yet fails on the one server that MOM is running on. Any ideas The process which is trying the con ...Show All
Visual Studio Team System Cannot databind a csv file
I am trying to databind a csv file to a webtest. I am entering the connection properties as "Microsfot Jet 4.0 OLE DB Provider" and advanced extended properties as "Text" and entering the path of the folder in which the .csv file is located. I am not including the name of the .csv file in the path. No tables show up after the data binding is done, a blank "Choose tables from datasource" box appears. This happens no matter how many times i try. The same functionality works on a different system. Any ideas are appreciated....Thanks! Sean, The only difference I find is that the system I am using has a better hardware configuration than the other one. Both of them have ...Show All
.NET Development .NET Frame Work 3.0, New Controls
Hi Everybody, Please help me regarding whar are the new controls available in .NET Frame Work 3.0 for the latest release. Thanks in advance. Vara When I check out the site, the site had this news item for RC1: The online documentation for the Windows SDK for Vista RC1 and the .NET Framework 3.0 RC1 is also now available. Here are the direct links to the documentation for the .NET Framework 3.0 technologies: ...Show All
Windows Forms How to get valuemember items for selecteditems of a ListBox?
Hi I've a doubt in Listbox control. lstBox.DataSource = Dtable; lstBox.DisplayMember = "Name"; lstBox.ValueMember = "Code"; I bound some data like this. The list box is enable to select multiple items . I need value of selected items(ie) I need the result from value member for selected items(multiple). I seen SelectedItems property for Listbox , but i need result from Valuemember . can Anybody help me in this please. Thanks in advacne. I'm using as fallows MessageBox .Show((( DataRowView )(li.SelectedItems)).Row[ "SymptomID" ].ToString()); ...Show All
SQL Server Insert SQL table into AS400 Alias
I have a SQL 2000 table that I want to insert into an AS400 alias. The 400 is a linked server to SQL. I can insert 1 record at a time with Insert OpenQuery. insert openquery(AS400bck, 'select * from netfil.sp') VALUES(1,6,2493,1,30,180,1,-8.00,0,-100.00,0,0,30,180,180,'',2,'X','','') One of the tables is quite large so I don't want to have to use the values clause. How can I insert the entire table at once Does this work I only have read only access to my AS400 environment... insert openquery(AS400bck, 'select * from netfil.sp') select [columns] from table where xxx=yyy ...Show All
