Changing The Data From A File

Dec 11, 2011

Changing the data from one file to another in this case giving a 20% discount to an item and throwing it into another program i.e "cowboy2" for some reason instead of changing the case.toUpper the user gives it selects the last part of array and doesn't calculate anything. Is it an error in the way i'm selecting which case to use?

[Code]...

View 2 Replies


ADVERTISEMENT

Changing Data In Text File Or Array?

Dec 15, 2009

I have a csv text file, shown below that I want to edit based on user inputs. When the user wants to change the current price of a stock, they enter the stock name, and the new price. When the button is clicked, VB needs to find the appropriate stock, and then change the current price.The data needs to be pulled from the text file into a temporary file, changed, then the temp file needs to be renamed to the original file name and the original file deleted.This is the only part of the program I can not figure out. I have put my program code here as well. The click event that I need this to work on is: Private Sub btnUpdateStock_Click --- I have been playing with code in that section, so that's why there si abunch of crazey code there.

[code]...

View 4 Replies

Making A File That The User Doesn't Have Access To And Changing The Location Of The Configuration File?

Jun 25, 2011

on my program i have an activation in it and in order to activate the program you need to enter a code that is stored in the settings. so i was looking through my computer and i found the programs config file. and so I opened it and i found all of the codes for the activation. I need to find out how to make the file so the user doesn't have access to it and then how to move it to a more hidden place in the C: drive.

View 3 Replies

Take A Static Stream Reader And Switch It To Another Text File Based On The User Changing The File?

Mar 10, 2010

Is there anyway to take a static stream reader, and switch it to another text file based on the user changing the file?

View 1 Replies

Changing A Registry Value And Replacing A File And Copies A File In Xp

Jun 11, 2010

i am developing a software called Logon screen changer xp and i get this error [URL] what is the solution the program is created in vb.net 2008 with .net framework 2.0 and it changes a registry value and replaces a file and copies a file very simple but there are security issues with xp

View 11 Replies

Changing Data In A Structure?

Nov 25, 2009

I have some structures and I change the data inside a loop. This works ok. But as soon as the method ends, all values in the structure are reset???

Heres my

Private Sub ReadDevice(ByRef device As Device)
Console.WriteLine(" Reading device " & Device.name)
Dim data As Short

[Code].....

View 5 Replies

Forms :: Changing Data In An Xml Tag?

Jun 8, 2012

I have the below code that can change the data in one XML tag. This is what I want,however, I want it to change all the XML's in a complete directory:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyXML As New XmlDocument()

[code].....

View 1 Replies

Changing Data Format In DataGridView?

Dec 6, 2010

I am currently reading a table from Access database and displaying it a DataGridView. Here is my

Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= ....db1.mdb"
Dim SQLString As String = "SELECT Cost, Average, FROM expense_summary"

[Code]....

All the files in my access data base are numeric (database cannot be changed) but I need to change the value formats in the table. I want to convert one particular cell in the table to a percent with one decimal and also display the '%' symbol. Similarly, I want to round and display a '$' symbol in another cell. How would I do that? How would I select a specific cell in this table to change?

View 4 Replies

Extracting And Changing Data In A Trx (xml) Document?

Feb 2, 2012

I have a .trx file (a unit test result file) which is just xml inside and I want to read the file compare a few of the tags and change them as necessary and save the file again.

I found that VB.NET has a few tools to help so the first thing I do is load the document into an xml document which seems to work fine but I can't access any of the data I need. Right now I'm trying to access the attributes of the counters tag and change them after rerunning some of the tests.

this loads the file:

Dim Doc As XmlDocument = New XmlDocument
Doc.load("testFile.trx")
Attempted ways to access node:

[Code].....

View 2 Replies

UpdateAll Not Changing All Data Fields?

Sep 5, 2008

I am building VS2008 app using Data Source Wizard. The Data connection is working. The Table Adapters are built. The DataSet is created and I can preview data through it. I used drag/drop from the DataSource/DataSet to put a DataGridView onto a form.I can view the records there. I can delete records there. But when I update or add records from there, all of the data is not getting changed. I am connected to ISeries DB2. If I add a new record the only field that get populated in the database is the key field (the first field in the file). If I update a record in the database, the only field that gets changed is the key field.

View 4 Replies

Changing A File Getting Double Inputs Into File?

Jul 12, 2009

I wrote a file and I am getting double files.... My Loop executes when its equal to what I want to change it starts my sub procedure which copies the new information into the temp file. It would be there if it then went back to the end of the loop and continued however its going back to the loop and putting in the old information that I changed from. So then I get a duplicate name with different records.

Dim fmtStr2 As String = "{0, -16} {1, -10}{2, -14}{3, -14}{4, -11}" 'format by zones
Dim str() As String = IO.File.ReadAllLines("csvSTOCKS.TXT") 'ReadAllLines into the str() array.

[code]....

View 1 Replies

Changing The Data Source For Connection String?

Mar 26, 2011

I developed a winform application and I want to send the .exe file to someone else. That means that my datasource for my connection string is not the same any more

Dim da As OleDbDataAdapter
Dim dt As New DataSet
Dim objConnection As OleDbConnection = New OleDb.OleDbConnection

[Code]....

View 3 Replies

SQL Queries - Sorting Column Without Changing Data In Other One

Feb 15, 2012

I have a problem with sorting this thing. I want to sort a column without changing the data in the other column. i have an attached document. A picture of my query and database..

View 3 Replies

VS 2005 - Button Edit - Data Is Not Changing And Still The Same

Sep 11, 2011

i have problem with my button edit, after i make change in the data then i click edit button to save all the data. After that i check again the data is not changing and still the same. This code here can run and don't have any error but cannot save the data which i changed [Code]

View 1 Replies

VS 2008 Error When Changing Data In SQL Database

Jan 22, 2010

I am having a problem when changing data (or altering data in a feild)I have the error message for a better explaination of the problem

View 24 Replies

Asp.net - Make Connection With Excel Where Data Is Changing Rapidly?

Apr 27, 2011

i making a website for trading in which trading feed coming from a source in excel sheet. i have to show data from excel sheet to gridview. but when i make connection it will lost due to rapidly data( in excel sheet each cell change value 1-3 times in one second).Am using Ajax Timer of interval 1000.

View 1 Replies

Changing Query To Load Specific Data In Report?

Jun 18, 2012

Synopsis: I have a report generated from the report wizard in VB that works, but I only want to load data from the same department as the current user.

Details: The application connects to MySQL using the MySQL Connector/Net. I have a users table in the database, one of the fields is "Dept_ID." The report I currently have works loads data and everything fine, but I only want to load some of the data from the table, specifically where Dept_ID matches the current user's Dept_ID, basically adding the "WHERE" clause to the select statement.

I used the report wizard to generate the report and data table, etc, just followed from step one. I've looked around and have found something about using parameters, but can't seem to figure out how to pass a variable to the parameter, or if that is even the best option. Using the wizard, I don't have any code to show for it and the report works like it should, I just need to figure out how to configure it further.

View 1 Replies

DateTimePicker Losses Data Bindings On Changing Date?

Feb 9, 2010

I have a form with a datagridview, 2 datetimepicker(dtp) controls, combobox, textbox, 3 buttons and a bindingsource. All my controls are bound to the datasource and seem to work fine when the form loads. One of my datetimepicker controls losses the bindings when I add a new row to the datagridview and save the changes. I validate the date entered in this dtp.

View 3 Replies

Greater Control Over Changing Data In A Bound DataGridView?

Feb 10, 2012

with more control over changing values in a data bound DataGridView.On form load, all the data is pulled down from the attached database and fills the gridIf I want to change one of the values in the grid, I can put my mouse cursor in the cell, change the entry and save it back to the database.

View 10 Replies

RemoveAll Is Also Changing Previously Cached Data That It Should Not Be Able To Change?

Apr 28, 2011

This has been driving me insane all day and I think I have the problem narrowed down, but it just doesn't make sense how it could be happening. I have 2 public shared functions and 2 private shared functions. One provides a list of custom objects and one filters the objects based on some parameters in the function call. Both return List(of custom object). The 2 private shared functions are the predicate functions used in the List(of t).RemoveAll function.

[Code]...

Now, the next time I call the GetItemList function it only returns 50 item objects, not the 100 item objects that it should be returning due to the cache being set! I have verified this in the debugger and by running many, many different tests to see what combinations of parameters may be causing the problem. In my testing, as soon as one of the .RemoveAll functions is used the GetItemList item list will get set to whatever the NarrowItemList function returned.

Even if the cache wasn't being set correctly, shouldn't it just get the data again from the database and return 100 items again? What could I be missing???

View 2 Replies

XML Database Changing Schema And Migrating Existing Data?

Aug 5, 2010

I have a purely XML database. It's stored as XML, there is no other database file. I did this by first creating a dataset in VB, then adding tables and relationships. I load the database by calling DataSet.ReadXml(FilePath), and save the database by calling DataSet.WriteXml(FilePath).

Now I need to make schema changes, but need to preserve existing data. How might I go about doing this? As soon as I load the database I loose all data if I change the schema in the dataset designer.

I have searched for changing database schema, but everything I find deals with real databases, not XML only ones, and the info doesn't apply because they are using db connections and then running sql against it and AFAIK XML databases have no way to "connect".

View 5 Replies

Changing Form Controls After Receiving Serial Port Data?

Feb 13, 2009

first post here at the forums. I am a complete noob when it comes to VB .Net, but I have done a lot of VBA programming and some VB6 back in the day. I have posted this question on two other forums (including the MSDN forums) and no one has responded so please let me know if I need to clarify the question.

I am (trying) to write my first .net app which reads/writes data to a device connected over the serial port. I have manged to get it to work to send commands to the device and receive the reply back, mainly using the info from this article: Beth Massi - Sharing the goodness that is VB : Reading from a Serial Port and Saving to a Database

However, I am having problems with updating the controls on the main form based on the received data from the serial port. Basically I want the user to click a button (one of six on the form) which will send data to the device, then based on the response from the device, the BackColor of that particular button, will be changed accordingly. I just am missing something b/c the button click is a different sub than the sub that handles the form controls update and I can't get the two to talk

[Code]...

View 5 Replies

VS 2008 Changing Bound Data When Entering Text In ComboBox?

Aug 9, 2009

I have a data-bound combobox that pulls values from a BindingList(of T). Combobox loads fine, correct values are displayed (I'm not using SelectedItem or SelectedValue). I'm using properties and connecting the data to the control via a bindingsource.

What I want is if the user types text into the combobox, I want the data from the bound table to change to that new text, i.e. edit the bound data directly.

Easy as pie to do with a textbox, but can't seem to get a combobox to work this way.

I was trying to use the validated event of the combobox to write the data to the datasource, but it doesn't fire when I press enter. Is that the way to do it? Can I not link the data to the combobox directly?

View 2 Replies

Forms :: Integer Value Changing When Compare Cell Data By Using 'IndexOf' Feature?

Sep 17, 2010

I have a program that is reading an Excel (xlsx) file and I am trying to take the data found in one of the cells and split it based upon the '@' symbol inside that cell. Here's an example: value in cell is "XXX @ YYY" I declare 3 strings (strOriginal, strA, strH) strOriginal is the value from the cell ("XXX @ YYY") then my code is supposed to split up the values in the Original string based upon that '@' symbol.So when my code is done, strA should = 'XXX' and strH should = 'YYY'.

Here is my code

strOriginal = dtbExcelData.Rows(0).Item(0).ToString
y = strOriginal.IndexOf("@")
strA = strOriginal.Substring(0, y - 1)

[code]....

For some unknown reason, the y integer (in this case, it is '4') changes to a random number (it has changed to 44, 61, 124) and causes the error "Error with Excel file: Index and length must refer to a location within the string. Parameter name: length" to occur.I understand why the error occurs (my y integer is not staying at 4)...I just don't understand why that y integer is changing numbers when it should remain as the indexof the '@' symbol. I'm looking for any suggestions on how to pull out the data after the space after the '@' symbol (the 'YYY' portion of 'XXX @ YYY'). Also sometimes the 'YYY' is only 'YY' as well.

View 4 Replies

Forms :: RichTextBox - Changing Font Size Without Changing Families And Styles

Sep 21, 2010

I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:

[Code]...

View 5 Replies

Changing Config File After Installation?

Aug 12, 2009

I'm using app.config to store database connection strings.My question is. Is it possible to manual change configuration file on the user's computer after installing msi file. for example if I decide to change to the dev database vs live.

View 1 Replies

Changing File Attributes (BitWise)?

Jun 14, 2009

m_ArchiveBoolean, m_HiddenBoolean, m_ReadOnlyBoolean, m_IndexedBoolean, m_CompressedBoolean are all form level booleans that's set from their appropriate Checkboxes on the form before this code runs in a BackgroundWorker.

Why is it that this code works:

Try
Dim fi As New FileInfo(element)
With fi
If m_ArchiveBoolean = False Then

[code]....

In this 2nd one attributes are being changed, but they're the wrong ones and I can't pinpoint it right off hand.

Edit: What the overall goal of this is that if the user has the attribute checkbox checked then the file needs to have it set, other wise the attribute (if it's present) needs to be unset.

View 7 Replies

Changing Lines In A Text File?

Feb 17, 2010

Is there a way to specify where in an open file a program is supposed to look (like specifying the current line)?

I'm using FileOpen(1, path, OpenMode.Input)

to open the file, but i need to jump from place to place in it

Here's what i'm trying to accomplish:

I'm trying to navigate round in a file containing questions for a quiz game, but am having no luck.

The general form is like this

**********
~(tile)~(question)~(answer)~
~(tile)~(question)~(answer)~
~(tile)~(question)~(answer)~

[Code]....

View 5 Replies

Changing Streamwriter Destination File

May 13, 2010

I have code which needs to be run 3 times with results written to different files each time. I have the following excerpt from the code:

[Code]...

View 3 Replies

Changing The Icon For The Project File?

Jun 11, 2012

I am using Visual Basic 2010 Express. I want to put an icon my Application to make it look better instead of the regular [IMG]C:Documents and SettingsJake EhrmanDesktoppost 1[/IMG]

I have the picture saved as an .ICO so i can insert it but i want it like this... [IMG]C:Documents and SettingsJake EhrmanDesktoppost 2[/IMG] how would i go about changing the icon for the project file?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved