Alvin Kuiper's Q&A profile
.NET Development Multithreading question
Hello, I have a small program with a form control and two threads. These two threads are identical with only difference is the first one reads the top part of the SQL table, while the other one reads bottom part. Both use the same DLL (that I include using imports statement) and instantiate the same class within their code areas. Now, I want these two threads to use dll and do the work simultaneously. But, they seem to take turns. (I have a counter on the form for both ). I see that when one starts, the other one stops. When the second starts, the first stops. How do I make both run at the same time. They use same table for reading and updating the DB. Thanks in advance, Noorul Ok, Here is what I am doing ...Show All
SQL Server Getting "Permission denied" error in ExecuteSQL task
The purpose of the Package is to load an SQL table with data from text files in a subdirectory. The parameter is parsed from the text filenames. It is a zipcode. I have an ExecuteSQL task inside a ForEach container. The SQL in the task is: IF EXISTS (SELECT * FROM dbo.ZipCodeRadius WHERE CenterPostalCode = 1) BEGIN DELETE FROM dbo.ZipCodeRadius WHERE CenterPostalCode = 1 END I also have a Data Flow task in this container which populates the ZipCodeRadius table. The same parameter is also passed to the Data Flow task which specifies a zipcode to delete and afterward load. I am using Windows authetication for the package. What am I doing wrong Fred You already have the variable ready to pass ...Show All
Windows Forms Form validation - Please help
HI I have a form with many tabs and textboxs. I have a button in the form to validate the fields , If its validation sucessfull it will save to the database OR it has to be directed to the relevant textbox in the TABPAGE. How I can direct the user to the relevant field if validation fails. (Note: I have many tabs in the form) I am using following code Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click ValidateCertAgent() (----If the above validation Fails, then user directed to the relevant text box or should be passed to the next validation---and so on---) ValidateCertProperty() ValidateCertPurchaser() ValidateAgentName() ValidateTrustee() If txtold.Text = "" Then ...Show All
Audio and Video Development Add source while broadcasting
Hello, I have a question about Windows Media Encoder. Is it possible to add a source (like a wmv-file or an image) while the encoding is in session. Thanks Samall Questions about Windows Media Encoder belong on this newsgroup: http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx dg=microsoft.public.windowsmedia.encoder&lang=en&cr=US That said, I happen to know that if you know what the source is up-front, you can just add it to the list of sources. This is done through the Sources tab of the Session Properties. While encoding, you will see UI that will allow you to dynamically switch sources while encoding. That's about all I know, though, so don ...Show All
Windows Forms Closing a Modal Form that is Showing a MessageBox Form.Hide() works Form.Close() does not.
I have a form that is shown using ShowDialog. The form is the UI for a long running process. The user may choose to cancel the application by pressing the form close button (red X) and at that time a Yes/No messagebox will appear. If the long running process completes while the messagebox is shown I wanted to close the messagebox and then the form. If the messagebox is not shown then the form Close method works. If the messagebox is shown then only the form Hide method will close the form. I am concerned that I am doing something wrong so I am looking for suggestions as to the correct method to employ . C# .Net 2.0 sample code that will demonstrate the issue is below, to get it to work change the this.Close to this.Hide. Start by creating ...Show All
SQL Server ERROR IN SQL SERVER ENGINE
I have a problem starting my SQL Server engine. Its service has been stopped. It was working properly till evening “ December 8, 2006 ”. But when I came to office at 10:00 AM, it did not start. When I checked the service in “Services.msc”, it was stopped. So, I tried to start the service “ SQL Server (MSSQLSERVER) ”, but it failed with message “ Error 1069: The service did not start due to a logon failure ”. I opened “Event viewer” and looked the list in “Application” log to find out what had happened. There was an entry for “SQL Server” source with type “Failure Audit”. There was a message “ Login failed for user sa ”. What went wrong….Can someone help me Plz its urgent…. My company deals with many IT solutions li ...Show All
Visual Basic Could someone point me in the right direction?
Not even sure where to start. Need to subtract quantity from inventory table when quantity is added to invoice table. Start with transaction stored procedure Any guidance would be appreciated. At the time of invoice (i.e) adding a entry in the invoice table .. in that stored proc remove the quantity that is invoiced in the invoice table add invoice entry set status in the general table subtract quantity from the inventory table.. set status in the general table You can either use transaction (BEGIN.... END) or use status as i told.. its your wsh.. transaction will be more professional. i think this should help you.. ...Show All
Visual Studio 2008 (Pre-release) Querying xml file without loading it into memory?
Hello, I am new to Linq and was wondering if it can be used to query an xml file without loading its contents into memory. I have a big xml file (~100MB) and would like to perform queries on it such as counting the nodes that have some attributes set, etc... If I use the XElement.Load method the whole contents of the file is loaded into the process memory. So is there a method that can be used to achieve this I would appreciate any suggestions. Thanks. We are working on a feature that would at least partially meet the need for querying over an XML stream using some small extensions to the LINQ to XML API. We have not finalized the design or tested prototypes, so I don't want to say much more at this time. ...Show All
Visual Basic inventory program
Hi, I'm interested in making an inventory program for my business which sells items and we need to keep track of our inventory and quantities of items. Does anyone know of a tutorial that I can be directed to to learn how to make this program or can anyone lead my through the process themselves This would be much appreciated. Thanks, -Isaac Where to start depends on the complexity of what you want to build. If you are simply looking to keep track of items, quantities and customers, MS Access comes with a sample database called Northwind.mdb that does just that for a fictitious company, you might get some ideas for what you want to build there. ...Show All
Visual Basic Failed to add TableAdapter error
I've created a solution with a windows forms project and a class library project. In the class library I added a "DataSet.xsd" file. When I try to drag a "TableAdapter" from the toolbox to the design surface of the dataset I get the following error: Failed to add TableAdapter. Key not valid for use in specified state. in a messagebox... Any ideas how to get around this When I hit OK the tableadapter goes away. Thanks, Jason Not sure if anybody still cares but: Make sure that there are no invalid data connections in your Server Explorer tab. I had several invalid entries after a server name changed and removing the invalid entries fixed the problem for me. Jamie. ...Show All
SQL Server Why select top 100 percent was disabled in SQL Server 2k5 views
And how to get it work And by the way why Sql Server 2k5 became slower then 2k How to get to query planes in the management studio So, because "select Top" is a Cybase inheritance, nobody needs it So, I don't have a hint or options unless I create an indices and use noexpand hint and use hint index(index_ID) By the way do you really believe that the performance the only consideration and the code maintanability is nothing. By the way if stored procedure returning ordered dataset, is it also "optimized" If so how anyone can order it ...Show All
Visual Basic help with font color
Ok hello, I want to know how to make a specifiec text when typed in a rich text box to turn example(red). and say i type(answer) and answer turned blue. -thanks ArNy The following is what you need Dim x As Integer x = Me.RichTextBox1.Find(TextBox1.Text) Me.RichTextBox1.SelectionStart = x Me.RichTextBox1.SelectionLength = TextBox1.Text.Length Me.RichTextBox1.SelectionBackColor = Color.YellowGreen All you would need to do is determine the selection positions, lengt ...Show All
Software Development for Windows Vista Any licensing required using WWF?
Hi All Had this question in my mind before making a sw product out of WWF for my business. Have around 50 licenses for VS 2005 Developer's Edition. Now creating some workflows in new sw products. Download WWF Extensions for VS 2005. These extensions have the WWF Debugger & the WWF Designer in them. Do I need any additional license to use these Extensions in my products. Thanks VK Hi Vishal No you dont need any additional lisence for that ! , moreover as WF is integral part of .NET Framework 3.0 you can leverage it without having to purchase any other lisence (same as .NET Framework 2.0 and .NET Framework 1.x ) If you also have some questions in mind regarding usage of WF as ...Show All
Windows Forms Need a Working Sample of DataGridView Link 2 Tables
hello, I need working sample of a datagridview showing a relation between 2 tables as a link. I have 2 tables in my dataset. Table RNT_PETICIONES which has a COD_PERSONAL external key, and the RNT_PERSONAL table also has COD_PERSONAL as primary key. I have the DataSet in my project and the relation are corretly set. But when I bind PETITIONS to the datagrid I do not see the sub-link of the CLIENT table. I also tried doing this manually with no succes. Please post sample code here as I'm restricted to only microsoft.com -Thank You P.S. What I'm really interested in doing is getting varous columuns from different tables and showing them as 1 table in the datagrid, being able to edit the datagrid and saving the data to the cor ...Show All
Windows Forms datagrid troubles with stored procedure (vs 2003)
I have the following code: Dim daGrid1 As New SqlDataAdapter(Me.SqlCommand1) (a stored proc) Dim dsGrid1 As New DataSet dsGrid1.Clear() daGrid1.Fill(dsGrid1, "top") DataGrid1.DataSource = dsGrid1.Tables("top").DefaultView I set the command to a stored proce and fill a dataset, then set the datagrid1 to the dataset table. I can then see the data grid on the form filled out. I need to change the column headings, hide some columns, then click on a row, and get the hidden field and pass it on to another form. I thought I would need a table style for that. But when I try to add one, I get: "The data grid table styles collection already contains a table style with the same mapping name." ...Show All
