|
Hi Chris
thanks again for your reply, again i have not assign values to my parameters. for me to Fix this i had to do the following
<br />
<br />
<br />
cmdselect.Parameters.Add("@username", "Username").Value = Username<br />
<br />
cmdselect.Parameters.Add("@OldPassword", "strPassword").Value = strPassword<br />
<br />
i was Supprised, how did i not see this
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: Select Case intRes
Case 1
bolres = True
Case 0
bolres = False
End Select
Your code is always falling through to the latter case. Either add a break statement after bolres = true or use an if...else construct rather than a select case
|
|
|
|
|
I didn't spot that, b/c C# does not allow that and I assumed VB did the same ( but perhaps more sensibly didn't have a break keyword, if it always works that way anyhow )
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 was already developed crysatal report but i need how query pass to crystal report.now i am using vb.net and oracle
parthiban
|
|
|
|
|
Dear Friends..
I am having login screen form in my VB.Net windows application.I should be able to display that form only once in my PC.i.e i want to restrict multiple opening of the same login form.
I mean that only one instance of that form should be viewed in the screen.
Someone help in this regard as early as possible..
Regards,
Balaguru
|
|
|
|
|
Balagurunathan S wrote: Someone help in this regard as early as possible..
You can set a time limit when you're paying someone.
Do you mean you want your app to show only one login, or that you only want one instance of the app to run ? The former is entirely up to how you write the code, the latter, you can do a number of ways. Interestingly. when I did what all people in a hurry should do (try google), the first two hits were articles on this very site. Did you think to search the site or try google ?
http://www.google.com.au/search?sourceid=navclient&ie=UTF-8&rlz=1T4ADBS_enAU225AU226&q=vb%2enet+%22single+instance%22[^]
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 )
|
|
|
|
|
How can i change the icon of my Visual Basic exe file..
I tried to set the Icon Property of Form... But its
showing the Message Invalid Picture Property..
Can anybody plz help me
Thanx in Advance
|
|
|
|
|
in main menu project choose properties, there you can change the application's icon.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi friendz,
i hv a doubt in VB.Net
i hv a string as "jacab,martin"
i want to split it and assign it
in FirstName = jacab, SecondName = martin
i used "split" method, but for me it doesn't work,
is there anyother way t get my result?
self confidence+hard work=SUCCESS
|
|
|
|
|
Try this
Dim arNames() As String = Split("james,martin", ",")<br />
Dim sName As String = arNames(0)<br />
Dim fName As String = arNames(1)
|
|
|
|
|
THANKS A LOT,
THIS ALSO WORKIONG YAAR,
Dim memberName(2) As String
Dim memberLName As String
Dim memberFName As String
memberName = memberNameTextBox.Text.Split(“,”)
memberLName = memberName(0).Trim
memberFName memberName(1).Trim
self confidence+hard work=SUCCESS
|
|
|
|
|
Just a minor issue, this produces a 3 element array 0,1,2
Dim memberName(2) As String
This is not relevant to your current code but will trip you if you ever use memberName.lenght (which is 3 NOT 2)
|
|
|
|
|
Hi to all,
I am Developing to develop Client/Server Application using VB.NET 1.1
1)I want to see the Client Machines Performance and Networking details like what you get in windows Task manager using vb.net.
2) How to find the passives client. and From server I want to shout down these machines.
3.If any Illegal process started (Virus) the I want sent server to pop up alert Message for client machines.
Thanks
Mohan Balal
--------------
(Sr.Software Engineer)
|
|
|
|
|
Member 1258373 wrote: 1)I want to see the Client Machines Performance and Networking details like what you get in windows Task manager using vb.net.
This can be done using the Process class, Performance Counters, and WMI. If the remote machines are in a domain environment, then the account your code is running under should have the appropriate permissions to the remote machines. If in a workgroup configuration, then you'll have to supply an appropriate username and password for EACH machine you want to connect to to get this data.
Member 1258373 wrote: 2) How to find the passives client. and From server I want to shout down these machines.
What do you mean by "passive client"?? Shutting down machines remotely has it's issues, since you'll need admin rights to the machines. Also, forcing a shutdown without knowing what the machine, and it's users, are doing is a "data loss" concern. You don't know, and can't find out, what the machine is doing or waiting for.
Member 1258373 wrote: 3.If any Illegal process started (Virus) the I want sent server to pop up alert Message for client machines.
There is no way for you to know that any code is virus related. This is better left up to a professional, enterprise virus scanning package that reports back to a central server. You'll have to keep this virus software up-to-date on a daily basis. If you attempt to write this code youreself, you will be greatly disappointed in the amount of work you have to put in to maintain it and keep it updated with the latest techniques for getting bad code to run. This is something that a single person, such as yourself, simply cannot do due to the number of viruses discovered every day.
|
|
|
|
|
In Visual Basic .NET I know how to get the environment params (such as USERPROFILE) that gets assigned to a user when they're logged in on a given system. But how do you get those environment params for those users when another user (or the administrator) is logged in? A code snippet showing that would help out greatly.
As an added bonus, if you know of a way to query all the users who have an account on a local system I could use that. Thanks much.
|
|
|
|
|
Actually the added bonus is the easy one - look in the documents & settings folders and parse the folder names!
I think to get all the environment vars is not going to be possible (maybe one of the OS experts will be able to help). I think you would need to locate all the tags in the registry and every app that starts automatically on startup - impossible!
|
|
|
|
|
Hi everyone.
I'm trying to build a session enumeration for a asp.net site, meaning that i can see all live session and their objects of the session, at start i built a IList of httpsession that i add to it the session every time its created, the problem is that when the session has changed(like adding a new object to the session) the list is not updated with the changes it just stays like the same point when it was added. i need a linked collection that a can add objects to it but when the object change it should be seen in the collection too.
can anyone help please?
thanks.
|
|
|
|
|
If you had an OnChange event on the objects this would give you the place to deal with it!
|
|
|
|
|
Hey guys (and gals),
I am trying to perform some basic calculations on a frmTimeAllocation that I am designing. As the users input the % of time spent among 4 projects, I would like the unused % time to be recorded in a lablel on the from. Below is the code I am using, but so far its not working for me - the % remains at 100%. Any suggestion on where I should go from here? TIA.
Private Sub updTime1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updTime1.ValueChanged, updTime2.ValueChanged
Dim TimeWorked As String
Dim Time1 As Single
Dim Time2 As Single
Dim Time3 As Single
Dim Time4 As Single
Dim Rest As Single
TimeWorked = 100 / 100
'unallocated time across projects
Rest = TimeWorked - Time1 - Time2 - Time3 - Time4
If Rest > 0 Then
'Me.lblMessage.Text = Rest.ToString("c") & " still unallocated time"
Me.lblMessage.Text = FormatPercent(Rest, TriState.True) & " still unallocated time"
Else
Me.lblMessage.Text = ""
End If
End Sub
|
|
|
|
|
Hi,
why is TimeWorked declared a String???
did you look at its value after execution of TimeWorked = 100 / 100 ?
either print it out, or single-step your program (set a breakpoint!)
where are Time1/2/3/4 set to specific values?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Luc,
I have tried different approached, including the below:
Dim TimeWorked As Single
Dim Time1 = updTime1.Text
Dim Time2 = updTime2.Text
Dim Time3 = updTime3.Text
Dim Time4 = updTime4.Text
Dim Rest As Single
My desire is to be able to progressively calculate the unalloacted time as the user inputs a value in each of the updTimex fields.
IT
|
|
|
|
|
which isn't good either, you want all variables having the same type (say Single), so Time1/2/3/4
should also be Single; then you better explicitly convert the String that is in TextBox.Text
to a Single, probably using Convert.ToSingle().
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Just wanted to close the loop on this; I got it working as desired. Thanks Luc.
Private Sub updTime1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updTime1.ValueChanged, updTime2.ValueChanged, _
updTime3.ValueChanged, updTime4.ValueChanged
Dim TimeWorked As Decimal
Dim Time1 = Convert.ToDecimal(updTime1.Text)
Dim Time2 = Convert.ToDecimal(updTime2.Text)
Dim Time3 = Convert.ToDecimal(updTime3.Text)
Dim Time4 = Convert.ToDecimal(updTime4.Text)
Dim Rest As Decimal
TimeWorked = Time1 + Time2 + Time3 + Time4
'unallocated time across projects
Rest = (100 - TimeWorked) / 100
If Rest > 0 Then
Me.lblMessage.Text = FormatPercent(Rest) & " of your Time is still unallocated."
Else
Me.lblMessage.Text = ""
End If
End Sub
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Just a ?
Dim TimeWorked As Decimal This is obviously decimal
Dim Time1 = Convert.ToDecimal(updTime1.Text) Would this not be an object (admittedly with a type decimal as content)
And the rule is.... NO BLOODY VARIANTS
Dontcha love the old VB style, just declare the dammed thing I just want to use it not dance it round the room!
|
|
|
|