Michael Ruminer's Q&A profile
Visual Studio Express Editions Date conversion
I need to create folders with the date as part of the name. (How can I remove the slashes) The folder name should be "111206_<student initials>" when application is executed on 11/12/06 msStudentDir = FormatDateTime(today(), "yyyyMMdd" ) & "_" & gsInitials & "\" doesn't work Use this: msStudentDir = Today (). ToString ( "MMddyy" ) & "_" & gsInitials & "\" -- SvenC ...Show All
Commerce Server Developer's workstation
I'm still struggling with the notion that all of our developers must have Windows Server 2003 running on their desktops to build CS based applications. There are few references on the net about this and the bottom line is that doing it on XP is an option but not recommended ('I told you so' on one of the blogs). Being aware that some features may not work (warehousing) I still would like to have development done on XP. I've installed CS2007, already have VS2005. I've unpacked CSharpSite and when trying to access the page get this error: ' Login failed for user ''. The user is not associated with a trusted SQL Server connection'. I went to Commerce Server Mangager and for each (I hope I've covered all) connection to into Profiles, Mar ...Show All
Game Technologies: DirectX, XNA, XACT, etc. BSP Trees, Polygon Complexity (?)
Hey all - I've been working on segmenting a polygon to some arbitrary complexity. When I first encountered this problem, I took in an array of Vector2[]'s, computed the centroid, and walked the outside, generating a list of polygons to draw triangle lines from the centroid to. ( I walked the outside with Bresenham's Line Algorithm ) However, this isn't really going to solve the problem for me - it generates a set of triangle faces that have no coordinate points between the centroid and the exterior of the polygon. I've been trying to solve the problem, and I came across documents discussing BSP trees and how they're generated. While most of the articles I found discussed BSP trees for rendering sets of polygons that may or may not span th ...Show All
Windows Forms How to change Text property of label control from a thread
Hi Can anybody help me to change the text property of label control from a thread.(when a thread is running I need to change the Text property of Label) Thanks vizai Hi, Check the below code.. this would solve the problem... Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objThread As New System.Threading.Thread( AddressOf changeLabelText) objthread.Start() End Sub Private Sub changeLabelText() Label1.Text = "New Text" End Sub ...Show All
Visual Studio Windows SDK July CTP breaks documentation - again
Windows SDK July CTP has once again borked my documentation. This time neither my MSDN Library nor my Visual Studio Combined Help documentation works. My MSDN Library link generates the following error message: --------------------------- Microsoft Document Explorer --------------------------- Microsoft Document Explorer cannot be shown because the specified help collection 'ms- help://MS.MSDNQTR.v80.en ' is invalid. --------------------------- OK --------------------------- My Visual Studio 2005 Combined Help loads but has completely lost all the help collections from MSDN, Windows SDK, .NET, and SQL Server. The only things left are minor third-party tools help. Repairing Document Explorer get's me a little further. My SQL Server 2005 d ...Show All
SQL Server How to stop running DTS package if my view return zero record?
Hi everyone, I've created a DTS package runs on every day and night, but now my boss was asking if I can insert an exception code to check the view file. So.. I need help from you guys, cause I don't know How. This is my DTS description. My DB will generate a view called "Calls to Add", then it will run the Transform Data Task and insert into a txt file. once it finished, it will run the Batch file. that is it. Now My boss wants me to add a checking code between "View to Txt" procedure. If the view has no record inside, than the DTS package should stop and not run. BUT How Can someone please help Thanks Kelvin Y wrote: Thanks everyone, it works now. Thanks for helping me out. Please m ...Show All
Visual Studio 2008 (Pre-release) GetChangeText returning an unexpected select
When I run the following code: Northwind db = new Northwind(@"Data Source=.\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"); Customer cust = (from c in db.Customers where c.CustomerID == "LAZYK" select c).Single<Customer>(); cust.Region = "Washington"; Console.WriteLine(db.GetChangeText()); I get these results: UPDATE [Customers] SET [Region] = @p11 FROM [Customers] WHERE ([CompanyName] = @p0) AND ([ContactName] = @p1) AND ([ContactTitle] = @p2) AND ([Address] = @p3) AND ([City] = @p4) AND ([Region] = @p5) AND ([PostalCode] = @p6) AND ([Country] = @p7) AND ([Phone] = @p8) AND ([Fax] = @p9) AND ([CustomerID] = @ ...Show All
Visual C++ error
I have this program to chk time, but the accuracy is 2 sec. I want more accuracy ( 1 sec or less ) pls help , thanks #include <io.h> #include <iostream.h> #include <conio.h> #include <windows.h> int main(void) { FILE *stream; std::ftime ft; int h,m,s,ms; if ((stream = fopen("TEST.$$$","wt")) == NULL) { fprintf(stderr, "Cannot open output file.\n"); return 1; } getftime(fileno(stream), &ft); h=ft.ft_hour; m=ft.ft_min; s=ft.ft_tsec; printf("File time: %u:%u:%u\n",h,m,s); printf("File date: %u/%u/%u\n", ft.ft_month, ft.ft_day,ft.ft_year+1980); fclose(stream); cout << "\n\nPress any key to continue"; getch(); // wait for key pressure return 0; } ...Show All
.NET Development Changes made to gridview
I'm exporting an excel file to a gridview. After the changes are made, I need to update the changes to database. Will the changes made in gridview get reflected in the dataset automatically or is any work required well how are you actually adding the items in the gridview via a dataset what is the code you are using you basically need to use say a dataset and a dataAdapter, implement the correct insert commands for the dataAdapter so it can then update the database correctly. Can you show the code you are using ...Show All
.NET Development Returning a string from the Main method in a Console Application
Can I return a string value from the Main() method of a Console Application The scenario I am looking for is: 1. Program1 returns a string (say "hello") 2. Program2 must take this as input and process the job as required (say print "hello" twice). Is it possible for me to return a string instead of an integer or nothing using Main() method No it's not. What you can do is write the standard output stream from Program1 (e.g. using Console.WriteLine) and read from the standard input stream into Program2 (e.g. using Console.ReadLine). Then you can pipe text from Program1 to Program2 on the command line. e.g.: C:\> Program1.exe | Program2.exe ...Show All
SQL Server Copying database using "Copy Database"
I am struggling with the "Copy Database Wizard" in SQL Server 2005. I am used to working with DTS to copy data from one server to another, but with the new tools, I am having serious problems (in fact, it's unusable) 1. When copying a database using the "SQL Management Object" method, I always get errors concerning logins. If I select not to copy logins, I get errors "sp_grantdbaccess failed". If I do select to copy logins, the logins can't be created because the machine names are different (one the source machine, the login is called MACHINE1/mylogin, but on the destination machine, such a login cannot be created) 2. For small databases, I ALWAYS get the error "CREATE DATABASE failed. Primary file must be at least 3 MB to accommodat ...Show All
SQL Server Using Views/Stored Procs in one Db, Data in Another
I am moving an app from Access 2003 to C#/SQL Server 2005. The Access app has one front end exe and two back end databases. One back end db is for UK users, one for US users. The tables and structures are identical, but the data is different. UK users link to the UK back end, US users to the US backend. (The queries are in the front end) In SQL Server, the view and stored procs will be in one database (KCom), the US data tables in another database (KUS), and the UK data tables in another (KUK). All databases are on the same server. My question is how to let the views and stored procs in KCom know whether to pull the data from KUK or KUS. In the front end app, I use ADO.Net to deal with the SQL Server databases. I have not been able to fi ...Show All
Visual Studio Team System "Invalid Symbol Data" when running CodeCoverage on build server
Hi, I;ve enabled code coverage within a testrunconfig that my build server is using, however, I am seeing the following error when the build and test completes: The Code Coverage Analysis Service could not analyze the code coverage data for build Ammado.Services.Nightly_20060724.2 (Any CPU/Release). This is frequently caused by publishing different versions of the same binary to a particular build. Processing of code coverage data from run tfsservice@BUILD001 2006-07-24 10:38:08_Any CPU_Release caused the following exception to be thrown: Error when querying coverage data: Invalid symbol data My tests are running, and I would love to see the codecoverage results. I have no idea how to proceed, so would appreciate any feedback... Pete ...Show All
Visual Studio Running VS 2005 under a non Admin Account
I am trying to stop logging into my machine as a adminstrator. To do this I tried to launch VS 2005 with this command: C:\WINDOWS\system32\runas.exe /env /user:<Administrator Account> "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" Where <Administrator Account> is replaced with an appropriate account All seemed fine until I tried to design a stongly typed dataset. Then I got the message the message: Key not valid for use in specified state I got around this by removing the /env. (I think the encryption key is based on the user's sid but with the /env switch I was referencing the key for my logged in account as opposed to the runas account) I also had a problem when I deleted files. The fil ...Show All
SQL Server Clustering of SQL Server 2000(SE)
We are looking for clustering of SQL Server 2000 [standard Edition] using third party software, any inputs in this regard would be of great help ...Show All
