The 2nd chapter: Install a database
The first, build a simple Access database
This one content that we found study about the database, the friend that has used Access to found a database is OK skip over does not look.
Open Microsoft Access, choice file - > build a database, choose a position to save your database file next, the Db1.mdb that we acquiesce by it here names save.
Saving what we see after the database is the interface below, doubleclick use design implement found a watch, begin to found table of a data. The application here you need to be done step by step according to measure only, although the database never has been contacted to also do not have a problem before you, if you want to make the application of deep administrative levels, involve the sentence of relation structure, that still had better look for a book of the database to look.
Next we design an user to register used u ser news list. Doubleclick use design implement found a watch, open design interface. In field name the user message that you write to consider a record in one column (best field name does not name with Chinese, such later process designing when won't have too much trouble, also should notice the key word that did not use him database at the same time---For instance Temp, such word and database program can have conflict, use watch name as far as possible + next slip + the means of the name will name, for instance Tbl_userinfo_name, we are used first here name processing simply) . We founded 6 fields in all, the Id that saves an user to register for Username(respectively) , Userpass (the user registers used code) , Usermail (the email address of the user) , Reg_date (the user registers time) , Homepage (the individual homepage address of the user) , Phone (the connection phone of the user) . Data type form uses its acquiescent text type, field size is 50, first we come to the face undertake handling to individual field again.
Will tell commonly, telephone number of address of user name, password, email, connection won't exceed 50 character (of course, if somebody is baleful,the word that has inputted long string can sign up for a fault, so our retrospective webpage is made in should do a few restriction) , and individual homepage address, exceed possibly---Be like Http://www.netease.com/~cosix/html/ . . . . . . , so we adjust its field volume for 200.
The date of time kind instead that registers date / time, *_ ' of course. Next the function function that we can transfer him Access adds an acquiescent cost for him, =Now() , when this expresses to be added when data, database system is the value of Reg_date field automatically with the intercrop when the server is current, such we are OK leave out makes an input register the one pace of date in the webpage.
Revise after ending, those who click tool column to go up those who save chart to save us is new the watch that found, this is to be able to jump out dialog box of a warning, tell you the watch had be notted define advocate key. Not advocate if bolting, cannot decide this records the only place in the watch, can make a mistake when delete or compiling a record so, so we should found advocate key. Advocate the value of key is won't reduplicative. Clicking is, found advocate key.
If pursue, founded to be called ID advocate key (on the side those who have a key icon) , data type is automatic number.
In click save, the name of the watch that your input saves this secondary, we name with Userinfo.
A watch has been founded! Be very simple?
How to because we had been not acquired,make the content that adds a record, so here our while you're at it is moved add a few content to go in, the test that facilitates we undertake after a while. If pursue.
Good, a complete database is built, what to do next, hum, and listen to next answering to decompose.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment