knikki98's Q&A profile
.NET Development download using webclient with downloadasync
Hello, I'm currently programming in VB .NET 2005. I've got a working programme which downloads and saves the file to the location I choose but I have one problem. If I download using DownloadFileAsync method of the webclient, I receive feedback on how much has been downloaded but I can't seem to queue another file as it fails the first file and begins the next. The only way to pause between the calls to the method DownloadAsync is to insert a messagebox. Now I can solve this problem using the method DownloadFile of the webclient but then I don't get any feedback of how much of the file has been downloaded. the method which calls the downloadasync, Private Sub DownloadButton_Click( ByVal sender As System.Object, ByVal ...Show All
SQL Server I need to change the name of a field...
I need to change the name of a field in a db hoy can I do so ...Show All
.NET Development AssemblyLoad event being fired on GetTypes call
Hi, Is there any scenario wherein calling GetTypes( ) on one of the loaded assembly result in firing AssemblyLoad event I am seeing this behavior in one of my application but its hard to justify why CLR will ever do this. Overall the application is fairly complex, but the code sub-snippet is something like this: Registered to AssemblyLoad event - I have a cache variable to store all of the loaded assembly types which is reset to null whenever the AssemblyLoad event occurs I have another method : LoadTypes() as follows: void LoadTypes() { HashMap h = new HashMap (); Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); for ( int i = 0; i < assemblies.length; i++) { Type[] types = assembl ...Show All
Visual Basic Error BC31019: The specified image file did not contain a resource section???
Hi, I've just added an icon to my project and set it to be the main icon for the program. However, I keep getting this error message: vbc : error BC31019: Unable to write to output file 'C:\blah\blah.exe': The specified image file did not contain a resource section. I've tried creating the icon in two different programs (which didn't fix it), however when I tried with an icon I'd made with one of these programs before, it works fine. Can anyone help shed some light on this Thanks! I just ran into this as well, nobugz solution above worked for me. Just use any icon editor and strip out any format that is above 256. I had included a compressed version for Windows Vista that was included whe ...Show All
SQL Server Execute As error
I have a stored procedure that needs to run with elevated privliges, so I tried setting it to run as one of the db owners. When a regular user tries to execute the SP, I get the error Cannot execute as the database principal because the principal "joejoe" does not exist, this type of principal cannot be impersonated, or you do not have permission. What do I need to set up so a user can be impersonated Did you try as SELF It should work like you want. mpswaim is a user, who is the db_owner group, right You really shouldn't need impersonation for this procedure to work anyhow, since all users have rights to sysprocesses. Here is the script I used to reproduce the situation. I created the users without login for e ...Show All
SQL Server Triggers fire when no records are affected?
Why is it that SQL triggers fire when the result of the insert/update/delete query returns nothing. I have found that I have to make special coding effort in my triggers to detect that condition or they will exceed nesting limits. This problem, IMO, is wasteful of the DBA's time, and the server's overhead! The same case could be made for not firing the update trigger if no data has changed. The engine has to know this, as it is constructing the insert/delete virtual tables. Is this something that the SQL engine designers are considering changing If not, why not That's essentially what I did: IF @@ROWCOUNT = 0 RETURN. I can see your point about the logging when trying to debug an application or ...Show All
Visual C++ Help with something stupid
Ok, people. This is my problem... I have two structures struct Insurance { ... ... }; struct Person { ... Insurance insurance; }; Person * Add(); void main() { Person *array = new Person[10]: ... ... } So I need to assign array members using Add function but I have no clue how to implement this function because it doesn't accept any parameter, but needs to create new object of structure Person and return the same object. Can anybody help me with this Thanks. Thanks man! I'm studying IT , but this is console app and there were some things that wasn't so clear to me, like function pointer. I have started with C++ maybe a year and half ago, and I still have a l ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Easy question - refer to base variable from a component
Hi, I know I'm going to kick myself when I see how to do this... but hey here goes - if I set up a public variable in my main game class, how do I view/use it from inside a component I'm using the default Component code from doing a new>GameComponent btw. I figured I'd just be able to do game.myVariable or similar, but I can't get the component to know anything about variables or methods in the class that created it. Cheers :) Thanks for the help and advice folks. Shawn, I think you're right - I need to focus on getting it to actually do something :) Cheers, LW. ...Show All
Windows Forms error ConstraintException was unhandled
Using VS2005 c# I have a databound combo - to which is assigned the primary key to Access Table. Whenever I change the selection I get the following error. ConstraintException was unhandled Column 'INVNumber' is constrained to be unique. Value '1/2-24"LM' is already present. How can I avoid this error. -using the previous/next button on a bound navigator does not cause the problem - the records are displayed. Found the problem on the combo, databindings - set the text to 'none'. Thanks all. ...Show All
SQL Server How Can I Ignore Accsents and diacritical marks in WHERE statement?
How Can I Ignore Accsents and diacritical marks in WHERE statement i use sql statment for searching and i wont to search in text filds where some accent and diacritical marks have been enterd. like: i want to search for 'e' or 'o' ... letters in this text: "euoa" if i used: "Select * from table where fild like 'e' " the result will be 0 items. Also, same proplem in Arabic accents for eg: if i want to search for ' ' in this text ' ' , using select where statement. what can i do Here is a small example. You may need to read more about collation to completely solve this problem, but this should point you in the right direction. Notice that in the first example, no collation is spec ...Show All
Windows Forms Datagridview-Can be used in 2003??
Dear Team 1- Where can i find the Datagridview control is it only in 2005 or what 2- Is the new versions of .NET can run under linex or else Thank you very much ...Show All
SQL Server Create Table from Row Data
Hello, In SQL Server 2000, is it possible to take a table with one field (column), and pivot the table so that the characters in the row data become the field (column) names of another table ( or in a View) The number of records could vary. If so, how would I do this Sample table; Create Table dbo.MonthlyData ( Categories varchar(30) NOT NULL ) Sample data; Sales Volume 2005-02 TotRefVol 2005-02 Sales Ratio 2005-02 Sales Volume 2005-03 TotRefVol 2005-03 Sales Ratio 2005-03 Sales Volume 2005-04 TotRefVol 2005-04 Sales Ratio 2005-04 Assuming you had some other value to use with the columns you reference you could do something like: Create Table dbo . MonthlyData ( CategoryID in ...Show All
Microsoft ISV Community Center Forums Can you tell me why Int(1.4 * 100) = 139
Can someone help me to find solution: Int(1.3 * 100) = 130 Int(1.4 * 100) = 139 (also Int(1.38 to 1.49 * 100 ) ) Int(1.5 * 100) = 150 (VBA:Retail 6.0.874) Thanks in advace Hello Grifi, I don't know the reason but this should solve your problem Chas Sub test() Dim a Dim b a = 1.38 b = 100 Debug.Print Int(a * b) End Sub ...Show All
SQL Server Timeout in copy databases
Hello and thanks in advance for help, I have configured several jobs in the SQL Server Agent which do a copy of databases from a cluster of SQL 2005 to another SQL 2005 server. I did these from the "Copy Dabatase Wizard". When I run these it works fine with "small" databases but with the two bigger ones I get the following error after 10 minutes since execution started: Event Name: OnError Message: An exception occurred while executing a Transact-SQL statement or batch. StackTrace: at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand) at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(StringCollection sqlCommands) at Microsoft.SqlServer.Dts.Tasks ...Show All
Visual Studio Team System MSSCCI Provider installation error
Hello! One of the devlopers has .net 1.1 framework installed on his computer. He is using Visual Studio 2003 and wants to access Team Foundation Server. I tried to install msscci provider version 1.1 from the msdn downloads website and it comes up with the message: "The setup requires the .net framework version 2.0.50727. Please install the .net framework and run this setup again. The .net framework can be obtained from the web. Would you like to do this now " The user isn't ready yet to get .net 2.0 framework. Please assist. Thank you! I'm sorry for so short answer, I understand now that there is a setup problem. Starting with version 1.0 TFS Msscci Provider is strong ...Show All
