Storing Data In Text File
Hi, I am a very very beginner I need to store the input details (book details) from the form fields into the text file and then retrieve how many books are stored.
I made a form with the tabs and I know how to create a text file in location but then I am stuck
I have the following 4 text fields
Dim ID As Integer
Dim Name As String
Dim Author As String
Dim Price As Integer
help!!!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
HELP !!! - Storing Data To A Text File
Hi,
I need to get help. I have managed to send data from a vbform in to a text file which is on my local hard disk and the code is as follows:
Open "C:ClassTest ".txt" for Ourput as #fNos
and its working fine with just one form. BUT I have 3 other forms which all have a value that I need to send them to the same text file. Also I want them to be in the same row as form1 is sending the values, that is concatinating all values separated by a comma.
Pls give me some help cos I'm lost and I have been going round in circles.
Thanks
Storing Text And Picture Data In The Same File.
Hey,
I'm trying to figure out how I could create a single file that would be able to contain both picture and text dat (as much as I needed), almost something along the lines of:
Open "C: est.bin" For Binary As #1
Put #1, Text1.Text, Picture1.Picture
Close #1
but obviously that doesn't work. Is it necessary to use databases to accomplish this? Is there a good tutorial I can find on it?
Thanks!
Storing Plain Text Data In Its Own File
Hi all i am just starting to get back into VB and i need a little help.
I am writing a program that asks a user to type in a set of numbers/letters
(in this case shipping containers).
Once the data is entered i have my 4 letters and i want to be able to call
up data relating to the 4 letters.
Basically i want it to show who the container belongs to and any other data
i wish to put in there relating to the container.
Rather than hard code everything i want it in a seperate file(s).
Thanks
Steve
Storing Data From A Text File In Arrays, I Need Help!
I have to take the text file bellow and break it into an array,
"Name","ID","Score"
"Daisy","5","98"
"Pluto","2","65"
"Kermit","1","78"
"Duke","3","87"
"Cooter","6","93"
"BossHog","8","74"
"RoscoePcoltrane","7","94"
"UncleJessie","9","86"
"LukeDuke","10","89"
"BoDuke","4","71"
"Festus","12","99"
"MissKitty","11","94"
I declared my the main array as udtList and the arrays as strName, intID and intScore
I have been tring to use bolth:
Input #1 udtList(i).strname, udtList(i).intID, udtList(i).intScore
and Get #1 "", "", ""
Nothing I try seems to work and im about to take a crowbar to my computer, if you could offer any assistance I would be forever gratefull.
Storing Data Form Text File Into Database
Hi...
I am doing project in visual basic for character recognition.
I have a problem for reading data from text file character by character and convert it into excel file and storing into various tables in database.Can anyone help me. Thanks..... in advance. Plz reply.
Storing Data In A File
Hi everyone, I need to store values in a file and then be able to transfer those values to print off an invoice, e.g. product description, quantity, price etc.
I am using combo boxes to select relevant products which pulls up prices automatically. Can I then transfer this data into a Word doc or something similar?
Thanks
Help With Storing Data In A File
Hi again,
first thanks so much to those who helped me in the past, i just write code for a few hobby projects each year and its very generous for you all to be so helpful.
i am wanting to write data that i have retrieved and processed into a file that uses a format that i have no experience or understanding of. i DO have a code snippet provided by the programmer of the device that uses the file. which i posted in the C++ forum but got no responses. further the note i recieved says:
"We use C++ serialization to store data and pull it out of the user data files."
so does anyone know if its possible to store compatible data using VB6? any pointers to an example would be great.
thanks
jerry
Storing WAV Data In EXE File
Hello,
does anyone know how to store the WAV data a program needs into the compiled EXE file ?
Is there any control similar to the imagelist control (in which image data is stored and placed IN the EXE file, after compilation) for sound ??
Thanks
Storing Data In An Exe File
I need to store some data in an executable file and i need to know how.
Is there any???
Thanks for any help
Storing Data From A Html File
Hello,
Here's what I want to do... or at least what I've been trying for the last days...
I have several html files. They all have the same layout with some standard titles. Behind those titles there is some data that I need to get in a database. This data is different (from different length) in each html file.
example:
Let's say the standard title is "title:" and behind that we have 123456. So I need the 123456 in a string (or database).
Untill now I did it like this.
Open "C: est.html" For Input As #1
Do While EOF(1) <> True
Input #1, RawData
... and so on ...
Then I search for the word "title:" in the string RawData. When I found it, I open a loop and take every character in a string until I reach the character "<" beacuse then I know that the html code is starting again and my title is in the string.
Well, this is my explanation... but I can't figure it out how to let it work... Can somebody help me?
Thnx in advance!
Greetz!
Storing Data To The Program File Itself !!!
hi,
i know other methods for storing information. like storing to the registry or to a txt file or to a database..
but i think storing an encrypted information in the program file itself will be safer..
i need it to store a flag value to check if the user have a registered version or not, but how can i store data to the program .exe file itself???
any code?
thank u..
Storing/Restoring Data From A File
Hi, i'm a little stuck with a small project.
I am trying to create a multi-function tool for an online game. The problem is, I would like to be able to store IP addresses (which are typed into a total of 5 boxes incl. Port) into a file, which can later be restored.
As the file would contain a list of IP's the file would need to be loaded into a listbox or a combo box to select which IP address to restore.
Thanks in advance for any help and please remember I am very new to VB so be gentle :P
If there is something you feel I missed out or need more details, just ask and I will try my best to tell you.
btw, im using VB6.
Storing Parameters In Text File
I'm using the printer object to print certain information from my database to a form. The problem is that the users change printers therefore where on the page the information prints changes a little.
I want to build a print setup screen and have it default to whatever the user picked the last time they were in the
screen
printer.print
rs.open "Select * from table1"
do while rs.eof = false
x = textbox1.text
y = textbox2.text
Printer.ScaleMode = vbTwips
Printer.FontSize = 12
Printer.CurrentX = 1440 * x
Printer.CurrentY = 1440 * y
Printer.Print rs!field1
When the user closes the screen is it possible to store x and y into a text file and when the user opens the screen is it possible to read x and y from the text file
Text File For Storing Stats
Hello All,
I'm developing a new application which is going to be used to store statistics based on the button which is pushed. Essentially, the program is going to have 5 buttons (A-E) and there will also be a text box at the bottom for entering a number (default is 1).
When the user presses a button, I'd like the program to store the number into a text document.
There will be one file for each day and in the file, it will say something like this (by default):
[A] = 0
[b] = 0
[C] = 0
[D] = 0
[E] = 0
If the user presses the A button, then I'd like my program to open the txt file, and add the number in TextBox to the value in the text file. If C is pressed, it'll add that number to the C value in the text document. (Following me?)
Can anyone help me with some syntax on how this would be done, while preserving the text box structure? (No extra line breaks, anything like that) I guess I need help building code to search the textbox, pull out the value from the correct line (A-E depending on the button), then adding that value to a (integer) which is the value from the text box in the program, and then store that value back onto the correct line in the text file.
I think this may sound harder than it actually is going to be... but I'm still a very much newbie when it comes to reading and writing to text files.
Thanks in advance!
Storing And Retriving Data In Binary File
Hai,
i want to store and retrive data in binary format i am having a nested structure like this
Structure struct1
Dim a As Integer
Dim b As Boolean
Dim c As Boolean
Dim d As Integer
Dim e As Integer
Dim obj() As struct2
End Structure
Structure struct2
Dim a1 As Integer
Dim b1 As Boolean
Dim c1 As Boolean
End Structure
the size of the obj for struct2 will depend upon the value e in struct1.
the size of struct1 at the maximum will be 10.
I need help on this.
Thanks
Antony
I Have A Problem With Storing A Date Into A Text File
Hi there,
My problem is I am saving a Start date and an End date to a .txt file. The end date stores in the file correctly in the format #2004-02-09# whereas the start date is stored as "09/02/2004". I can't see where I'm going wrong. I've checked the data format on the form and they are both set to date.
I have another form which is to show the start date , the end date , and today's date and that form is the same with just the end date being shown correctly. the others are shown on the form as 09:02:2004
Can anyone help with where the problem lies.
Below is my code:
Private Type Personal
strName As String
strAddress As String
strCity As String
strCounty As String
strPostcode As String
strTelephone As String
dteDOB As Date
dteHirestart As Date
dteHireend As Date
intDays As Integer
End Type
Dim recPers As Personal
Option Explicit
'Define Variables
Dim strName, strAddress, strCity, strCounty, strPostcode, strTelephone, strVehdetails As String
Dim dteDOB, dteHirestart, dteHireend As Date
Dim intTotalcost As Integer
Dim intDays As Integer
Dim intSeats, intCost As Integer
Dim intCount1, intCount2, intCounter, intLoop, intVehicles, intEntries As Integer
Dim intIndex As Integer
'Show available vehicles in combo box
Private Sub cboAvail_Click()
intIndex = Me.cboAvail.ListIndex + 1
intDays = txtDays.Text
txtTotalcost = "£" & intDays * recVehicles(intIndex).intCost
txtNodays = txtDays
'Display vehicle details when selected from combo box
txtVehdetails = recVehicles(intIndex).strVeh & " , " & recVehicles(intIndex).strReg & " , " & _
"No. of seats = " & recVehicles(intIndex).intSeats
End Sub
'Clear contents of all text boxes
Private Sub cmdClear_Click()
txtName.Text = ""
txtAddress.Text = ""
txtCity.Text = ""
txtCounty.Text = ""
txtPostcode.Text = ""
txtTelephone.Text = ""
txtDOB.Text = ""
txtAge.Text = ""
txtHirestart.Text = ""
txtDays.Text = ""
txtHireend.Text = ""
txtTotalcost.Text = ""
txtNodays.Text = ""
txtVehdetails.Text = ""
End Sub
'save whatever is in text boxes to these variables
Private Sub cmdConfirm_Click()
strName = txtName.Text
strAddress = txtAddress.Text
strCity = txtCity.Text
strCounty = txtCounty.Text
strPostcode = txtPostcode.Text
strTelephone = txtTelephone.Text
dteHirestart = txtHirestart.Text
dteHireend = txtHireend.Text
intTotalcost = txtTotalcost.Text
strVehdetails = txtVehdetails.Text
Open "A:AssignmentBooked.txt" For Append As #2
Write #2, strName, strAddress, strCity, strCounty, strPostcode, strTelephone, dteHirestart, _
dteHireend, recVehicles(intIndex).intCost, intTotalcost, recVehicles(intIndex).strVeh, recVehicles(intIndex).strID, _
recVehicles(intIndex).strReg
Close #2
End Sub
Private Sub Form_Load()
'load in vehicle list
intCount1 = 1
Open "A:AssignmentVehiclelist.txt" For Input As #1
Do While Not EOF(1)
Input #1, recVehicles(intCount1).strVeh, recVehicles(intCount1).strID, _
recVehicles(intCount1).strReg, recVehicles(intCount1).strLic, _
recVehicles(intCount1).intSeats, recVehicles(intCount1).intCost
intCount1 = intCount1 + 1
Loop
intVehicles = intCount1
Close #1
On Error GoTo ErrorHandler
'load in booked list
intCount2 = 1
Open "A:AssignmentBooked.txt" For Input As #2
Do While Not EOF(2)
Input #2, recBook(intCount2).strName, recBook(intCount2).strAddress, recBook(intCount2).strCity, _
recBook(intCount2).strCounty, recBook(intCount2).strPostcode, recBook(intCount2).strTelephone, _
recBook(intCount2).dteHirestart, recBook(intCount2).dteHireend, recBook(intCount2).intCost, _
recBook(intCount2).curTotalcost, recBook(intCount2).strVeh, recBook(intCount2).strID, recBook(intCount2).strReg
intCount2 = intCount2 + 1
Loop
intEntries = intCount2
Close #2
'store the number of records
ErrorHandler:
'if there hasn't been a file created originally then create one
If Err.Number <> 0 Then
Select Case Err.Number
Case 53
MsgBox "(Creating new Booked.txt File)"
Open "A:AssignmentBooked.txt" For Output As #2
Close #2
Exit Sub
Resume
End Select
End If
End Sub
'When you tab off No of days automatically calculate which vehicles are available
Private Sub txtDays_LostFocus()
Dim bolCheck As Boolean
Dim intAge, intCompare1, intCompare2 As Integer
dteHirestart = txtHirestart.Text
txtHireend = DateAdd("d", txtDays, txtHirestart)
cboAvail.Clear
bolCheck = True
intCompare1 = -1
intCompare2 = -1
For intCompare1 = 1 To 20
intCompare2 = 0
If intAge < 21 And recVehicles(intCompare1).strLic = "Over 21 years old" Then
bolCheck = True
Else
bolCheck = False
End If
Do While bolCheck = False And intCompare2 < intEntries
intCompare2 = intCompare2 + 1
If bolCheck = False And recVehicles(intCompare1).strID = recBook(intCompare2).strID Then
If recBook(intCompare2).dteHireend < dteHirestart Or _
recBook(intCompare2).dteHirestart > dteHireend Then
bolCheck = False
Else
bolCheck = True
End If
End If
Loop
If bolCheck = False Then
cboAvail.AddItem recVehicles(intCompare1).strVeh
End If
Next intCompare1
End Sub
'Calculate Date of Birth
Private Sub txtDOB_LostFocus()
Dim intMonths As Integer
Dim sinAge As Single
Dim dteDOB As Date
dteDOB = txtDOB
intMonths = DateDiff("m", dteDOB, Now())
sinAge = intMonths / 12
txtAge.Text = Int(sinAge)
End Sub
Private Sub cmdExit_Click()
frmHire.Hide
Load frmMenu
frmMenu.Show
End Sub
'Calculate total cost of hire
Function Total(Totalcost) As Integer
Totalcost = intDays * recVehicles(intIndex).intCost
End Function
Storing All Keyboard Inputs To Text File
regarding TSR in Windows platform . Can anyone help me to get the code for storing all the keyboard inputs and put it in a text file . i would be very thankfull if you help in this topic.
Need Help ASAP -- Opening A Text File And Storing Info In An Array
I know this has some what been addressed but none of the posts seem to have what I need. Im making a daily log of how many calories you took in and burned off. All you do is just type in the info in textboxs and hit record data and it records it into an array I call MyArray.... Then you can enter the date in the date textbox and call it back up. Now so far Iv been able to save the data thats in the array as a text file but I need some help opening it up. I want to be able to open the text file and simply store the data in the text file back into the array (MyArray) I do this becuase In order to keep the data in the log you would either have to save the array or keep the program open 24/7, i would rather be able to save and open the data. Hope this makes since.
Info about the array:
2-d array called MyArray
Im using opendialog box's to open and savedialogbox to save etc....
the save code looks something like this:
Code:
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
Dim z, y As Integer
SaveFileDialog1.Filter = "Text File (*.txt)/*.txt"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FileName <> "" Then
FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
For c = 0 To 6
For r = 0 To 18
PrintLine(1, MyArray(c, r))
Next r
Next c
FileClose(1)
End If
End Sub
Now I want to take the text file and open it up and simply put it into an array, I dont want to put it into textbox's, just into the array. How would i go about doing this?
Thanks Alot!
P.S Iv included my project in case you need to look at it
Edited by - Capt_Hardcore on 1/22/2004 8:47:30 AM
Storing Images In SQL Vs. Storing Path To Image File
I'm writing a document management application whereby users will be able to scan documents into the application. Then from within the applicaiton the users will be able to access the scanned documents.
So the debate is whether I should store the image directly in SQL Server (7.0) or simply store the path to the image and put the image on a network folder.
I have heard people recommend storing only the path and not the image itself but I don't know the reasons.
Obviously the database would be quite large but can't SQL server handle it? Backups would have to be performed either way so... I suppose if the database was corrupted then all images would be lost as opposed to single image files being corrupted on the harddrive.
I guess I'd like to hear what others have done in the past, their opinions, etc.
Thanks in advance.
Storing Data In And Recalling The Data From A Single Database Record
hi guys...
I am still working on the same system but on another part of it.
I need to know how I can have some numbers in text boxes or other controls, so that when the app is closed, the numbers get stored in a database record, or some other data sheet, and then get called back up wheb the program is reopened
I actually have access to some code that was writting for another part of this system, but I don't understand a lot of it
Anyway... I need to know how to have these numbers stored automatically when the app is clsed, and then recalled automatically next time the app is opened.
Thank you so much
Happieman
Import Data From A Text File Into VB Form In Order To Process That Data
I'm trying to import Data from a text file, which includes the following,
Vessel Name
000115600
000025600
000000000
000089000
000019000
000000000
6670.43
The above file is updated every five minutes and I wish to retreive this data in order to perform calc's and then display a completion time for a process on the User Form.
Can you please help.
Cheers
Saving Data In Text File With Out Overwriting The Current Data ?
Hi .........
First .. I will explain the purpose of this Needs , and i will ******** every point
1. I have 2 text files :
A. DatabaseBakups.txt 'Hold all names of all Access Database which i have in my directory
B. CurrentDataBase.txt ' store the name of the current Access used file
2. In my Maintainance section there is to option :
A. Backup the Database 'with command button to save the current running database and in same time store that name into DatabaseBakups.txt file
B. Restore Database ' with combo list which have the list of all database i have and should be readed from DatabaseBakups.txt
The Actions :
3. when the user select to backup the database .... the system will give a specific name 4 the database e.g. "DB30-05-02.mdb" and in same time store that name into DatabaseBakups.txt with out overwriting the existing data .......
4. when the user want to recover/restore some of previous database ..... there is list box which is extracting the data from DatabaseBakups.txt and giving the users the alternative to choose the month or the date of backup to restore the database ....
my questions :
1. how to write a code for inserting data to txt file with out overwriting the existing data ???
i used this simpe one but that will overwrite all exisitng data :
Open App.Path & "DatabaseBakups.txt" For Output As #1
Write #1, "DB30-05-02.mdb";
Close #1
2. How to load the data from file "DatabaseBakups.txt" to the list box ??
I know that I wrote a story of my problem ..... but i believe that will help the person to understand my needs ......
Thanks In Advance 4 help
Regards
BMH
Processing Text Files (FINDING AND REPLACING DATA INSIDE A TEXT FILE)
Hi
I would appreciate if some one help me out in finding an answer to this.
I am a new user of visual basic and have been stuck in writing a code / project for finding and replacing a data from a text file ( input file to an application).
The part of file sample which need to be replaced is below
SCJ 1 NAME "" TYPE FIXED_TIME CYCLE_TIME 61.0 OFFSET 0.0
SIGNAL_GROUP 1 NAME "" SCJ 1 RED_END 2.0 GREEN_END 26.0 TRED_AMBER 0.0 TAMBER 4.0
For example I need to replace 61.0 to 91.0 and 26.0 to 43.0.
The data in file is random and can come at any line number, one of my other concern is how to locate the line number, I have no clue for that.
Please help me in working this out.
Best Regards
Abdy
Sorting Data From An ASCII Text String And Saving It As Text File
Hi,
I'd first like to copy paste a section of my ASCII text string over here and then ask the question.Given below is the ASCII text string:
RT 01 A_UNIT
DEV 01 A_UNIT
=ontrol Mode ON LOCAL STAT
Occupied YES OCC
CCN Chiller START CHIL_S_S
Alarm State Normal ALM
Active Demand Limit 100 % DEM_LIM
Override Modes in Effect YES MODE
=
=?
RT 01 CIRCA_AN
DEV 01 CIRCA_AN
=IRCUIT A ANALOG VALUES
Percent Total Capacity 100 % CAPA_T
Percent Available Cap. 100 % CAPA_A
Circuit Running Current 185 AMPS A_CURR
Discharge Gas Temp - A2 122.9 dF DISTMPA2
Saturated Condensing Tmp 97.5 dF TMP_SCTA
Saturated Suction Temp 41.5 dF TMP_SSTA
EXV % Open 43 % EXV_A
Variable Head Press Pct. 0 % VHPA
=
=?
Given above is a portion of my ASCII text string.I'd like to know how to sort out the data from this file and copy it in the same format as given above into a new Text File,using the delimiting characters like the white space and the "?".The "?" indicates the end of the file and the following ASCII text string after every "?" indicates the start of a new text file.
I'd be very very grateful to the person who'd give me the solution to this.Thanking you in anticipation.
Storing Data
I poseted this on a diffrent post however I think I was supposed to post it here. Here is what I posted:
Hi,
I am curently writing a program that will keep track of classes that people take. So far all I made was the GUI. You can look at it by going here [NO DIRECT LINKS TO EXES PLEASE] . I don't know how to store data. If you look at the program pretty much people will be able to add a class that they took, the date they took it, the course number and how many CEU's (aka points) the class is wotrh. I want to figure out a way to take the data from the text store it on the computer in a file or in the reg. and when the program is turned back on it is placed into the lavels on the form. I am still a newbie. I do not know how to use data grids. As of now I will be placing 20 labels for each section (i.e. class name, date taken etc.) And when it pulls the info it will see how many classes are taken and fill the appropiate amount of labels. The rest of the labels will be set to be hidden. I know a little bit on how to work with a .db file. The problem is that all the code needs to be in one exe. I need step by step directions. Can anyone help.
Thanks.
AND
Ok. I now realize why people wouldnt want to download an EXE. Here is a screen shot of the program. Http://www.emstalk.com/downloads/ceutracker.jpg.
Here is the form
Http://www.emstalk.com/downloads/MainForm.frm
There is no "real" code in it since I did not know how I would store and retrieve the data.
Here is the source code
Code:
Private Sub IDontWork()
MsgBox "I Don't work yet"
End Sub
Private Sub Command1_Click()
Call IDontWork
End Sub
Private Sub Command2_Click()
Call IDontWork
End Sub
Private Sub Command3_Click()
Call IDontWork
End Sub
Private Sub Form_Load()
CMonth.AddItem "01"
CMonth.AddItem "02"
CMonth.AddItem "03"
CMonth.AddItem "04"
CMonth.AddItem "05"
CMonth.AddItem "06"
CMonth.AddItem "07"
CMonth.AddItem "08"
CMonth.AddItem "09"
CMonth.AddItem "10"
CMonth.AddItem "11"
CMonth.AddItem "12"
CDay.AddItem "00"
CDay.AddItem "01"
CDay.AddItem "02"
CDay.AddItem "03"
CDay.AddItem "04"
CDay.AddItem "05"
CDay.AddItem "06"
CDay.AddItem "07"
CDay.AddItem "08"
CDay.AddItem "09"
CDay.AddItem "10"
CDay.AddItem "11"
CDay.AddItem "12"
CDay.AddItem "13"
CDay.AddItem "14"
CDay.AddItem "15"
CDay.AddItem "16"
CDay.AddItem "17"
CDay.AddItem "18"
CDay.AddItem "19"
CDay.AddItem "20"
CDay.AddItem "21"
CDay.AddItem "22"
CDay.AddItem "23"
CDay.AddItem "24"
CDay.AddItem "25"
CDay.AddItem "26"
CDay.AddItem "27"
CDay.AddItem "28"
CDay.AddItem "29"
CDay.AddItem "30"
CDay.AddItem "31"
CYear.AddItem "00"
CYear.AddItem "01"
CYear.AddItem "02"
CYear.AddItem "03"
CYear.AddItem "04"
CYear.AddItem "05"
CYear.AddItem "06"
CYear.AddItem "07"
CYear.AddItem "08"
CYear.AddItem "09"
CYear.AddItem "10"
CYear.AddItem "11"
CYear.AddItem "12"
CYear.AddItem "13"
CYear.AddItem "14"
CYear.AddItem "15"
CYear.AddItem "16"
CYear.AddItem "17"
CYear.AddItem "18"
CYear.AddItem "19"
CYear.AddItem "20"
CYear.AddItem "21"
CYear.AddItem "22"
CYear.AddItem "23"
CYear.AddItem "24"
CYear.AddItem "125"
End Sub
Storing Data
I never understood how to do this, but I now require it.
I need to be able to save several stats into a file and call them all up upon login. It is not over the internet (although in the future it'll probably have to be saved over a network). The stats include a username, password, and a set of 6 stats (administrative and program access powers) dependent on the first stat (I called it level).
I read the microsoft help file and now I'm not sure whether I am coming or going.
Help?
Storing Data In Exe
I've got a body of data that I want to use in a dll. The body of data is created by a small computer program which is an add-in to VB. I'm wondering what the best way to store this data is. I'd rather package the data into the dll than have it in a separate file that I would have to distribute in addition to the dll. I just think that's neater and more robust. Anyway I've thought of the following options:
1. Keeping each item of data as a string in a resource file. The problem is that I don't think you can add to a resource file with a VB add-in. So that doesn't seem viable.
2. Making a text file, and adding that as a custom resource to a text file. I don't like the fact that you have to extract the whole text file each time you want to examine it - I think this could be slow. Plus, I don't think I can look at the text file without running the dll.
3. Adding a form to the dll with a combo box which lists all the records. The form would never be shown, so this seems a bit of an odd thing to do. But it certainly works, and the add-in can handle it.
I'm coming down in favour of No. 3. Anyone have any thoughts? Is there a more professional way to handle this?
Thanks for your help.
Storing Data In An Exe
Hi' Firstly an apology for not knowing the proper section to post this in as my BV knowledge is minimal.
Here's my problem.
I have a small program that once executed reads a file on my hard drive and then stores the contents in a string variable. The program works fine but it really annoys me that there are two files when I would much prefer the data to be compiled in the exe instead of having to read it from a file.
To date the best I have managed is to put the data file into an OLE as a Package but I cannot find any way to transfer the contents of the OLE Package to a string variable.
Any help with this would be most appreciated.
Thanks in advance.
Storing Data
Hi,
I am curently writing a program that will keep track of classes that people take. So far all I made was the GUI. You can look at it by going here [NO DIRECT LINKS TO EXES PLEASE] . I don't know how to store data. If you look at the program pretty much people will be able to add a class that they took, the date they took it, the course number and how many CEU's (aka points) the class is wotrh. I want to figure out a way to take the data from the text store it on the computer in a file or in the reg. and when the program is turned back on it is placed into the lavels on the form. I am still a newbie. I do not know how to use data grids. As of now I will be placing 20 labels for each section (i.e. class name, date taken etc.) And when it pulls the info it will see how many classes are taken and fill the appropiate amount of labels. The rest of the labels will be set to be hidden. I know a little bit on how to work with a .db file. The problem is that all the code needs to be in one exe. I need step by step directions. Can anyone help.
Thanks.
Dovid
Dovid@Dovid.net
Storing Data
Id like to create a program that allows me to enter names into a list, then save it so i can close the program. but when i open it again i would like to load the list up again. i wouldnt mind having to hit a button to load or save as long as it works. ive got everythign figured out except how to save the list entries. and not save to a network or a database. i want to save to the computer only. ANY ONE WHO CAN HELP, PLEASE DO....
Storing Data
Can someone please tell me why my data from a form with InkEdit text box controls are being stored as Rich Text Format in the database. I would like to convert it to plain text.
I thank you all in advance for all your help.
Gil
Storing Data In VB
I work with Access a lot and I know that we can store data in tables. However, I am transitioning into VB and I do not know how VB stores the data.
Does VB have table like MS Access? if not, how if data stored if you do not want to connect to database or server?
Storing Data
What would be the best way to store around 8-10k of data ?
Dim ?
Storing Data Within VB
Hi All
First post here
Im am new to VB but familiar with VBA, what i want to know is is it possible to store data in something like an excel spreadsheet within VB?
I then need to access this from a useform ( a very basic database!!!).
I need to keep my data embedded within the program somehow so i need to be able to save my changes as well,
For my project I cannot have an external database and have to embed my data within the program, is that even possible in VB?
Thanks for taking the time to look
Gibbo
Storing Data
Hello!
I was wondering if this is the best way to store multiple properties of multiple items:
Code:
Private Type ItemData
strLargeImageURL As String
strMediumImageURL As String
strSmallImageURL As String
strArtist As String
strTitle As String
strASIN As String
End Type
Private udtItemData() As ItemData
If I want to access the title property of the sixth item, I would query udtItemData(5).strTitle.
Is the above method the most efficient?
Regards,
Sebastian
Storing Data
I've got data coming in through RS232 serial comms and MSComm deals with this. This data will be coming in every second for about 2 hours (it's a data logging device). What I need to do in my software is store this data in a table so that the user can scroll through the results. The reason for the table is so that the user can select and copy the data into Excel or an alternative to produce graphs. Being a beginner with VB I haven't a clue how to go about this. Apparently it's something to do with arrays??? I need to store the data, then increment to the next cell in the table and repeat till tests are complete. Any ideas anyone?
About Storing Data...
Hello,
i wish to konw how u use to store data in a field of db:
i'm refering in particular to CheckBox, i use to build a control array, in order to store in the table field the index of the one is checked, if none is checked then i save -1 or null.
Up to here i hope it is the standard way, if there's a better way tell me
Now my question is:
it happens that the checkboxes are not exclusive... so i can store in the same fieldsnull value, or -1an integer (the index i've checked)N integer (the indexes i've checked)What i've thought is to store the integers between bracket.
first i try to use a separetor like ; but when i go into the field lookin for 1 ... i find 1, 11,12,21... and so on....
using bracket if i look for (1) i'll find only 1!
What do u think about it? there are better way for doing the same?
Storing Data
I have an Access 2000 database that is populated from a Web Front end application. The database usually stores about 100 records and doesnt have alot of concurrent users. I have a field called Status that stores about 10 to 20 sentences of Status information that is entered once a week. Each time someone updates a Status field it copies the old status to History1 field and History1 is copied to History2 field and History2 field is copied to History3 field.
Everything works well but now I need to know how I would store the old data that is eliminated in the History3 field. I could put it in one big field called Archive but I think Access limit on a memo field is 65,000 characters?
Please provide suggestions how I should store this information because status is updated once a week and I will sometimes need to store up to 52 weeks of data. I assume it is not a good idea to create 52 fields to store each week of data in one table so I am hoping for someone to suggest the best way of doing this.
My current table fields:
project_id
status
history1
history2
history3
Storing Data
Hi, I'm using a Listview in my app and I need to store extra data for each Listview item, but it's too much data to put in the Listview as well. I think I need to use a class, but I'm not sure how to do it properly.
The extra data I need to store looks like this (maximum of 999 items):
Code:
f9fs987sf983hjb4hjb534jhb43b.local
sd7f6sd7dfg7f5g76dfg576g57g6.local
e54efwefw86yh3h43u5ih34uih4.local
9w76e76w7986ewe78w6ew7e76w.local
31jkn44890fjn546hj6g.local
sfsf765ewrk453io54389u7568945.local
Each Listview item has a 'key': ListView.ListItems.Add , "Key1", Item Text
Somehow I need to store the data and link it to the Listview Item key. I also need to 'tag' the extra data with "free" or "busy" or "done".
StoreData "Key1", "f9fs987sf983hjb4hjb534jhb43b.local", "free"
StoreData "Key1", "sd7f6sd7dfg7f5g76dfg576g57g6.local", "free"
StoreData "Key1", "e54efwefw86yh3h43u5ih34uih4.local", "free"
etc
Later I need to be able to loop through it and based on the 'tag' do something with the data.
I've done some very basic storing in classes like the code below, but I'm not sure how to do this.
vb Code:
Private StoreData(1 To 999) As String Public Sub AddItem(sData As String, lIndex As Long) StoreData(lIndex) = sDataEnd Sub Public Function GetItem(lIndex As Long) As String GetItem = StoreData(lIndex)End Function
Storing Data?
Well, for the second time today, I've had to resort to coming here for help.
I'm creating an archive program with the options to add new information.
So far there are three factors: The User - The Type - And The Username/Password.
The Users are stored in a combo-box. The Type is stored in a list box, and the Username and password are stored in two seperate text boxes.
What I need is a way to add information that will fill these forms.. and have it actually save.
I used the naive approach. I thought maybe if I coded it to AddItem to the listbox/combobox that it would save. But even as a VB noobie I should have known better.
Should I go with a database? Or text files? Keep in mind that I'm pretty new, and will certainly need some code and detailed explanation.
Thanks guys!
Storing Data
This might be a stupid question, but I must ask. Is there a way to store small amounts of data for later use w/o the use of an external file (ex. txt, bin, mdb)?
Also if I had to use an external file (mdb), what is the best practice for storing on the users PC. I would like to have it as transparent as possible.
Thanks in Advance, this forum rocks!
Storing Data, In Mdb?
Hi all,
I am new to programming w/ Visual Basic and have a few probably noob questions. I am creating a program that will store restaurant names in a file. Then later randomly pick one. What would be my best be for storing this data? I would prefer storing the data in a mdb then access it with queries and DAO, because I am familiar with this. The only thing that worries me is, what if my users don’t have access installed, will this affect them? I also heard of using the ‘Scripting Runtime’ File system objects.
Thanks in Advance
Storing Data
hi, if i have a form and i want to save setting ie. a user click on the check box to make the background blue, how can this be saved so next time they are back it's blue again and not the default black for example
Best Way For Storing Data
Whats the best way for storing data to the disk?
I don't really want to use the "put" method as most of my fields (about 10,000) are about 2 chars long, then I need one of about 20...so theres a wide range.
I'd rather store some raw text and code it etc myself.
I was using the richtextbox control, is this the best method? Its a rather sizeable ocx...
|