Topics
-
-
- Administrators
- Leaders
- 3 replies
- 881 views
Hi, I have this piece of code: int[] values; string[] legends; int i = 0; while(reader.Read()) { values[i] = Convert.ToInt32(reader.GetValue(reader.GetOrdinal("total_played"))); legends[i] = reader.GetValue(reader.GetOrdinal("history_artist")) + " - " + reader.GetValue(reader.GetOrdinal("history_title")); } chart.SetValues(values); chart.SetLegends(legends); chart.Render("Most played songs", "", 200, 200); System.Drawing.Image final = chart.Final; graphMostPlayed.Image = final; But when I try to build it, I get these 2 errors: on these 2 lines: chart.SetValues(values); …
Last reply by snarfblam, -
-
- 1 reply
- 908 views
I have a class that has within it subclasses... I am trying to implement a collection of those subclasses as a property of the top most class such that I can utilize a .add() type funcation. such as follows: dim dt as datatable dt.rows.add(dt.newrow) I would like to use this strucature with my classes I have implemented IEnumerator, IEnumerable etc. and am pretty happy with the results - just need this last little thing :) Help Could be that I am working on little sleep...
Last reply by Cags, -
- 1 reply
- 1.3k views
I have a copy of VB.net 2005 express, and I am working on a screen saver. Recently, I've been having a problem where when I press the 'Start Debugging' button and run the program, it does not send a copy of the 'executable' to the debug folder. Anyone know why? It was working just a few days ago.
Last reply by mskeel, -
-
- Administrators
- 5 replies
- 1.4k views
[PLAIN]How to implement ranking system [C#][/PLAIN] I am trying to create a function/algorithm/method in C# to implement a ranking system. I have an array (naTotals[]) that contains the Total Score for each team (where the team number is represented by the arrays index value) I need to find a way to determine the RANKING of each team given their Total Score and store their RANK NUMBER in another array (naRankings[] - where the team number is represented by the arrays index value) So, for example - if naTotals[2] = (20, 5, 15) then after running the function/algorithm/method naRankings[2] should = (0, 2, 1) corresponding to the RANK of each team where 0 is the BEST…
Last reply by Cags, -
-
-
- *Experts*
- Leaders
- 20 replies
- 4.2k views
This is a continuation of a thread that accidentally got carried away. Sorry about that.
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 650 views
I am doing a lot of text manipulation and reading of text files. Example: Dim sb As System.Text.StringBuilder ' this line gives an error since ReadAllText returns a STRING sb = My.Computer.FileSystem.ReadAllText("c:\data\file1.txt") Is there a function similar to ReadAllText that will return a Stringbuilder? Or can I convert the return value to a Stringbuilder efficiently? tia, flynn
Last reply by flynn, -
-
I was just randomly browsing the net (as I spend most my time doing) and found a link to MSDN TV, something that I had previously never heard of. I was just wondering if anyone else had watched any of the episodes, if so what did you think to them?
Last reply by Cags, -
-
- Administrators
- 7 replies
- 1.1k views
ASP.NET Logins I've just watched a few great video's off http://www.ASP.NET, but they raised a few questions. The example view of logins (which was what i was originally trying to find out) seemed to store the logins within the ASP server somehow. I want mine stored in an SQL database. Does anyone please have any examples of how to do this? Thanks Jay.
Last reply by Jay1b, -
-
- 2 replies
- 1.6k views
I am looking to create a movie file (any format MPEG, AVI, etc) from a set of jpg files. Is there a way to achieve this in .NET? I know the JMF (Java Media Framework) has some support for this. Is there any equivalent in .net? Thanks in advance!
Last reply by linesh, -
-
- Administrators
- *Experts*
- 3 replies
- 2.8k views
I'm using the new TextFieldParser class and want to find out how to use the "Find" method of the Array object after I parse multiple fields of a line into a string array. Here is the code: Private Sub ParseData2() Dim fields As String() Dim parser As New TextFieldParser("c:\epp\test.txt") Try parser.SetDelimiters(";") parser.TrimWhiteSpace = True While Not parser.EndOfData ' Read in the fields for the current line fields = parser.ReadFields() Dim str As String = Array.Find(fields, AddressOf ProductGT11) End While Catch ex As Exception Throw…
Last reply by wsyeager, -
-
- 1 reply
- 1.2k views
I am populating a tree with information from a dataset populated by an XML file. The xml sheet contains the columns as follows: MainNumber DocumentName Index Basically when the treeview is loaded the MainNumber would be the parent and the DocumentName would be the children of the parent. My problem is that this can be updated, when the user clicks on a child node information fills 2 textboxes the MainNumber and the DocumentName. The user can make changes and then commit it to the XML. My question is can I load the index value with the DocumentName without user seeing the index. So I can guarantee that I update the correct information since the index is guarante…
Last reply by mskeel, -
- 0 replies
- 512 views
Hi I can create simple custom controls easily enough. ie: a header bar, with a few links on it and a picture. Then i can drag this control onto any page and the links etc will work no problem. I would like to take this a step further though, and would like to be able to change some settings on this control. ie: change the text on a label within the control - but from the actual page. Well what i'm actually doing is writing my own login control as the provided one doesnt do what i want it too. But i would like to be able to change the text of the labels, like you can on the provided one and some other stuff. Could someone point me in the right direction ple…
Last reply by Jay1b, -
- 0 replies
- 1.6k views
Hi Guys, I plan to connect to oracle database, but i see 2 providers which allow me to do it 1) ODP.NET 2) Microsoft .NET Provider for Oracle My question is 1) Do i need Oracle Client Installed on machine for this 2 providers? 2) Which data provider is better? 3) Which allows me to interact with database easily 4) Which provider is more powerful in terms of handling, dealing with data 5) Which gives me a faster connection to the database Thanks for any input and guidance
Last reply by a1jit, -
-
- Administrators
- 2 replies
- 2.5k views
I am using Microsoft Access 2003 as a Database and I have encountered a really odd problem... I am trying to UPDATE a row based on the [iD] column which is of type AUTONUMBER - sadly this isn't working at all. The Database itself is as follows: FileName: C:\DB.mdb TableName = Players Column: ID - Autonumber Column: Players - Text Column: Total - Text for (int nPlayer = 1; nPlayer < nPlayersCount+1; nPlayer++) { oDB.Write("UPDATE [Players] SET [Players] = '" + sPlayerName + "' WHERE [iD] = '" + nPlayer + "'"); } Error: Database Error - Unable to Write: System.Data.OleDb.OleDbException: Data type mismatch in criteria expression. at System.Data.…
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 3 replies
- 640 views
I know the following code doesn't work (.Chars is read-only), but hopefully you'll understand what I am wanting to do: I want to cycle through sBuffer to remove certain QUOTE characters that are contained within certain phrases. Is there a method that is writable that I can copy the valid characters into? Something similar to the .Chars method, but also writable. While iOldIndx < iFileLength If (sBuffer.Chars(iOldIndx) <> """") Then 'keep this character by copying to the new buffer sNewBuf.Chars(iNewIndx) = sBuffer.Chars(iOldIndx) iNewIndx += 1 End If iOldIndx += 1 End While tia, flynn
Last reply by snarfblam, -
-
-
- Administrators
- 9 replies
- 1.2k views
[PLAIN][solved] Referenced Assembly-DLL not up-to-date[/PLAIN] Hi, I have the following setup: Solution 1 Project A Project B Solution 2 Project C Now I have a reference to Project A in the Project C. The problem now is that the version of the build project A is an old one which is referenced in project C. Example: i added a new class in project A. reference the DLL in project C and the new method does not appear. even if I delete all the DLLs and build again. Can anybody help me out. thanks!
Last reply by Cags, -
-
-
- Administrators
- 2 replies
- 1.9k views
A little problem in C#.Net I've got a class with 2 functions: public double excltoincl(double bedrag, float btw) { double berekening; berekening = Math.Round(bedrag * (btw/100),2); return berekening; } public double incltoexcl(double bedrag, float btw) { double berekening; berekening = Math.Round((bedrag/(100+btw))*100); return berekening; } In the main form i call this functions. But i'll get this error: Cannot convert from 'double' to 'float', on this lines: prijs = stats.incltoexcl(prijs, BTW); The full code: private void berekenen…
Last reply by PlausiblyDamp, -
-
- 0 replies
- 1.3k views
I cannot make printing a report on a network printer to work, by PrintToPrinter method. I read all articles about it, and still I haven't found the solution. Tried changing the "machine" to "SYSTEM" in machine.config. Shared printer has Everyone in the Security tab set ON for all options. this is the exact same error I get: this link Can anyone help me, or prehaps is there another way to print a readymade PDF file?!?
Last reply by IxiRancid, -
- 6 replies
- 3.9k views
I have never used regular expressions before so please excuse my stupidity. I just need to check for strings that matches a particular pattern, in this case, a "J" followed by six digits. ie. "Jxxxxxx" Here is the psuedo code: If testString = "Jxxxxxx" Then 'do some stuff End If Can someone show me how to code this in VB2005express? I searched through the forums but couldn't find any examples. Thanks...
Last reply by nbrege, -
- 0 replies
- 1.3k views
Hi all, Well, I'm back at it again working on the 2nd version of my Point-of-Sale program. For those of you who helped me on the first version (you know who you are), I just want to say that I couldn't have done it without you. Everyone here has been great, and I have really learned so much by just being here. For those of you who haven't yet seen it, or just want to check it out, you can download it here . Feedback would appreciated. So, I've received hundreds of emails from customers requesting different features, and i'm trying to incorporate as many as possible into the new version. One feature that I'm working on is the option of sending daily sales report…
Last reply by dakota97,
-
Who's Online 0 Members, 0 Anonymous, 45 Guests (See full list)
- There are no registered users currently online