dvdribeiro's Q&A profile
Visual Basic How do I set delay between code?
Hello all. I would like to enquire how I can set a delay in between chunks of code. For example, after some code which interacts with a server, I am supposed to get a corresponding information from the server before it is appropriate to proceed on to the next part of the code. As the server response is not immediate, therefore an arbitrary delay is needed. What is the proper code format that I need to add I can't seem to find the documentation in the help file. Thanks in advance. The easiest way is often to simply do a sleep: System.Threading.Thread.Sleep(1000) ...Show All
Visual Studio Express Editions How to get MAC Address on remote Computer using VB.NET
How to get MAC Address on remote Computer using VB.NET. Actually I did find another way except this will only work on the local computer. Dim theNetworkInterfaces() as System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() for each currentInterface as System.Net.NetworkInformation.NetworkInterface in theNetworkInterfaces MessageBox.Show(currentInterface.GetPhysicalAddress().ToString()) next ...Show All
SQL Server Suspect mode ... cant even attach mdf file using sp_attach_db
Hi, In sql server 2005... I am trying to take a backup, When i was trying one of my database is marked as suspect, I tried lot of ways finall i tried stopping the service , and copy mdf,ldf files of that database ...and again started the service ... pasted it in other server and tired to attach using sp_attach_db it shows database cannot open, I/O error occured..i also tried sp_singlefile_attach_db Can any one tell me how to bring suspect mode database to normal mode... also how to solve the I/O error when attaching mdl , ldf files. i am sorry , i am using this syntax only... Exec sp_attach_db @dbname = N'TfsworkitemTracking', @filename1 = N'C:\Programfiles\mssqlserver\mssql\data\TfsWorkitemTracking.mdf', @fil ...Show All
Visual C# C# Hashtable Issue
I'm adding key-values to my hashtable (company_data), but everytime I add something new, it adds it to the element from which the hashtable was derived, Universe[ i ]. Universe is just an arraylist of hastables that is declared as a member of the class. Its creating a reference i'm guessing to the original element instead of copying just the actual values. How do I fix this for(int i=0; i<Convert.ToInt32(Universe.Count*0.1); i++) { Hashtable company_data = new Hashtable(); company_data = (Hashtable)Universe[ i ]; Hashtable dm = report.DownloadMnemonics_pri(); foreach(string key in dm.Keys) { company_data.Add(key,GetFactSetData(company_data["ticker"].ToString ...Show All
Smart Device Development Raising OnClick event on WebBroswer?
Hi, I need OnClick Event on WebBroswer. but it is not given with that. Can any one tell me how to raise this event on WebBrowser. Thanks in Advance, Hi, Thank you for your response. Can you please explain more clearly. if it is possible can give me code. Thanks in Advance ...Show All
Visual Basic Not sure how to create this class design. Here is my CLASS anyPerson.Vb. Will this do for you? ....
I was wondering what would be the syntax to achieve an end result of something like this: Dim MyClass as New Class1 With MyClass.User .Name = "Dude" .Email = "Dude@email.com" End With With MyClass.Employee .Name = "Whoever" .Email = "whoever@comp.com" End with I've tried classes within classes, structures within classes; but I keep getting all kinds of errors. This was my last try: Namespace CompanyInfo Public Class Class1 Public Class User Public Name as String Public Email as String Public Referred as String = "Paper" 'A default, doesn't need to be set End Class Public Class Employee Public Name as String Public Email as String ...Show All
SQL Server Visual Studio 2005 Database Project Question
This may be a silly question but I've got a .NET 2.0 application with several projects/libraries. I'd like to have the benefits of a VS 2005 Data Project (deployment, code snippets, etc.) but I can't figure out how to take an existing C# project and allow it to also be a Database project (there should be the extra "Data" tabe in the project's properties). Any tips Thanks! - James 2 questions: 1. What error do you get from SQL Server 2. What are you doing inside your stored procedure Can you paste the code that is not working By default stored procedures are executed in the context of caller. So if you are accessing a table in your stored procedure and if the caller does not have permissions on that table, ...Show All
SQL Server About Web service or HTTP ENDPOINT
Hi All, I met some problems when I walk through a example for Native Http SOAP in SQL Server 2005 for Developers. after I create the HTTP EndPoint in the Management Studio using following code: USE AdventureWorks GO CREATE PROCEDURE EmployeePhoneList AS SELECT C.LastName, C.FirstName, C.Phone FROM Person.Contact AS C INNER JOIN HumanResources.Employee AS E ON C.ContactID = E.ContactID ORDER BY C.LastName, C.FirstName GO DROP ENDPOINT HRService; GO CREATE ENDPOINT HRService STATE = STARTED AS HTTP ( PATH='/HumanResources', AUTHENTICATION=(INTEGRATED), PORTS=(CLEAR) ) FOR SOAP ( WEBMETHOD 'EmployeePhoneList'(name='AdventureWorks.dbo.EmployeePhoneList'), DATABASE='AdventureWorks', WSDL=DEFAULT ) then I can see the ...Show All
Software Development for Windows Vista Creating a sharepoint workflow
Hi, i'm trying to create a sharepoint workflow, i have the steps to create it, but, in the project types i dont have a sharepoint option, i only have the basics options of workflow, i installed Extensions of Visual Studio 2005, Share Point 2007, Share Point Services v3, Office 12 and I dont know if i need something more to create a share point workflow. Can you help me please! You need to download this toolkit - http://www.microsoft.com/downloads/details.aspx FamilyID=38CA6B32-44BE-4489-8526-F09C57CD13A5&displaylang=en ...Show All
Visual C# creating new project and then need to do some my actions
Hi All, I have build a small plugin in VS, and i am creating small utility I want to do action like : when user create new project, i want to ask user to do some action and if he select it that action then i want to start action. f.x if i select new project->console application then after creating project i want to ask him do you want to add xxx file in your project if yes then just follow some steps else back to project. can i do this after each new project Please help me waiting for reply Thanks, Niku You'll probably want to have a look at Visual Studio Extensibility . Questions on Visual Studio extensibility can be directed at the Visual Studio Extensibilty Forum . ...Show All
Visual C# Problem with the HintPath
Hi All I use several third party library in my current project, I add the reference to these dll files by the "Add Reference" dialog.When I inspect my project file,I found that almost each reference element has a hint path pointed to the path of the dll file,except one file.Even after I remove the reference and add it again,the hintpath is still not there. This cause a problem when my project is built in the building server. Any one encounter some similar problem before Thanks I have a similar issue with the hint path not getting added however, the assembles that we are adding are not in the GAC, also the flag SpecificVersion is set to true by default and it should be set to false. Thus far ...Show All
Visual C# How do you define a method with optional/default parameter?
Thanks This feature is not yet availble in C#! You already know Alternates so I'm not going on that side; See this: http://builder.com.com/5100-6373-1050652.html Cheers ;-) ...Show All
SQL Server For XML Path problems
Can anyone tell me how to add multiple columns with the same name Here is an example of the XML format I'm trying to create using For XML Path <TABLETYPE TYPEABBRV=“IDEADISAB” TOTALINDICATOR=“N”> <CATEGORY TYPE=“DISABCATIDEA” VALUE=“AUT”/> <CATEGORY TYPE=“AGESA” VALUE=“6”/> <CATEGORY TYPE=“EDENVIRIDEASA” VALUE=“RC80”/> <AMOUNT>10</AMOUNT> </TABLETYPE> Here is the query I was trying to use SELECT 'IDEADISAB' AS '@TYPEABBRV' , 'N' AS '@TOTALINDICATOR' , 'DISABCATIDEA' AS 'CATEGORY/@TYPE' , IdeaCategory AS 'CATEGORY/@VALUE' , 'AGESA' AS 'CATEGORY/@TYPE' , AGE AS 'CATEGORY/@VALUE' , 'EDENVIRIDESAS' AS 'CATEGORY/@TYPE' , EEC ...Show All
SQL Server Distribution Agent often dies with the following message. Why?
Replication Distribution Agent often dies with the following log entry. At that hour little is ever going on so I am surprised that the error occurs. Failed Job -> JobName: Instance1-DB1-Instance2-33, StepName: Run agent., Message: Timeout expired. NOTE: The step was retried the requested number of times (10) without succeeding. The step failed.. Any ideas where to start Thanks 1. Did you run Distribution Agent in a SQL Agent job If Yes, can you try to run distrib.exe through command line 2. Was Distributor/Publisher/Subscriber started when you run the distribution 3. Do the SQL Agent job owner has the access right to Distributor/Publisher/Subscriber Thanks. This po ...Show All
Visual C++ exhausted the non-paged pool
The issue is that when we created ~ 450 000 read/write locks, we exhausted the non-paged pool, which holds all operating system objects (such as handles and semaphores etc). When this happens, Windows grinds to a halt. Fallowing is the scenario: We are using the multi reader/multi writer to access critical resourses. Fallowing are the Read and write functions: void RWLock::acquire_write_lock() { // Use a critsec for mutual exclusion between writers EnterCriticalSection(&cs); // A writer is waiting InterlockedIncrement(&writers); // We must now wait until all readers have left the lock while (readers > 0) { // Readers on the lock // Decrement writers ag ...Show All
