Evan Mulawski's Q&A profile
Visual Studio Express Editions Loops and counters
I am trying to make something that will insert data into excel (I already posted this on the VBA forums but no response, but if someone can give me the starting point I can figure out the excel part). Bottom line is I want to insert data in to a column like: vp0001.jpg vp0002.jpg vp0003.jpg vp00XX.jpg etc. until the last row. My question is how can I make a simple counter to generate the numbers 0001, 0002, etc. I also would need one that can generate numbers like 1,2,3 and start with number 2 so I can tell it which excel row to go into. I know the general idea of how to do this but I have never been good with counters and loops. Dim i As Integer For i = 0 To 10 Console.WriteLine(Format(i, "0000" )) ...Show All
SQL Server Trigger
hello team: i have two tables order and orderdetial, i want from the orderdetail the sum of the quantity of products for each order and then insert this sum in order table infront of each order this is the first part: declare @s decimal select @s=sum(f.quantity) from orderdetails as f inner join orders as a on a.orders= f.orders group by f.orderdetails any one have advise, thanks lot The view is easy: create view ordersWithTotal as select orders.orderId, --order.columns, sum(od.unitPrice * od.quantity) as orderAmount from orders join [order details] od on orders.orderId = od.orderId group by orders.orderId The trigger is far less trivial. You have to take into consideration that mult ...Show All
Visual Studio Express Editions Question about moving items from one listbox to another....
I have a page where I have two list boxes. The first (on the left) is databound to a SQLDataSource. I'm trying to select multiple items from listbox1 (CompleteList) and have their text show up in the the listbox2 (SelectedList). My problem is that only the first item I have selected populates into listbox2. Can someone help me fix my code. Honestly I'm surprised I made it this far since I know nothing about C#. protected void addBtn_Click( object sender, EventArgs e) { ListItem lbItem = new ListItem (CompleteList.SelectedItem.Text, CompleteList.SelectedItem.Value); SelectedList.Items.Add(lbItem); } hi, listitem is a single item , if you want to move a collection then you have to creat a listite ...Show All
Visual Basic An unhandled exception of type 'System.InvalidCastException'
Hello all. I’m trying to learn vb.net at home. I have a book with exercises and now I’m stuck because of this error: An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll Additional information: Cast from string "233.3" to type 'Decimal' is not valid. So there is code from a book: Private Sub btnCalculate_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnCalculate.Click Dim dOrderTotal As Decimal Dim dD ...Show All
Visual Basic How to process Large Binary Files
I'm trying to read Test.bin but I keep getting out-of-memory error The file size is >300MB. I can read smaller files well - but large files are a problem. Anyone has a good snippet fileContents = My .Computer.FileSystem.ReadAllBytes( "C:\Test.bin" ) Thanks. I'm joining many files into one. I'm lost with the syntax layout as to variable placement and types of variables required. Additional code can only help. Thanks. Using file1Reader As New FileStream(File, FileMode.Open) file2Writer As New FileStream(File2, FileMode.Append) file1Reader.Read( file2Writer.Write( ) ...Show All
.NET Development Large payloads and memory allocation
I have a web service method that returns a fairly large payload - around 70MB of xml. The client application break on receive with the OutOfMemory exception. Now, I understand that even though my workstation has 2 gigs of RAM it doesn't mean that all of that is available to my application. But how do I know how much memory IS available How is the memory allocated How can I calculate the hardware requirements for my scenario The stack trace is very generic unfortunately: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.IO.IOException: Unable to read data from the transport connec ...Show All
.NET Development XslCompiledTransform.Transform very slow
XslCompiledTransform is taking more time to transform xml file using xslt files. XslCompiledTransform.Load() , loads and compile xslt faster, but XslCompiledTransform.Transform() is taking more time to transform then using XslTransform class. I have C# code in xslt files for data manipulations and sometimes xml files may be big in size. Hello Vandy, I apologize for the delay. Vasco has asked me to look at the files you sent. I believe your question has been already answered by Sergey Dubinets in this thread: For extended answer look to: http://blogs.msdn.com/antosha/ . In short: In addition to compilation the first transform would also pay the price for JITing. Jtting will happen in first run of Transform() method ...Show All
Visual Studio Team System Setup fails
I have a machine with Vista, SQL2005 Dev Ed. SP2, VS 2005 Team Edition for Software developpers (SP1 + SP1 beta for Vista) and the Team Explorer. When I try to install VS DB Pro I get the error that Visual Studio 2005 Team Suite needs to be installed. What am I missing Regards Thanks Then I'll start downloading the trial suite. BTW are there virtual PC images to give demonstrations with the tool Regards ...Show All
Software Development for Windows Vista Wasapi exclusive streaming
Hello, I'm trying to implement audio streaming using the new Wasapi API. I've managed to make shared mode for recording and playback work but I'm stuck with getting exclusive mode work (AUDCLNT_SHAREMODE_EXCLUSIVE flag). Everything seems to work (i.e. all the calls to IAudioClient etc. return success) but after I call IAudioClient::Start() it seems that the actual streaming never begins, and the callback events are never set. A similar problem happens when capturing in shared mode, the callback event is never set, but I get around that by polling GetCurrentPadding() to see if there's data ready. This doesn't work in exclusive mode because GetCurrentPadding() always reports 0 for capture and on rendering no sample gets 'consumed' by the dri ...Show All
Visual Studio Tools for Office VSTO 2005 SE Beta documentation
The download site for VSTO 2005 SE Beta states: "Documentation for VSTO 2005 SE Beta is installed as a whitepaper along with the software." Where can I find this whitepaper It should be available on the Start menu. Open the "All Programs" menu and the VSTO 2005 SE submenu, and there should be "How to Use VSTO 2005 SE Beta." Cheers, Harry Miller Technical Editor http://blogs.msdn.com/harrymiller This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
.NET Development bunch of asp.net web service questions
I hope this is the right place to post this so here goes....i want to make a web service that has a login page...it should get its username/pass authentication from active directory, the web app then needs to be able to run some shell procs in multiple domains...so far i have the shell proc running in a single domain. I was hoping there might be some sort of way i can create a session that will pass authentication to the machine my proc is targeted at, so it can access the data it needs. Im just wondering about a way to go about this. uber thanx, im a total n00b to this stuff Hi, For steps 2, and 3 mentioned above, the following may help you. In Systems.web section of the web.config, <authen ...Show All
Visual Studio Deploying exe problem
hi everyone, I have an .net exe application, my problem is, this app works on a comp. which installed visual studio.net 2003 , but does't work properly only framework 1.1 installed comp. . Please notice the difference,program works with framework 1.1 but not properly,misses some events. But if you install the visual studio on this computer everything works properly, Please hel me Regards ...Show All
Visual C++ Anyone able to array txt file into cocrrect form?
i am a newbie on C++,since i have searched so many books and question ppl asked here, but i can't solve this problem yet, i need some help.does anyone able to help me out i want to array the txt name 1.txt and save it in 2.txt with new array form. vocabulary1 other form of vocabulary definition1......................single line definition2.....................single line definition3.....................single line definition#.....................single line </> vocabulary2 form of vocabulary2 ............................and so on, many words continue like that with </>separate from 2 vocabularies the request is array the txt1 into like this: vocabulary1|other form of vocabulary1 def ...Show All
Visual Basic DatagridView scrollbars
Hi, I really need help on this one. I have a DatagGridView which has its scrollbars for both horizontal and vertical which can fit around 6 rows before the scrollbars show up. The Form hangs when the vertical scrollbar shows up. My application works fine when im just running it on debug but when im testing it on a published exe, it hangs when the vertical scrollbar shows up. Please any help or ideas will be very much appreciated! Thank you so so much! Stanley Im searching 700 files for certain text and outputs it in the datagridview. results are only around 10-20 rows and 10 columns. ...Show All
Visual Basic Order By DateDiff
Does anyone know how to realize a "ORDER BY DateDiff('d',TheDateColum,ADynamicDate) " in a Report Does not seem to work, see file on: http://www.krasinger.at/public/AccessDateDiff.zip I put the OrderBy in the Report_Open but Access seems to be confused ... Plz Help! These forums are intended for VB.Net development and your description describes a Access issue. Access using a version of Visual basic called VBA (Visual Basic For Applications) which is the internal language within Access. This is not the same as VB.Net Your question is therefore off topic for these forums. You may find more assistance in following which specifically deals with VBA / MS Office developme ...Show All
