SKS72's Q&A profile
.NET Development Singleton and multithreading
Hi! I have a simple question: "Is the code below threadsafe " public class MyType { ... private static readonly MyType p_instance; public statict MyType Instance { get { return p_instance; } } static MyType() { p_instance = new MyType(); } private MyType() { } ... } In this post , I have written an example that guarentees safety of a singleton using a Mutex. ...Show All
Visual Studio Express Editions dataset and datagrid problems
i have a db (access file) i draged a datagrid and connected the thing to the dataset in wizard it automathicly gave me this line in my load function this .workersTableAdapter.Fill( this .db1DataSet.Workers); now i see the rows inside the grid, but i cant seem to change them (when i reopen the program, the rows are the same they were) if someone here knows the subject and can give me some pointers that could be great (if that someone has an email address, icq, or msn, even better, maybe i could even send it to them if they would rather see it with their own eyes) well firstly you have accept changes being called before doing an update() which wouldnt work. so comment out the acceptChanges() before U ...Show All
SQL Server Is SQL Server Express designed for production use?
Per the subject line : Is SQL Server Express designed for production use re: > are you experimenting inconveniences None. I was wondering, mainly, whether SQL Express differed from MSDE ...which wasn't designed for production use. To further the question : Express will only bind to one CPU at a time, and it cannot run queries in parallel. Express cannot use more than 1 GB of RAM at a time for queries and data pages. SQL Server 2005 will handle many more concurrent queries than the Express version. No one database in Express can be larger than 4 GB. Data mining, Data Transformation Services (DTS) and reporting functions are not available for SQL Express. Other functions not available in Express include clustering/mirroring, full- ...Show All
Visual C++ I am use to vb6 and pure visual basic using visual basic express now
But it seems to be all in c language doesnt visual basic express support the typical visual basic language And if so how do I configure it to do so, and find info on winsock and other things that is related for visual basic and not c language Well, 1. You're in the wrong forum 2. Visual Basic Express Edition uses Visual Basic 2005. Visual Basic 2005 and its predecessor Visual Basic .NET have very many differences vs. Visual Basic 6.0. These difference mainly revolve around VB.NET/2005's higher compliance to object-oriented programming principles. There are a lot of excellent articles and books out there concerning how to upgrade your skills from VB6 to VB.NET; you will find these easily using google. Hope ...Show All
Visual Studio 2008 (Pre-release) WS-* list
Hi, is there a complete list of all the WS-* specs that WCF implements for interoperability cheers Allan yes RTM ;-) http://windowssdk.msdn.microsoft.com/en-us/library/ms730294.aspx sorry was to quick out with my question. thanks @llan ...Show All
Software Development for Windows Vista workflow designer - properties
Hi! I am re-hosting the workflow designer, and I have created a custom activity. Now I am adding properties to the activity. Let's say I have a property called X which can be true or false. public static DependencyProperty XProperty = System.Workflow.ComponentModel. DependencyProperty .Register( "X" , typeof ( Boolean ), typeof ( CustomActivity )); [ Description ( "X" )] [ Browsable ( true )] [ DesignerSerializationVisibility ( DesignerSerializationVisibility .Visible)] public Boolean X { get { return (( Boolean )( base .GetValue( CustomActivity .XProperty))); } set { base .SetValue( CustomActivity .XProperty, value ); } } If ...Show All
Visual Studio Microsoft Unit Testing Framework?
Hello, If I am using the Standard or Professional editions of Visual Studio 2005, can I make use of the unit testing framework provided by the Team Suite For example, is this Unit Testing Framework available (and legal) to use outside of the Team Suite (i.e. Team Edition for Software Developers or Team Edition for Software Testers) If so, where can I obtain a copy (or SDK) that can be downloaded and used with my Professional installation I am not looking to get all of the features out the Team Suite into my Professional installation, just the ability to write some unit test classes and have them run in my build script. Would like to continue to use Microsoft tools, but I guess an alternative would be to use NUnit. TIA On ...Show All
Visual Studio Express Editions Loading a list of files into a toolstrip combo box
How do I Load a list of files into a toolstrip combo box Or you can do it with databinding, using system.io.directory.getfiles or my.computer.filesystem.getfiles to generate the file list. ToolStripComboBox1.DataSource = System.IO.Directory.GetFiles("c:\", "*.*", IO.SearchOption.TopDirectoryOnly) ToolStripComboBox1.DataSource = = My.Computer.FileSystem.GetFiles("c:\", FileIO.SearchOption.SearchTopLevelOnly) ...Show All
Visual C# Creating an array of bitArray
Hi, I want to create an array of BitArray(i.e. BitArray[]) and with each BitArray having a size of n. Is it possible Thanks Currently I'm using this. BitArray[] a = new BitArray[numVar]; for (int i = 0; i < numVar; i++) { a[ i ] = new BitArray(numProc); } Would there be a better way what if numVar is >1000 I will have to iterate 1000 times to set the size of each BitArray. In this manner, my complexity will be ...Show All
Smart Device Development Invalid Cast Exception ... making me CraZZZy
OrderDB.cs -------------------- public ArrayList GetOrderRowsByOrderID(int orderid) { conn = new SqlCeConnection(connstring); cmd = conn.CreateCommand(); cmd.CommandType = System.Data.CommandType.Text; cmd.CommandText = "select p.productid, p.productname,p.price, orow.quantity, orow.discount from orderrow as orow join product as p on p.productid = orow.productid where orow.orderid = @orderid"; cmd.Parameters.Add("@orderid", SqlDbType.Int, 4); cmd.Parameters["@orderid"].Value = orderid; ArrayList OrderRows = new ArrayList(); try { conn.Open(); SqlCeDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { ...Show All
Visual Studio Team System MSF certifications
Is there any further news on when new MSF certification can be expected I have put off doing the MSF 3.0 exam as there probably isn't much point if the certification will be replaced shortly. Thanks Claire ...Show All
Visual C++ Visual C++ Coding Help
Hello everyone! May someone please write a quick code for me I've did some re-search on www.google.com , but no luck... Start Button Click { x = www.microsoft.com load time in milliseconds y = 2000 - x z = y * 2 If x is over 2000 milliseconds: { Pop-up message box reading "An error has occured." } If x is not over 2000 milliseconds { Loop Load www.msn.com in y milliseconds. Load www.yahoo.com in z milliseconds. Goto Loop } } I've tried to explain that in best detail as I possibly can think of... If you need any help or don't understand want I want, pelase don't hesitate to ask! Thanks! SDKCodeMonkey wrote: ...Show All
Visual Basic Suppress Printing message box ?
Hi, I have a VS2005 application in which I print out graphics. I would like to be able to suppress the "Printing Document1 etc " message when the job is printing. Can this be done in code, and if so, how. Thanks Tailor Yes, there is: you can set the PrintController of the PrintDocument object to the StandardPrintController . e.g. Dim prn As New Printing.PrintDocument prn.PrintController = New System.Drawing.Printing.StandardPrintController ...Show All
Visual Studio Days of Week and Color Names instead of data
I'm new to CR with VS 2005. All I'm trying to do is to create a report from the fields of a table in an MS Access db. I used the wizard and selected all fields. Of the fields I have A_Number, which is a number up to 13 characters. When this is displayed in the report it shows days of the week instead of the actual A_Number data. I also have a field for Record which shows up with color names, like Fuscia for example, instead of the actual data. After reviewing the rest of the data in the table and what is displayed in the report none of the data displayed is correct. It is as if it is getting it from thin air. Any ideas You were correct about the random data not being present in the actual application. Unfo ...Show All
SQL Server DR: Replication vs. log shipping vs. clustering vs. database mirroring........
Up to now we have gotten by without having any local DR copies of servers (if a sql server goes down we are usually able to get it back in less than 3 hours). But I want more now. I want to trim the "down" window to no more than 5 or 10 minutes. (Immedate failover would be nice but is not an essential requirement. The essential requirement is to loose no data!) I have a spec of knowledge in these areas: SQL 2005 Clustering (requires approved hardware, quorum disk, etc. involved) SQL 2005 Replicaiton SQL 2005 Log Shipping. SQL 2005 Database mirroring. ( needs three servers) Which approach do you think is the most straightforward, sparing of hardware, yet reliable way to get us back up and running after a sq ...Show All
