Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Database type thing

Author
Message
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 2nd May 2005 01:20
How do I make a database type thing in DBC.
How do you save names and passwords so that when they open the program back up it will recognize their name and password?
Thanks

Cheers,
Capt. America
CaseyK
21
Years of Service
User Offline
Joined: 27th Jun 2003
Location:
Posted: 2nd May 2005 07:46
One way I can think of off of the top of my head is to use the Write file command and the read file command's. Check the help files they are good for these types of things. if you are still clueless Iw ill devise a little code for you but please my time is limitted, and you'll learn more doing it yourself.

And the sun sets on our oblivion.
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 2nd May 2005 08:45
I've been looking for it all day and I found the write and read files, but im not sure how to use them properly, i'll make a little code and maybe you could tell me if it'll work or how to improve it?
Thanks

Cheers,
Capt. America
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 2nd May 2005 09:43 Edited at: 2nd May 2005 09:59
Sorry I tried as hard as I could, but I couldn't even remotely get it to do what I wanted it to do?
Sorry, I don't want to use up all your time, but could you do a little tut or just some code for me?

This is what im trying to do:

First I want to have it where it asks if they want to open a domain or make one, if they say they want to make one, i want it to ask for a name and password, and then save these in like a txt file or something, if they say they want to open one it asks them for an input of name an password and then it checks if the input matches whats in a previously made txt file, then it clears the screen and then says :
Welcome (Persons name)!
Then it asks if they want to close this one or exit, if they choose to exit then it exits ofcourse, but if they choose to close this one then it closes it and starts all over.

Sorry if that's too much for you and if you don't want to do it then I understand, but if you just want to do something else that will teach me how to do someting close to this and is alot shorter then that's ok too.
Thanks again!

Cheers,
Capt. America
CaseyK
21
Years of Service
User Offline
Joined: 27th Jun 2003
Location:
Posted: 2nd May 2005 11:31
Hehe, no worries it isn't too much. But your going to have to wait a day or so because I have to go to sleep rgith nwo I'm tired. I've been out all night. So tommarrow I should have the code for you.

And the sun sets on our oblivion.
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 5th May 2005 13:26
no prob take all the time you want, I'm in a way 'at your mercy'!
Thanks again!

Cheers,
Capt. America
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th May 2005 04:47
This might help you get started.

http://www.thegamecreators.com/?m=codebase_view&i=b6c4a300eac7a575df83839971337184

PETA - People for the Eating of Tasty Animals
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 8th May 2005 11:16
sorry for butting in on your thread, Captain American, but i would also like to know how to do this. that tutorial assumed that you have dbpro. i dont. is there any way to do that with classic?? sorry again for butting in!
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th May 2005 04:47
the file commands are all basically the same. just use some variables instead of types.

PETA - People for the Eating of Tasty Animals
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 12th May 2005 09:05 Edited at: 12th May 2005 09:06
Thanks that helped me understand some of what I want to do, but not all of it. CaseyK if you're still gonna write the code for what I want to do I would greatly appreciate it. I still don't understand how to read the text on a text file?
Thanks again!

Cheers,
Capt. America
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 13th May 2005 13:48
Hey CaseyK are you still gonna help me or should I go enlist help elsewhere. Maybe you're just writing the code still. Anyways are you still gonna help me?

Cheers,
Capt. America
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 15th May 2005 08:59
Hello sorry to keep bugging you, but u still there?

Cheers,
Capt. America
thinkdigital
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 15th May 2005 10:27 Edited at: 15th May 2005 10:33
Well, here's some simple file writing code, in case it's wanted:



And a similar process for reading it:





[b]eGeneric Works : Dark Basic Developer Website
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 16th May 2005 09:34
Hey! Thanks a ton im gonna try it out right now.
Thanks again!!!
Atleast someone knows im here!!!
Oh ya thanks again!!!
THANKS your work is greatly appreciated!!!

Cheers,
Capt. America
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 17th May 2005 08:58
I think I've got it down now. I just gotta try different things and wat i wanted to do in the first place will be working!

Cheers,
Capt. America

Login to post a reply

Server time is: 2025-05-23 00:09:29
Your offset time is: 2025-05-23 00:09:29