VS 2010 Philosophy On Storing Data?

Dec 28, 2010

There are "text" files, there are databases, I used to use a record (now called a structure) in a ".dat" file, but I'm having trouble finding documentation support in vs2010. So I'm thinking maybe it's time to move up to ... ? databases? ".txt"s? The current app I'm trying to write will only have a couple of hundred "records" at the very most; Old vb6 command like LenB which would return the size of a file in bytes is no longer, and I can't find how len( .."as byte" of file) would actually be implemented. len( <filename>, as byte) isn't the correct syntax - what is?

Is there some thing less dramatic than a full blown database? Or getting used to how a database uses SQL and all that goes along with that shoud be something to get handy with?

View 13 Replies


ADVERTISEMENT

Arrays And Storing Data To A File VB 2010

Feb 6, 2012

I am trying to store 8 separate pieces of information in a text file (like a database) [but not a SQL database], consisting of integers and strings. How would I use an array to do this? Will an array collect data from text boxes (I also want to display the 8 pieces of information in separate boxes). also how would I save the text file so I can open it again or open a different text file (database?), from within the program?

EDIT: I see I need to use readline and writeline to read/write from a text file but how would I find specific data to show in my boxes?

View 1 Replies

DB/Reporting :: VB 2010 Storing And Retrieve Data?

Jul 21, 2011

What is the easiest method of storing data and retrieving it using VB? FYI, I have not used Access before. It will be a movie database that stores title genre, etc. I thought about using a text file but i think thats crude and ran across this site:

View 1 Replies

VS 2010 - Storing Data In Some Type Of Variable

Jan 19, 2012

I have data that I want to store in some type of variable where I can easily access when needed. For example I have:
google.com -> This is a cool website.
yahoo.com -> News website
gmail.com -> Mail website

I want to be able to store those in some type of group so if I go like:
get data of google.com without going through a loop.

View 2 Replies

VS 2010 : Storing Data In Txt File For Program Use?

Jun 22, 2011

In the program I'm working on, there is a 'sign-in' form that pops up for the user to enter first name, last name, and DOB. What I want to do is STORE that information in a text file for FUTURE use by the program (i.e. displaying a list of all previous users of the program).I already know how to use streamwriter to write text to a file, but I would like for the text file to be stored within the program files and also for a new user's data to be appended to that file every time.

Do I simply add the text file to the project files? When I do that, its path is 'My Documents'. How will that affect the program when I publish it? I guess I just don't yet understand what happens when the program is finished and published. The code for the 'Submit' button on the sign-in form is pasted below. At the bottom, I've put a comment to indicate where I want to store the data to a file.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TxtBox() As String = {TextBox1.Text, TextBox2.Text, TextBox3.Text}
For i As Integer = 0 To 2
If TxtBox(i) = Nothing Then

[code]....

View 13 Replies

VS 2010 Storing Data Along With List Box Items?

Sep 19, 2011

What I'm trying to accomplish is first of all, adding items in a list box, but while doing so, store data into that item so when the user clicks on it, the data will be brought up into the correct text boxes.

My idea on how this will all work out has to do with array lists. I'm thinking each time an item is added to the list box, an array list is generated containing all the data from the text boxes. The array list would be named as the text of the list box item.

So then when the user clicks on one of the items, it can find that array list easily because of the selected index, and then update the text boxes with the data.

Is the way I'm thinking of possible? If not, or if there is an easier what, what would that be?

View 12 Replies

VS 2010 - Storing Text Data In File For Program Use

Jun 28, 2011

Here is what I would like to do:
- Store string data from a 'sign in' form into a text file. This text file must be one that is saved even after the user exits the program. The text file must also be one that will stay with the program even after it is published (executable).
- Be able to write to/read from the file for purposes of displaying some or all of that data on a form.

I use an Application Setting to do this - of type 'Specialized String Collection'. I tried this, but for some reason I could not get it to work. It was a good idea, but I need to be able to SEE the data that has been saved, and with a setting it seems like that is not easily done. I've decided that I either need to use a simple text file or a 1-table database for this. I would prefer just a text file, but in either case, it needs to be part of the .exe when published.

I have added a text file to my project, but I am not sure if it will be "included" in the project when I publish it. The path of the file I've added is in 'My Documents', but in my code, I will have to specify the path in order to use Streamwriter. How will this affect the program when I publish it? I felt the need to make a new thread because on my last one we had been mainly talking about settings, and I've decided that isn't the best option for me.

View 1 Replies

VS 2010 Storing Application Data Within An Application

Jan 8, 2012

I was wondering if it's possible to store application data within an application without storing the data in an external file. For example, in my application, the user can choose where he/she would like to store the files that the application creates. I need to make the application remember the location that the user specified. I've tried using My.Settings to save this information, but since my application is standalone, if the location of the application changes, the My.Settings information changes as well (unless I coded it incorrectly before). I would prefer not to store this data in a .txt file or something similar.

View 10 Replies

Reading Data From A Socket (as Bytes) And Storing Data In A String?

Nov 29, 2009

I am reading data from a socket (as bytes) and storing this data in a string. Then later i need to access specific bytes within the string and do some math with them. However the bytes that I read back from the string are not what I am expecting.

[Code]...

View 2 Replies

.net - Grid For Storing Data?

Jun 2, 2011

I need to store data in a grid like this:

{0,1,2,3}
{4,5,6,7}
{8,9,10,11}
{12,13,14,15}

I know I can use multi dimensional arrays, but Is there any easier way to do it? Also I need to get values from it like myData.Item(0,1) would return 1.

View 1 Replies

Storing Access 07 Data On VB 08?

May 2, 2011

I've linked the two using the standard data sourcing method and I now need to use the data that is read in to it on another form. The idea of this is that I'm creating a wage calculator and the employees are stored in a database and can be viewed on a vb form, however, I now need to use the data of their pay/hr to be used on another form to calculate the wage.I have tried to declare a public variable across the two separate forms, and on the button that takes you to the other to set this variable as the contents of the text box which is displaying the pay/hr using the following

Public Class ManageUsers
Public HrlyRate As Decimal 'Declaring global variable to use between forms

'Some other code in between relating to rest of the stuff on the form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RatePerHourTextBox.Text = HrlyRate 'Saving private variable to global variable
Calculation.Show()
End Sub
End Class

Then on the other form I have used this code to do the calculation:

Public Class Calculation
Private Sub calculation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub

[code]....

View 2 Replies

Storing Data In An Array

May 15, 2009

I'm having trouble trying to put together some code for an array. What I'm trying to do is get data entered from a text box and store it in an array.What I then need to do is take the entered data and make it appear in reverse order to what it's been entered and show this.

View 6 Replies

Storing Data In Arrays?

Apr 22, 2011

storing data into an array. I understand how to place information in one record eg in index 0, but how do i place data into several records(indexes).

View 4 Replies

Storing Data In Classes?

Apr 25, 2012

I have propetie get set classes, and a constructor to quickly set them all.The only concern I have is that the byval in the constructor class and the byval in the set() properties, might be inefficient because the parameter is copied twice? Should I use ByRef? Or is that too dangerous?

'Config data for an Environment.
Public Class Environment
Private msEnvName As String

[code].....

View 6 Replies

Storing Data In Listview?

Jun 23, 2011

I'm trying to learn visual basic and i've made my application all work and now I just need to make the listview save data.As far as I know, I can create a database with all the relavent tables in it for each column in the listview. For example in a database, I will have a table that will have four columns because I have a four column listview. Each row must be tied together though.

The other option is to create a text file and use some xml or seperate them with commas. which one should I go with? I'd rather do the database one, but I really have no idea how to go about it.

View 4 Replies

Storing Data Into Microsoft SQL?

Jul 5, 2010

How can i store data accquired from an Ip address within the LAN into my database?

View 3 Replies

Temp. Storing Data In ASP?

Mar 23, 2011

I have a question. I have a asp site that keeps track of inventory. I currently have it as to where any updates to the inventory, an email is sent with the new changes. How can I get it to send the old changes and the new changes. I know I will need to somehow temp store the old values to use them in the email, but I can't figure out how to do it. I don't want to store them in an actual database table.

View 1 Replies

VS 2008 Storing Data?

Jan 12, 2012

is there any way to keep data stored in an application retrieved from web references like we get data [items] invoked in a listbox from web references and then after publishing it when once exe. is run the data is invoked or retrieved from web references. so that when next time once again exe. is run the retrieved data will be there instead of waiting services to get data.

View 13 Replies

VS 2010 Storing Colors In SQL?

Jun 7, 2012

I'm adding themes to my application so that the user can customize colors. What is the best way to store colors in SQL for the purposes of retrieving them and setting control colors in VB.Net? As an integer? The RGB value as a string? (There will be colors involved that don't have names, so I can't go the route of storing the name.)

View 3 Replies

.net - Storing And Calculating Data Into Hashtable?

Dec 13, 2010

I am making a small tool that require some calculation. I am using hashtable to store values that I need to calculate. This tool continuously extract data on specific time interval(30 seconds) from webpage and add those data into the hashtable. Now the problem is I need to store the previous extraction data and when new extraction occurs, I need to deduct the previous data from new data.

[Code]...

On first run it shows the result of Data3 = 100 which is currect. But on second run I need to redefine the value of Data2 = Data1 . So I need a result of Data3 = 0 on second run. This may not be the proper way to do this sort of operation. I have also tried using listbox, listview and even textfile to store the Data2 and recall that on second run. But could not make it possible.

This is the last phase of my tool and I am stuck with it.

View 1 Replies

DB/Reporting :: Storing RichTextBox Data In SQL?

Jan 22, 2011

What SQL Server data type should be used to store RichTextBox text? The reason I ask is because the BOL indicates not to use text or ntext anymore because these data types will be excluded from future versions of SQL Server.

View 4 Replies

FIle IO - Storing Data Into An Array?

Jan 15, 2012

I've been searching around these forums for quite a while now, and can't seem to either understand or find what I'm looking for.I have a text file, that my program is always adding to it, it's format is like so:

Line 1: UserName (For User 1)
Line 2: FilePath (For User 1)
Line 3: UserName (For User 2)

[code].....

View 8 Replies

Method Of Storing And Retrieving Data?

Apr 23, 2009

I basically need to hold a lot of data - the structure is that of a five dimensional array holding integers.What would be the most efficient way of storing this in a file (I was thinking of XML - your opinion?) that would also be quick to extract.

View 3 Replies

Storing And Calculating Data Into Hashtable?

Dec 25, 2009

I am making a small tool that require some calculation. I am using hashtable to store values that I need to calculate. This tool continuously extract data on specific time interval(30 seconds) from webpage and add those data into the hashtable. Now the problem is I need to store the previous extraction data and when new extraction occurs, I need to deduct the previous data from new data.Here is the process I am currently following:

Dim MyTable as New Hashtable
MyTable.Add("Data1","200")
MyTable.Add("Data2","100")

[code].....

View 5 Replies

Storing Data From Vb To Access A Database

Nov 27, 2010

I am using an Access database and vb.net 2010. I have created a table in the database with columns for title, datein, dateout and roomnymber. In vb.net 2010 I made a distinguished title = combobox, datein and dateout = DateTimePicker. When I click on F5, an error occurs: INSERT INTO Syntax Error in statement. [Code]

View 1 Replies

Storing Data In An Array And Comparing It To Another One?

Oct 15, 2011

I have a whole bunch of information that has been parsed from a web page and i want to insert the data into a multi-demensional array and the compare the data of a certain array element to another array in the same format to determine which is missing/added.So if i have this:

Type of animal | Color | Age
Cat, Brown, 15
Dog, Pink, 6
Fish, Orange, 4

[code].....

I only want to compare the type of the animal and the color and age is irrelevant.I want it to let me know whats missing and what's been added.Sounds bizarre but yeah. It doesn't need to be arrays, it's the only thing i know of though.

View 1 Replies

Storing Textbox Data Into The Database?

Jun 20, 2012

i simple want to store the textbox data into the dataset .after that i want to fill using adapter into the sql server table

View 11 Replies

VS 2008 - Storing / Using Numeric Data

Oct 20, 2009

I have the book "Visual Basic 2008 Step by Step", I am in the final chapters and have completed all of the walk through and demo programs thus far. I am a beginner but I also have a basic understanding of quite a few program statements and objects. My Goal: For the sake of simplicity I will use an example. I have a Tetris game, the player loses in the first level earns 25 points they click the save score button. , they play again tomorrow and do 1,000 levels and earn 25,000, now their score is 25,025.

Then they play my blackjack game, they gain 25,025 points when they start automatically from their Tetris game, they earn 25 points in blackjack click a save score button, now they have 25,050. [Thus far I have 2 games, and they both share a score that will need to be added to in the future]

[Code]...

View 4 Replies

Xml And Storing Large Amount Data?

Jul 22, 2009

I'm working on a project at the moment, where all the data being loaded is kept in an XML file which until now have been rather clean with structures such as

Code:
<Textures>
<Texture id="1">TerraingrassDirtNW.png</Texture>

[code].....

View 2 Replies

VB 2010 - Storing Passwords In Database?

Feb 20, 2012

I am using vb.net (visual studio 2010) and have made a form application that uses a login screen. All that works but I am having trouble any firm way to encrypt the passwords in the database. The encryption doesn't have to be very high standard as its just for a college project. Whats the best way to encrypt the password into the database? Or just encrypt the password string, I can then sort out the database end myself.

View 2 Replies







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