programmer01's Q&A profile
SQL Server SMO Performance: .Alter()
Is there anyway to do a batch alter on the whole database rather than just a table I've looked at the MSDN documentation for Database.Alter() and as usual it has nothing helpful. I've also had a search around on the forums and the net in general and can't spot anything on how to achive this. Any pointers would be greatly appreciated. What exactly are you trying to accomplish If you've made changes to properties of the database, then the Alter() method will implement them. If you're trying to change properties of other objects you've got to use the appropriate method for those objects. Please supply more details so we can help with your specific question. ...Show All
Visual Studio Team System What happens if user change of domain ?
Hello All, I have some users (DOMAIN\user1, DOMAIN\user2) that are now using TFS. In my company, they want to create a new domain, let's call it DEV to migrate the users in this new domain. Is there any way in TFS to automatically update the user so ex-DOMAIN\user1 is now recognized as DEV\user1 (so updating the security, the shelves, the check-out, the workspaces, ...) Thanks ! This is what "TfsAdminUtil sid" is all about. after migrating all the users, you should be able to "TfsAdminUtil Sid /Change OldDomainName NewDomainName" and it'll go through the users from the old domain name and update those entries. http://msdn2.microsoft.com/en-us/library/ms253054.aspx ...Show All
Visual C++ atof rounding error
Hello, While using visual studio 2005 I noticed an odd rounding error where 0.0355 gets converted to 0.0349 when atof("0.0355") * 100000.0 is done. If you run the code below you will see it printed out. Any help / ideas would be appreciated. string strList[2] = { ".099999", ".0355" }; for ( int i=0; i<2; i++){ string strVal = strList [ i ]; double fVal = atof(strVal.c_str()); long lValx10 = ( long ) (fVal * 10.0); long lValx100 = ( long ) (fVal * 100.0); long lValx1000 = ( long ) (fVal * 1000.0); long lValx10000 = ( long ) (fVal * 10000.0); long lValx100000 = ( long ) (fVal * 100000.0); cout.setf(std::ios::showpoint | std::ios::showpos); ...Show All
Windows Forms how can i change the cell value like ("A"&1)...
how can i change the cell value like ("A"&1)... i want to change the Alphabatic value like A,B,C...... thanks ...Show All
.NET Development Convert Stream Reader into XML Format
Hi I am receiving an xml file via http post..from a third party vendor. StreamReader streamReader; streamReader = new StreamReader(Page.Request.InputStream); line = streamReader.ReadLine(); do { //Writing XML String Content in a Log File. Logging.Logger.log("\n" + line + "\n"); line = streamReader.ReadLine(); } while (line != null); This is the code which i am using to recieve an xml file... I just want to see the content of the xml file... so that i am writing the output xml stream in a log file, but i am unable to see the <XML> tags... nor in an xml format the out put of the xml string is like this "%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3CBooks%3E%0A++%3CASP.net ...Show All
SQL Server Is it safe to change SQL 2005 related service accounts' password with script?
For our new SQL 2005 servers, I plan to create individual domain service accounts for components. For example, Myhdq\SVC-HDQSQL1-AGN for SQL Agent Myhdq\SVC-HDQSQL1-SQL for SQL service Myhdq\SVC-HDQSQL1-FTE for FullText Myhdq\SVC-HDQSQL1-IS for SSIS Myhdq\SVC-HDQSQL1-BRW for BRW However, my company requires password to be 25 char long and with many special characters. Also we have to change password frequently. To make it easy for us to manage these service accounts on many SQL servers, I plan to use script to change the password, instead of using the GUI SSMS. The script below seems to work for me. I can run it agains multiple SQL servers to change password quickly. Then use another script to restart the services. ...Show All
SQL Server Mirroring Partial Failover
I'm testing mirroring in a high availability mode and getting some odd results. If I kill the SQL Service (or reboot the machine) fail-over works quickly and correctly. If I unplug the Network cable though I will get some of the databases failed over and some of the databases will either be Mirroring / In recovery or Principal / In recovery and never go live. Right clicking on them and going to properties lists there error that the database is unable to communicate with the Partner or Witness. The databases that this will occur on seem to move around (i.e. it isn't always the same databases, but will often be many of the same databases). If I reboot the databases that will not fail over tend to change fairly dramatically. I've seen instanc ...Show All
Visual Basic textbox to *******
got a password textbox linked to my Database. Everything is working fine but i need to password to be ****** out. I'm sure this is easy but i have been messing with it and can't figure it out. Thanks Michael Hi, try setting textbox's UseSystemPasswordChar property to True. [Update: Changed UseSystemPassword to UseSystemPasswordChar, thanks Jared] Andrej ...Show All
Visual Studio NotImplementedException on OnComponentChanging/Changed
Hi, I have found a problem/limitation with CustomWizardPages which I would like to patch, but I don't know where to start... Here's the context : I have a CustomWizardPages which contains a DataGridView. It is bound using the same method as used in the Web Service Software Factory guidance package. One of the columns in this DataGridView is a strongly-typed IList implementation (List<SomeObject>). The DesignerColumn offers the right TypeEditor for the collection; a CollectionEditor. The problem occurs when I press "Add", "Remove", "OK" or "Cancel" in the editor form. Here's the exception that arises : System.NotImplementedException : "The method or operation is not implemented." at Microsoft.Practices.WizardFramework.ValueEditor.Ser ...Show All
Visual C# Open Excel file stored in Access database
I need to open an Excel file that has been stored in the Access Database using the insert Object functionality of MSAccess manually. What i am aware of is that i cant just read the field containing the Excel File into a Byte Array and pass it to the Excel object in C#,as the file is wrapped in the OLE Wrapper used by Access while inserting the file in database. I have tried locating the Header of Excel file from the byte array and read the file from there on but it is not working. Can some one please tell me as to how i can open the Excel File. ...Show All
Visual Studio Express Editions How to get the filename into the "Insert Pictures" dialogue??
Our company written a marco that as same as the "insert -> picture -> from file" dialogue, but we want to enhance it to get the filename automatically when the dialogue box is opened. These forums are for VB.NET questions. VBA (Visual Basic for Applications) then this is a very different product from VB.NET and there are some other locations where you will get a quicker and better response to your VBA questions. You may find more assistance in following which specifically deals with MS Office development. Office Automation: office.developer.automation newsgroup http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US Or the Offic ...Show All
Windows Forms How can we add advance search/filter capabilities to a DataGridView???
Hi! I would like to use an Advanced search dialog in order to provide the final user with advance searching capabilities in my DataGridView...For example to select only those customers names (from the Customer column) that live in a certain city (from the city column)... The BindingSource.Filter method doesn't support this capability...Any help Thanks in advance... Hi Fox3, This following code works for me. I just learned from MSDN. http://msdn2.microsoft.com/en-us/library/ya3sah92.aspx { // Create the connection string, data adapter and data table. SqlConnection connectionString3 = new SqlConnection ( "Password=; user id=sa provider=SQLOLEDB; Initial Catalog=MAINTENANCE;&quo ...Show All
Visual Basic IsDBNull problem
I am probably doing this wrong If IsDBNull(EDFRow.EStart) Then Me .EStartDateTimePicker.Checked = False Else Me .EStartDateTimePicker.Checked = True End If I get the error that the filed is dbnull Can someone please explain this. Davids Learning It is an exeption error It says that the field I am refering to is DBNull It stops my code from executing to give me that error Sorry Davids Learning ...Show All
Visual Studio Tools for Office Cannot access assembly from end user computer
I am creating a simple excel application and saving the assembly on a network folder. When i try to access this from end user's machine i get the "The Current .Net Security policy does not permit the customization to run. Do not change the security policy in your computer. ...." 1.I have ran caspol.exe and granted full trust to the assembly on the end user's machine. 2. When i look at the details of error, it shows the dll is loaded from correct network folder. 3. I have also verified in Framework 2.0 configuration it shows my dll under Local Intranet_Zone. 4. The solution works correctly on my development machine. I am using Visual Studio 2005,VTSO 2005 and Framework 2.0 Thanks in advance for helping me with this. The one ...Show All
.NET Development PPPOE auto redial
I have a little complicated situation, I always loose connection (PPPOE) , and i want to write small application, which reconnects, is there possibility to do this in .Net framework, sample code would be great, thanks. Yes this is possible. See this post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=737123&SiteID=1 Best Regards, ...Show All
