We will start our application that will connect a smart device program to a database.
The program when it will start will search in the application directory if the database exists if not will create the database.
The connection will be accomplished with code....
During the development of the program I will take screen shots.
What the program will do:
The program will accept new customers and display them in a list the user will be able to select the customer and update all information about the customer.
It's simple.
Now what we need to create our database
Step one: Design the database
Step two: Create the SQL statement to create the database!
CREATE TABLE customers ( id INT IDENTITY PRIMARY KEY, name nvarchar(50), surname nvarchar(50) , address nvarchar(50), telephone INT)
Now that we have the sql statement to create the database if it does not already exist lest start a new project in Visual Studio Visual Basic .Net
File -> New -> Project ->Visual Basic ->smart Device ->Type the name of the project I set the name as customers and press ok - > select Device Application and from the list Target platform select pocket pc or if you have the Windows Mobile 5.0 Pocket pc SDK select it.
Now press ok
Soon the visual studio will open for you the template and there change the title of the form to anything that you like and create a menu that will terminate the program.
By using the command me.close()
This is how the project will look like
As you can see I created a menu that is File -> exit
You can skip this but with my experience on ppc I find out that if the user do not set the applications to close when x button is pressed they stay open in the memory so it's a good practice
On the next tutorial we will create some functions that will be useful and we will start our GUI
The program when it will start will search in the application directory if the database exists if not will create the database.
The connection will be accomplished with code....
During the development of the program I will take screen shots.
What the program will do:
The program will accept new customers and display them in a list the user will be able to select the customer and update all information about the customer.
It's simple.
Now what we need to create our database
Step one: Design the database
Id
|
Name
|
Surname
|
Address
|
Telephone
| |
Type
|
Number Primary key
|
String
|
String
|
String
|
Number
|
Sql compact type
|
Int primary key
|
Nvarchar
|
Nvarchar
|
Nvarchar
|
int
|
Step two: Create the SQL statement to create the database!
CREATE TABLE customers ( id INT IDENTITY PRIMARY KEY, name nvarchar(50), surname nvarchar(50) , address nvarchar(50), telephone INT)
Now that we have the sql statement to create the database if it does not already exist lest start a new project in Visual Studio Visual Basic .Net
File -> New -> Project ->Visual Basic ->smart Device ->Type the name of the project I set the name as customers and press ok - > select Device Application and from the list Target platform select pocket pc or if you have the Windows Mobile 5.0 Pocket pc SDK select it.
Now press ok
Soon the visual studio will open for you the template and there change the title of the form to anything that you like and create a menu that will terminate the program.
By using the command me.close()
This is how the project will look like
As you can see I created a menu that is File -> exit
You can skip this but with my experience on ppc I find out that if the user do not set the applications to close when x button is pressed they stay open in the memory so it's a good practice
On the next tutorial we will create some functions that will be useful and we will start our GUI
No comments:
Post a Comment