Application That Updates Each Value Stored In An Array
Apr 5, 2009
This application should ask the user for a percentage amount by which each price should be increased then increase each price by that amount and then display the increased amounts. I can't seem to get it to calculate the amounts. Everything else seems fine. Any suggestions, ideas or recommendations? [Code]
View 1 Replies
ADVERTISEMENT
Jun 11, 2009
What should I do to trigger an application (wpf in vb.net) to look for updates?
View 5 Replies
Jun 1, 2009
I've come up with the following and it's partly working.
Public serial1, serial2, serial3, serial4, serial5 As SerialPort
Public serialports() As Object = New Object() {serial1, serial2, serial3, serial4, serial5}
dComPort = "COM4"[code]....
The above code works fine! But im having trouble trying to now retreive whats stored in the array.In the above example, an entry will be stored in serialports(4), all other array elements will be blank.If I do this it works.
MsgBox(serialports(4).PortName) ' this retuns the value COM4
But I'd like to loop though all array elements and print out ALL the PortNames, The below code doesnt work, I get an error Object variable or With block variable not set.
For i = 0 To serialports.Length - 1
MsgBox(serialports(i).portname)
Next
View 3 Replies
Feb 23, 2012
I'm using the Application Updates option in Visual Studio with 'Before the Application Starts' checked.Users are complaining of canceling the update and then finding out they really want the update. When they decide they want to update there is no way for them to update the application until I publish a new version, because once they cancel the dialog box it never shows up again.
Is there a way to create a menu option to force a check for updates?
Kind of off-topic... Are there any open source Application Update programs for .NET?
View 1 Replies
Jun 25, 2010
Whats the best way to go about having the user update the product? Im using VS 2010 and the publish wizard does give me an option to first uninstall the previous version which is ideal.
View 3 Replies
May 29, 2010
I'm trying to update a row via c# winform application. The update query generated from the application is formatted correctly. I tested it in the sql server environment, it worked well. When i run it from the application i get 0 rows updated.Here is the snippet that generates the update statement using reflection - don't try to figure it out. Carry on reading after the code portion:
public void Update(int cusID)
{
SqlCommand objSqlCommand = new SqlCommand();
Customer cust = new Customer();
[code]....
The above final update statement works on the sql environment, but when running via the application, the execute non query runs ok and gets 0 rows updated!
View 2 Replies
May 2, 2009
I remember seeing a tutorial a while ago about making your application check online for updates..I did this a year or two ago but have since lost my example. Can someone explain how you do this or supply me with a link if you know a good tutorial?
View 20 Replies
Feb 23, 2010
Okay so i made a small code that my application can check for updates onstart time. The problem is that it freeze up the application. How can i make it work faster.
Try
My.Computer.FileSystem.DeleteFile(My.Application.Info.DirectoryPath.ToString & "" &
"v.txt")
[code].....
View 3 Replies
Nov 10, 2009
I have written an application to perform a simple CRUD operation i've used MVC design pattern... DAL was designed using the wizard. I was able preserve the olds value of teh fields of EMployee class using a seperatemethod
PreserveOldValues(){ //code}
in the SearchByIndex() i call the fill method and i used the data to initialize the current Employee object also i preserve those values using PreserveOldValues() the i call update() and internall i pass the preserved values......However it doesnt do concurrencies and updates..
View 1 Replies
May 31, 2012
I've been using the following sub in my control that I'm creating to let me modify the pixels in a bitmap faster:
Protected Sub LockForMemory()
idata = ime.LockBits(New Rectangle(0, 0, ime.Width, ime.Height), ImageLockMode.WriteOnly, ime.PixelFormat)
ipoint = idata.Scan0[code]....
This doesn't seem to work right, however.
View 1 Replies
Nov 10, 2009
I got a value which is store in the array and i need to compare it. Which
if my user = 1,2,3,4,5,6 then ignore
if my user = 2,3,4,5,6 then i need to add in a ,1 which become 2,3,4,5,6,1
Here is my coding
user = dr("user_access")
dr.Close()
Dim splitX As String() = user.Split(","c)
For Each item As String In splitX
[Code] .....
Is there other way to compare the array or there is another better way to check?
View 1 Replies
May 3, 2011
In my website I have a textbox that allow user to enter a group of numbers like this:
(118,38,137,15,156,14,157,36,152,49,142,57)
Now i want your help to show me the way to store these numbers in array to be like this:
[118 38 137 15 156 14 157 36 152 49 142 57]
View 3 Replies
Jun 3, 2009
Im new to database programming and was wondering if you can save a select statement to an array:I tried this but obviously wont work, does anyone have any ideas?
Code:
Public Sub store_select_star_to_array()
Dim myCommand
[code]......
View 2 Replies
Aug 26, 2009
I am designing a fairly small application to manage a waiting area for a clinical department. There will be a receptionist who books appointments and updates exisiting appointments to say that a patient has "Arrived". In seperate rooms will be nurses who call patients who have "Arrived" and update the appointment as "In Session" and finally as "Discharged". The appointments are viewed in a flexgrid with nurses across the top and time down the left, patient names are displayed at the relevant times and the cells are shaded a colour to represent the current appointment status ("Booked", "Arrived", "In Session" and "Discharged").
I am using SQL Server as the back-end and Visual Basic 6 (I know) as my front-end.I have been told that there will be 2 or 3 nurses plus the receptionist logged in to the system but I would like to cater for growth.My question is what is the best mechanism to use in order to reflect the status change made by one user on the screens of the other users currently logged in?
I have been thinking about using a timer to refresh the data at a set interval but I do not want to keep hitting the server excessively (although what is considered excessive? we would be talking about a call for data every 60 secs per user). Plus the server could be serving data for many other applications so this is another consideration.Alternatively I have been thinking about sending some kind of message via Winsock to the other users notifying them of data changes as they happen. I don't have a lot of experience with this and am concerned about clients not receiving messages and users seeing old data. It also seems strange to me that once the days appointments have been retrieved from the database that "in theory" a client could go the whole day without having to query the database again to pick up changes - kind of scary.Some information on the data:We would probably be looking at around 100 appointments per day We capture patient name, date of birth, date and time of appointment and appointment status.What is the standard approach / best practice for this kind of scenario?
View 6 Replies
Jan 6, 2010
I have put together an array for data from two text boxes to be stored in. This works fine at the moment. I am now looking to build some form of array that will have some stored data in it already, so that someone can select the information they require from a listbox.
View 7 Replies
Jan 7, 2011
Basically, the user can type in a name and a job description into two different txt boxes and then click add. It then adds the name to the listbox and stores it in a string list (Public strList As New List(Of String)) it also stores the job description in a string list as well (Public strListDescription As New List(Of String))Then when you select an item in the list box it knows what data to bring up in the txt boxes using an array with these lists:
Code:
Private Sub lstMyCourt_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstMyCourt.SelectedIndexChanged
Dim i As Integer
[code].....
View 2 Replies
May 21, 2012
I am selecting a distinct user from IT_Cases_List and stored it in an arraystaff(). From this array, I will then call a Stored Procedure to count the no of cases attended by this user,(arraystaff(i)) and loop it until arraystaff.length-1
but the problem is that the count does not tally.
Sub getStaff(ByVal month As String)
If Not con.State = ConnectionState.Closed Then
con.Open()
[Code]....
ok, i've called only once getcases but i'm still having the same problem.
this is what i get when i run the program:
if i get Count(*) from the database, the total no of cases i should be getting is 132, whereas the total of cases i get from the program is 157 (7+7+20+20+49+49+5)
if i run the query from sql, this is what i should be getting
i notice that the Count number gets duplicated (7,7,20,20,49,49,5) instead of (7,20,49,5,10,27,13)
View 1 Replies
Apr 4, 2012
Write a function that will take one integer input parameter, create a sequence of numbers stored in an array from 0 to that number, and the numbers are a summation. For example, given 7
View 17 Replies
Dec 28, 2009
I have some data, stored in a byte array, compressed with LZSS compression. I've crawled the net for the last 2 days trying to find some code to decompress this data without success. Has anyone come across a suitable routine that can help?
View 2 Replies
Mar 24, 2011
I have a stored procedure in DBML and I try to pass the result to "sqlQryArray" as an array(1 dimensional array). But the bottom code causes error like below message. What else should be done?
Error 1 Value of type '1-dimensional array of aaaDatabase.stp_GetSomethingResult' cannot be converted to '1-dimensional array of String' because 'aaaDatabase.stp_GetSomethingResult' is not derived from 'String'.
The return result from stored procedure is a just list of first names of students(only one column)
Dim sqlQry = aaaLINQ.stp_GetSomething(bbb,ccc,ddd)
Dim sqlQryArray As String() = sqlQry.ToArray()
View 2 Replies
Jun 10, 2011
How can i pass and access the array variable in Stored Procedures
View 3 Replies
Jun 8, 2010
I have a data entry form, a listview form and a couple of classes. Data is entered in the form, and it is stored in an array. This is then displayed in a listview. I can insert and delete just fine, but I cannot figure out how to modify. This is what needs to happen: With a row selected in the listview, modify is clicked in the menu strip.
Whatever information is in the selected row, it needs to be transferred to the data entry form where changes to it may be made. I have attached what I have so far, and a sample data file is provided in the root directory. I think I need to temporarily store the selected item, put it into the data entry form, delete it, and when submit is clicked have it re-inserted.
Attached File(s)
View 1 Replies
Nov 28, 2011
In my desktop, I have folder containing some word document files. I want the filenames of the documents in that folder. So, I used:
Dim strFiles() As String = IO.Directory.GetFiles("X:Documents and SettingsXXXDesktopvvvvv", "*.doc")
All filenames are stored in that array. But it would also include the temp document that Word generates. I am somewhat confused on how to remove this from array. I only need full filenames of the actual documents, which excludes the temp document.
View 12 Replies
Jun 3, 2011
I's there a way that I can access the properties of all controls stored into my array of object using LINQ.
Public Sub DisAble(Byval ParamArray ctrlCollection() As Object)End Sub That is my sub routine where im trying to reset all controls that will stored into that object of array. But im trying to attain that using LINQ so I wont use any loops to access all of it.
View 7 Replies
Apr 17, 2007
I have been assigned to create a simple address book in VB 2005 and have got as far as I can with it. Contact entries are to be stored as an array of objects rather than to .txt file or access database (I know they will all be lost when shut down). I suspect this is probably pretty straightforward if you know anything about VB - unlike myself obviously.
Public Class Form1
Private objContact As New ArrayList
Private Sub BtnAddContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAddContact.Click
Dim objcontact(100) As Contact
[Code] .....
View 2 Replies
Jul 21, 2011
For example, I have string variable (MyString) as below.MyString = "First word || second order || third example || fourth item || fifth stuff"
There are separator "||" at MyString variable. I want MyString variable is spited based on separator "||"and stored it into new array variable.
Could you advise me the most efficient code to do this job in VB?
View 4 Replies
Apr 13, 2012
I have tried to run below macro in excel 2010, but the error pop up and after press debug button, the line "expected_loss = application.worksheetfunction.average(final_loss)" was highlighted. May I know how to solve this problem?
Sub test ()
'Aim: to store data in array and calculate the average of the data in the array
Dim final_loss(1 to 70000) as double
[code].....
View 2 Replies
May 28, 2009
I am working on an inventory managment project for a lumber mill. I am currently writing a piece of software to be used on the sorting section of the mill. The problem I am having is when a stick of lumber needs to be cut down in lengt. My current setup has a combo box that is populated with lengths of lumber that we might have (2' - 60'), a "Add" button and a data control (homemade solution with lots of labels, and panels).
The user will scan a tag into the system, and the system pulls up the info from the db. If the piece need to be cut, the user will select the length of the cut, and click the add button. The system will then populate the first line of the data control with the info from the cut (previous piece info, and new length). It also populates a pieceObject struct. This happens for any additional cut that might happen.
The problem I am having is that everytime I press the "Add" button, the length variable will update every length in the piece array.
Here is a section of the code I am dealing with.
piece is a lumberPiece, and pieceAry is a array of 15 lumberPieces
Each time the add button is pressed, the current data is stored into the array, and then the pieceNum is incremented.
[code]...
View 4 Replies
Dec 31, 2009
I have a few of them set up and notice that they change based on where the application is run from.
Where are the actual values of these settings saved to? I have googled but not found anything definite.
View 5 Replies
May 7, 2010
Recently I have learned visual basic 2008 express edition and developed programs for data crunching and analysis. The VB 2008 express edition has microsoft visual studio 2008 v. 9.0.30729.1 SP and .NET Framework version 3.5 SP1. Now I want to create x-Y (date-Y value) graphs using the crunched data stored in an array list simulating a data base access. I download and installed the "Microsoft Chart Control for .NET Framework " and try to learn to use it within the VB 2008 express edition using the tutorial. It seems that the chart control did not get installed?
1. Do I need at VB 2008 professional to allow using the chart control?
2. Why after installing chart control, there is no change on the items under the NET components within the Toolbox>ChooseItem>.
3. How do I get to use the chart control under VB 2008 express edition.
4. Any code available to generate versatile graphics without using the chart control? Because the chart control has tons of classes already it seems the best is to just use the existing and downloadable chart control?
View 8 Replies