xcorp Posted August 5, 2003 Posted August 5, 2003 Hey guys. I have a small problem. I'm a bit of a newb to Visual Basic and still havn't really got the jist of the language. Anywho, I've been fooling around with programs of all different sorts and havn't been able to figure out how to save data. For instance... My parents, who are very successfull programmers and make Payroll programs for a living. Of course in creating these programs your going to have to save the data for the user. I've been asking them for a long time but they're used to about 10 or 15 different languages. They're old dos people. I havn't been able to figure out how to save data in Visual Basic. If you still havn't totally understood my question I'll lay out an example. For instance I was thinking of creating a "Clan Oraniser" program for games like Counter-Strike. It would come in handy in handling your members, and important information such as "Wonid" wich enables them administrator access to our "Server" or map we're currently playing. How would I save that? I'd need to save "Name, Location, Email, Wonid" and a bunch of other essencial information. I think it would envolve creating a text file such as.. "info.txt" or somethen like that... I can't figure out how to do this... Although I'm no dumbass, I'm 13 years old, so please... Don't go into sockets and the such - It's all greek to me. Any help would be appriciated!! Quote X-Corp Take a hit
*Experts* Volte Posted August 5, 2003 *Experts* Posted August 5, 2003 Look into using databases. Look for your MSDN for information about using ADO.NET. Although I'm no dumbass, I'm 13 years old, so please... Don't go into sockets and the such - It's all greek to me.Age and skill/ability to learn are completely unrelated. :rolleyes: Quote
xcorp Posted August 5, 2003 Author Posted August 5, 2003 lol Thanks... And I know about the ability to learn stuff. lol It's just most of the "Senior Contributor" people are adults and understand the complicated words. lol.... I meant to "Take it easy" Thanks Volteface! Quote X-Corp Take a hit
xcorp Posted August 5, 2003 Author Posted August 5, 2003 Any MORE help would help! Quote X-Corp Take a hit
*Experts* Volte Posted August 5, 2003 *Experts* Posted August 5, 2003 Obviously... Help with what? Quote
xcorp Posted August 5, 2003 Author Posted August 5, 2003 Oh well.. I can't seem to find stuff about databases in the msdn webpage. Direct help would help! Quote X-Corp Take a hit
*Experts* mutant Posted August 5, 2003 *Experts* Posted August 5, 2003 First, what kind of database you want to use? For this i would assume Access? :) Quote
xcorp Posted August 5, 2003 Author Posted August 5, 2003 Umm... Well I'm not entirly sure - I just wanna save a bit of imformation. about a user. It's it possible to write a text file and then open it when u want..? and say how it interrpertes the information in the textfile like.. boy101:bc canada:24829348 So thats his name, location and special id number for a game. Wouldn't I be able to call up that imformation later? Your the pro, I dunno anything! I really dont know much to tell you the truth.. Sorry! Quote X-Corp Take a hit
jorge Posted August 5, 2003 Posted August 5, 2003 is it a lot of date? if yes, registry is out of the question, Then maby xml, personaly i find it had, So mabey access is what you need. btw:I'm only 15, and still lot to learn so i could be wrong :s Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 5, 2003 *Experts* Posted August 5, 2003 You dont really need a database for that. To write to a file you need to use the IO.StreamWriter class. Declare a new instance of it and pass in the path at which the file will be saved: Dim writer As New IO.StreamWriter("path to the file") The you have to write the info to the file: writer.Write(username & ":" & location & ":" & userid) writer.Flush() 'make sure everything was written writer.Close() 'close the stream substitute the names of the variables with the ones you actually use. :) Quote
jorge Posted August 5, 2003 Posted August 5, 2003 Dump question what happen wehn you don't flush? Never done it and it works, alslong as i close it. Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 5, 2003 *Experts* Posted August 5, 2003 Flush causes the buffers of the stream to clear and writes them to the file, this ensures everything you wanted to write to the file is actually written. Close does that and also begins the the disposing for the stream. Quote
Hughng Posted August 5, 2003 Posted August 5, 2003 You might have stuff floating around :-). Flush() just make sure that all buffered data completely out of buffer which kinda make sure you get all the thing that you intended to write to your stream. Quote
jorge Posted August 5, 2003 Posted August 5, 2003 hmmz, maby i should add the flush :s thanw for the info Quote Jorge - http://www.blackdot.be/?page=apache.htm
xcorp Posted August 5, 2003 Author Posted August 5, 2003 Thanks alot guys. I think I"m slowly undestanding what mutant said about OI. things. I'm gonna try it. Thanks and I'll post another message in this thread if I have any problems. Quote X-Corp Take a hit
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.