Add Code To Read And Use The Data From The Sales.txt File?
Jul 12, 2009How do I (Add code to read and use the data from the Sales.txt file
2/1/07,Books,10.00
2/1/07,Games,29.99
2/1/07,Books,15.99
[code]......
How do I (Add code to read and use the data from the Sales.txt file
2/1/07,Books,10.00
2/1/07,Games,29.99
2/1/07,Books,15.99
[code]......
I would like to write a code to read data from .gpx file, but I get stucked with classes: I have a problem with creating working array of objects in object and setting or getting data from it.
I wrote this:
Module Module1
Sub Main()
Dim i As Integer
[code]....
but I get always the latest values of points for all slots of array... Lets say we got 3 points as an input: 1. lon: 5, lat: 1; 2. lon: 2, lat: 3; 3. lon: 4, lat:9. I always get the same values for i = 0 to 2... lon: 4, lat: 9.
I am trying to get a function so when i press the calculate button it somes up with sales totals and sales commissions. this is just a simple project i just cant find the answer.
View 5 RepliesI need my program to output and input a customer ID and sales amount multiple times. I need it to display both outputs, customer ID and sales amount, on mulltiple lines. It also will need to accumulate the sales amount and then display the total sales. it should look something like that.[code...]
I think that I was supposed to use a messagebox but wrote the program a different way. the form.vb was already locked, but I added two text boxs. Not sure if I did this right because I need to enter multiple sales for one customer ID.[code...]
i'm working on a project that is trying to calculate the discount on three different kind of packages, each worth different prices.
what we are given is
package A= $99
package B= $199
[code].....
i m new to programming sector... i m creating a code to populate columner entries of a purchase / sales register. [code]
View 6 RepliesCODE:
That code works to read the entry data and to recognise the correct data, and the incorrect. However, even if entry is correct, the error msgbox will appear (x times of how many records there are in file), despite being navigated to the menu. Anyway that the Else isn't triggered when data is correct. Also for it to appear just one instead of (x times of how many records there are in file.)
I want to show the sales data graphically.
View 2 RepliesI have an Argox Barcode Scanner with a USB port, which inputs data like a keyboard wedge. I've tried scanning barcodes with it with notepad open, and it just dumps the values as plain-text into notepad on a new line every time.
I am creating an application which controls some custom electronics, and displays data on-screen at the same time. This application does not have any user-input on the entire form, except for a button which when clicked, takes the user to a login-form, and then onward to an admin control panel to change the way the program behaves. Everything is going to be set up on a PC which behaves like a kiosk, which means there will be no windows interaction by the user, and he will not be allowed any kind of usage on the machine even if he tries to use his keyboard/mouse all he can, except for reading data presented on-screen as interfaced with our custom electronics, or to use the mouse to press the button which invokes the login screen.
Now in this situation, I need to work in a barcode scanner behind the scenes. What I need to do is a user scans a barcode using the reader, and the scanning of the barcode should trigger some code in the background (which does some checking against a database, and then activates something in our electronics, and so on). After the user scans the barcode using the scanner, there is still supposed to be no user-interaction with the program itself.
how I might accomplish this? I have already thought of using a hidden text-box on the form, but that sounds like a temporary work-around rather than a professional solution. Not to mention if the user were to accidentally click anywhere on-screen with the mouse, or click on the login button, it would take focus away from the hidden text-box, and bringing focus back to it each time programatically is quite a task.
I've gone through about 16 hours and two packs of cigarettes trying to figure this out. First a little background. I was using 6.0 up until 2004 when I went to prison. I'm out now, and trying to relearn the trade, using VS 2005. I'm currently porting some 6.0 code from another project, SpyCast Webcam Studio, into VB 8.0. It's disheartening, to say the least. None of the old built-in subs/functions work anymore, so I have to scour the forums to relearn each and every function.The section I'm doing now takes a snapshot from the webcam (Video API --> PictureBox --> Save as Jpeg), then upens the file to upload it to the server via HTTP POST. I've been using this code in SpyCast for years with no trouble, but I spent many hours trying to piece together the right code to open the binary file to read its contents. I pieced together two methods I found around the forums, one using FileStream() though the code I found wasn't for binary files, even though it said it was, so that code doesn't really work. Method two uses Microsoft.VisualBasic.FileOpen() and works better.
Here's the kicker. By the time I run through the rest of the rigamarole of uploading the file, by the time I read it on the webserver, it's *slightly* corrupted. It's a valid Jpeg, no errors, but the picture looks like when I use to watch the Playboy Channel when I was a kid scrambled with weird colors and whatnot. [code] Each "chunk" is basically one "line" of the file. It looks like a single LineInput() return is the text between two carriage returns. Am I correct? I tested this with a flat text file, and it looks true. However, That one input line returns the text or data with the carriage returns *stripped*! ***?!? =( Fine, I have no problem adding my own vbCrLf to each LineInput(), if I were opening text. but this's binary. A character could be Chr(10) or Chr(13), both of which are removed from the original file contents.So I could very well need to use something other than LineInput(), but I haven't found any other examples on the web using this method.
I'm using Visual Basic express 2008.The application I am working on is the first major project I have ever undertook with visual basics. The application is a launcher for a private server for world of warcraft.I have a menu bar that pulls the file path of the wow.exe and puts it in a hidden textbox, I then have another option that saves this text to c:wowexe.txt. All of this works GREAT!
How can I read the .txt file to end and return the information stored in the .txt file to this line of code.
Dim RetVal
RetVal = Shell("This is where I need the data from the .txt file to be seen", 1)
If your wondering why I don't just type in the path of the .exe, it's simple, not everyone installs World of Warcraft on the C drive.
Using VB.Net, I am reading an Excel spreadsheet does anyone know what might cause a cell to be read as VBNull when it contains data?the cell clearly contains data. and what is extra weird is all the same cells in the rows before and after the bad one have the little green triangle in the upper left corner, indicating an error - but they all read fine the cell that reads as NULL is the cell in row 4 above
View 1 RepliesI'm having difficulty figuring out how to run different programs with my VB program. Using Excel and other MS office programs is easy enough since I just add in the relevant COMs, but I can't for the life of me find out how to run other programs. I promise I spent many hours searching before bothering you kind folks here! I'd think this is a common issue so maybe I haven't been searching for the right thing.how to write code that will control and read data from applications.I know you can do "Process.Start" to open any application, and it looks like there are ways to determine the controls available on an open application, but I can't figure out how to do it. Is this possible? Or do I have to import a .dll file for every program I want to control? Or are both possible?
View 12 RepliesI have a fairly simple XML file that I just want to read the data from.
It has 3 levels, root, main section and items. There are no attributes. I want to go to the first main section by name, then read in all the items. The items all are named the same. I've seen this done before, so it should be ok. No writing will be done. Basically this is a static data file
File looks similar to the following:
CODE:
Currently I'm using this code to read from a txt file, but there is two problem with it.
Dim x As Long = 0
Dim SR As New System.IO.StreamReader("D:A.txt")
Dim line As String
Do
[code]....
It prints out the content of the txt file twice & I would like to read line by line and store the line in a string.In vb 6.0 I used a socket to create a server & client chat app.Is there some other possibilitys than to use a C4F P2P toolkit for Vb 2008?
I'm only getting started with VB.Net, using VB Express 2008.Using the System.Data.SQLite wrapper, I need to read data off a SQLite database file, and chart data using basic bars, pies, lines, etc. Nothing fancy.
View 1 RepliesI'm VERY new to VB, and haven't coded since the TRS-80 days. I;m attempting to write code to read several NMEA ports and format the data for archive. When I execute the following on a port with the device turned off, the readline instruction hangs. can someone point me in the right direction to handle this exception.
View 1 RepliesBasically, I need to open the file from Textbox1.Text(this stores the path) and dump all the text into the string 'File'.
Example code:
Sub Button1_Click
OpenFile(1, TextBox1.Text)
[code].....
I want to write a small program which can be read the content of the text file or via the textbox and then displays the characters content into "Big5" code (Traditional Chinese Font coding).
View 9 RepliesI have a csv file that needs to be automatically updated on a daily basis. I am writing a vb.net app to accomplish this. However, Im having issues with the entire process.I need to be able to read in a csv file, manipulate the data and then update the existing file. I have dabbled with using the Excel objects but I need some assistance.
View 6 Repliesi have the code bellow to write a structure to a text file, but nothing is happening,how can i get a error message if the file doen't exist?
Imports System.IO
Imports System.Runtime.Serialization.Formatters.Binary
Public Class Form1
[code]....
I have dev.xls file with sheet name as "Electricity". In my vb.net winform application, I want to read all this data and write it into another xls file (Test.xls) with sheet name as "Electricity_Processed". Looking for a way to do this without using other dll's or Interop
View 3 RepliesI am new to VB.net. I want to read and input file and store that data to an SQL Server database. Do you have an sample code that do such?
View 1 RepliesA VS 2008 desktop .NET program needs to open a PDF file and read its contents as data. That is, the program must scan through the PDF file searching for certain text. The program will not merely open the PDF file and display the contents using a control such as an ADOBE Reader control. It has to actually read the individual data within the PDF.
How can a .NET program read data within a PDF file?
I am reading csv file via streamreader. Issue is that in csv file if if the data is like "Read" then steamreader the same data is coming as ""Read"". How to remove this extra inverted commas?
View 1 Replieshow to read from .dat file (matastock data)and how to get max close value in the last 14 days for textbox1 , textbox2 = current close ,textbox3= the date of the max close value in the last 14 days
View 4 RepliesHow Can I load data into my datagrideview from xml file
View 8 RepliesSo my most recent project hinges on the ability to open a selected XML file and display the names of certain fields in a listbox control. This normally wouldn't be challenging except that the following variable is equal to vbNull (Nothing). Dim XMLReader As New System.IO.StreamReader(OpenFileDialog1.FileName)
View 5 RepliesI am reading in part information from a CSV File. When I read the data in, I have a display form/window that displays the data as:
"D159483,172 Cylinder,9/12/2011,2:38:53 PM,,Brian,30,6"
I would rather have the data look like[code]...
I'm a beginner programmer, but this may not be a beginner program question. I would like to write a program in small basic or visual basic that reads data from a binary file. The data are formatted in hex and look like this:
[Code]...