I've looked around this forum, and the rest of the internet, but my code is not working. Here is the problem: I read XML files that are in en-US culture. The decimal separator is a dot ".". Given the string "123.45", I want to convert the separator from a dot, to a comma. The current code doesn't work. [CODE] String tmp = "123.45"; System.Globalization.CultureInfo myInfo = System.Globalization.CultureInfo.CurrentUICulture; /****The above line returns my culture, es-ES where the number separator is ","***/ System.Windows.Forms.MessageBox.Show("New value: "+ Decimal.Parse(test, myInfo)); /***The above line displays the result "12345"***/ [/CODE] I have a lot of variables to …

Member Avatar
Member Avatar
+0 forum 5

Ok so I'm a total noob with VB.NET and I so far I've read about a thousand forums and I've yet to get a straight answer. I've read that VB treats anonymous types differently than C# (the why, beats me). I have a DataTable, and I want to return a NEW Table with the **duplicate entries** (of columns 4 and 5) from the first one. For ex: T1 looks like this: [COL4][COL5][COL6]...[COLN] 1 1 1 2 1 1 1 3 1 3 The Output Table should be like this: [COL4] [COL5] 1 1 1 3 So far I've got this: …

Member Avatar
Member Avatar
+0 forum 3

Greetings. In my Console Application, I have a process that connects to a Access Database File. After closing the connection I copy the file to another folder, and delete the original. Lately this is failing a lot. For some reason the File is still being used, even if the connection is closed. I think that the problem is the speed at which it's doing everything, I try to delete it right after the closeConnection() method. And the connection might not be fully closed??? This is something that I don't fully understand yet. Anyways, I wanted to add a small timer …

Member Avatar
Member Avatar
+0 forum 9

Greetings. Ok so my problem is that I get a "Currency" formatted value from the database and this value sometimes comes as a whole number (without decimals) and sometimes it doesn't. But, when I output the information as "string" into an XML File, I [B][I]always need to show the 2 decimal places even if they are zero. [/I][/B] I tried with the following code: [CODE]price = string.Format("{0:N2", decimalPrice);[/CODE] This works if e.g: the variable decimalPrice has a value of 59.33 However if it has a value of 59 this will not work, and will throw a format exception. Any suggestions? …

Member Avatar
Member Avatar
+0 forum 1

Ok, so after hours and hours of testing and searching online I'm almost convinced that this can't be done, but I'm asking here for help maybe someone can give me any idea as to why this isn't working. I'm doing this query: [CODE]SELECT * FROM( (SELECT t1.PAG5 from table1 t1 where t1.PAG5 > 0) UNION ALL (select t2.PAG1 from table1 t2 where t2.PAG1 > 0) ) [/CODE] The bad part: it has to be access 2.0 This gives me an error after the first FROM. I'm guessing access 2.0 doesn't allow nested Select with Union. Is this true? PS: Running …

Member Avatar
Member Avatar
+0 forum 2

Hello all, I'm writing a small "robot" application that has to process a list of sequentially numbered MDB files. This has to be done between different executions, ie: today I process files 1,2 and 3. Tomorrow I might process 4 and 5. It's totally random, but sequential. My question is this: how can I keep track of the files? They are named thus: TFXXXX.mdb where XXXX is their number. My first approach was to save a "counter" variable in the appSettings field in the config file but when I update the correct field, the changes are not applied to the …

Member Avatar
Member Avatar
+0 forum 3

Greetings, DaniWeb has helped me through alot of problems regarding a wide range of technologies. I've decied to join in order to learn further and help out whenever I can. Regards to all.

Member Avatar
Member Avatar
+0 forum 1

The End.