|
Hi, I am using dataset for playing with data and wanted to create an additional column that stores logarithm (log) of another column. I tried to use number of options including the one below but still have trouble making the program work.
dtRec.Columns.Add("sumXY", Type.GetType("System.Double"), Math.Log("recflow"))
recflow is an existing column of the dataset and I want log values of reflow to be stored in new sumXY column.
Any suggestions!!
Amanjot
|
|
|
|
|
Amanjot,
The way you've written the third parameter is, I think, incorrect. This might work instead:
tRec.Columns.Add("sumXY", Type.GetType("System.Double"), "Math.Log(recflow)")<br />
Steve Erbach
Neenah, WI
http://TheTownCrank.blogspot.com
|
|
|
|
|
Thanks Steve. I tried the option you suggested; however, it didn't work.
Thanks,
Amanjot
|
|
|
|
|
question
if i select 2 items then numbers in the first column is 1,2 when i close the open file dialog and want again add 4 files
I want the numbers3, 4 ,5,6 after 1,2
so that i hav 1,2,3,4,5,6 including the file name in the second column
so i must then look like this.
col1 col2 Col3
1 tina turner Pathname
2 10cc Pathname
3 Gwen steffani Pathname
4 Abba Pathname
And so on
with the folowing code it wont work
Me.OpenFileDialog1.Multiselect = True
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
End If
Dim x As Integer
Dim item As Integer
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
ListView1.Items.Add(x)
ListView1.Items(item).SubItems.Add(IO.Path.GetFileNameWithoutExtension _(file))
ListView1.Items(item).SubItems.Add(file)
item += 1
Next
End If</code>
please help
thanks
|
|
|
|
|
johnny1963 wrote: Dim item As Integer
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
Perhaps if you gave x a value before you started, something like ListView1.Items.Count ?
I don't see why you need x at all, actually. Just use the item count.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I found the just by myself
First i want to say
X= item +1
thats i want to start with number 1 and not 0
the solution is:
Dim x As Integer
Dim item As Integer = listview1.Items.Count
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
ListView1.Items.Add(x)
ListView1.Items(item).SubItems.Add _(IO.Path.GetFileNameWithoutExtension(file))
ListView1.Items(item).SubItems.Add(file)
item += 1
Next
End If
thanks
|
|
|
|
|
Yeah, that works, but of course, like I said, you don't need x. x will continue to be listview1.Items.Count + 1, all the way through.
And what's with calling it listview1, what's wrong with meaningful variable names ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Guys,
I wonder how I can program a fuzzy set like you can see it here:
Fuzzy Set Example
Fuzzy sets are sets whose elements have degrees of membership. So the input [70 km/h] is to 75% low and 25% medium.
I don't need to draw(present) the functions I just need to calculate the degree of membership for each input e.g. [70 km/h], [60 km/h], [80 km/h].
I noticed that pseudonym67 is quite a strong contributer in this subject, nevertheless he actually
never mentions triangular/or other shaped functions.
Many thanks for any suggestions
polynaux
|
|
|
|
|
Hi,
I wonder if anyone can help. Some time ago I managed to deploy a VB.Net 2003 system with Crystal Reports 8.5. I have forgotten how I did this. Can anyone point me the correct direction or give me any help. I remember it was add merged files etc.
|
|
|
|
|
Can someone help me?.....
I'm working on developing an add-in for outlook 2007...
I want an event that identifies an email has been add/moved drag and drop to a folder
How can I do this in VB ????????????
|
|
|
|
|
Hi All,
I having doubt in adding SQL(which is inside the VS.Net). Wheather if we add db from inside .net, will work without SQL installation in Clint system.?
Can any one give me an idea.........
Thank you in Advance...
Senthil.S
Senthil S
Software Engineer
|
|
|
|
|
Senthil S wrote: I having doubt
You mean that you have a question?
Senthil S wrote: Wheather if we add db from inside .net, will work without SQL installation in Clint system.?
SQL is the query language that you use to communicate with the database. What you install is a database driver, and perhaps a database server.
To use a database driver it has to be installed on the computer that runs the code that accesses the database. Some database drivers are installed by default, like the MS Access database driver.
If the database is on a different computer than the one running the code, that computer needs a database server installed. It then has to be a server based database like MS SQL Server, not a file based database like MS Access.
If you could be more specific about what kind of applicataion you are making, I could provide more specific information.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi all,
in my application i store some data in Registry. Everything is ok except one . when i run my application on vista machine as limited user (not as admin) then Following error occured
"Requested registry access is not allowed"
anybody have idea that how can i resolve this Error ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
What part of the registry are you reading/writing?? What's the registry path you're using??
|
|
|
|
|
hi,
i am using following path
HKEY_LOCAL_MACHINE\SOFTWARE\
at above path, i am try to creating a key. but failed on vista (limited account).
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Normal users are not allowed to create keys under the HKLM\SOFTWARE key. This can only be done by the admin and is usually done at application installation time, not at run time.The keys under this one should be Company Name or Application Name keys, under which application values should be created.
|
|
|
|
|
sir,
can you provide me that in which part of registry, normal user are not allowed to create registry key( Including all root key).
also Please suggest, whether there are any method(or link) , by which normal users are allowed to create key under HKLM\Software ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Rupesh Kumar Swami wrote: can you provide me that in which part of registry, normal user are not allowed to create registry key( Including all root key).
It's easier to do the opposite. Users are able to create keys under various parts of the HK_CURRENT_USER root.
Rupesh Kumar Swami wrote: Please suggest, whether there are any method(or link) , by which normal users are allowed to create key under HKLM\Software ?
I hate repeating myself. There isn't any. The only "workaround" you have is to, during installation of your app, create a Company and/or Application named key under HKLM\SOFTWARE, then give the appropriate users group permissions to read and write under that key. This is NOT a good idea!
|
|
|
|
|
i have a problem while reading the out from a console, i created a process n passed the ping command with ip address, i can able to read the whole output at once but i should read the same way as we get in the cmd, ie., line by line,
plz try to give the solution
|
|
|
|
|
|
Hi all,
How i can get the names of all the child from( in a MDI form).
Give me a idea...
Thanks in advance
Senthil.S
Senthil S
Software Engineer
|
|
|
|
|
try this
For Each ChildForm As Form In Me.MdiChildren
MsgBox(ChildForm.Name)
Appplication.DoEvents
Next
|
|
|
|
|
Do not use Application.DoEvents() in this code. You don't need it and it causes problems you really wouldn't think about.
|
|
|
|
|
OK....
i have always used it extensively and havent had any problems...
what are the problems that one can expect...???
|
|
|
|
|
Application.DoEvents forces your app to give up control to it's Message Pump. If the UI isn't controlled properly (or is buggy), the user can start clicking on anything they want and the app will dutifully start executing other event handler code, while still processing thie loop you put the DoEvents in. If the code isn't so simple, this can generate very unexpected results that are difficult to find.
|
|
|
|