codemorphis.com Forum Index codemorphis.com
Software development: pure and simple.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Database

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum
View previous topic :: View next topic  
Author Message
gavin



Joined: 08 Sep 2004
Posts: 28

PostPosted: Thu Sep 16, 2004 11:37 am    Post subject: Database Reply with quote

Hi,

My program is coming along slowly but well. I am at the stage where I need to have some sort of database for my math program. I have looked at the sample database but somehow I do not think that, that is the answer. My program has only to remember the student name, surname and grade. When the program starts, the student enters a student number that leads them to the main page. There he can set up his name etc. When the student logs in again under student number 1, the program needs to recall his datails as entered originally. I would also need to recall his name at certain points in the program.

A while ago I enquired about setting the text box status ready. Would it be possible for you to do this for me now as I have purchased synopsis?

It would also be great if instead of the Ibeam one could have the option of a hand etc.

Thank's
Gavin
Back to top
View user's profile Send private message Send e-mail
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Fri Sep 17, 2004 3:25 am    Post subject: Reply with quote

OK, happy to give assistance wherever possible.

Looks like your database table fields are:

1) Student ID (a number like 45361)
2) Last name (a string)
3) First name (a string)
4) Grade (assumption: a real number between 0 and 100 such as 74.6)

Databases in Synopsis make use of the standard SQL syntax (Structured Query Language). This is of course an advanced topic - SQL provides a large set of powerful commands for database control.

Download and test run this Synopsis program that shows some example commands of SQL in the context of your database table fields:

http://www.codemorphis.com/articles/ans_091704/Class.vpd

To run this program you will need the following example Microsoft Access database structure file:

http://www.codemorphis.com/articles/ans_091704/Class.mdb

In Synopsis you will need to set the Program Start Directory path to point to wherever you chose to save the Class.mdb file. To do this, click on "Program" in the Synopsis toolbar and select "Program Settings...". Then click the Browse button for the "Start Directory" argument and navigate to the directory where you saved the Class.mdb file. If you save the VPD file then you will not have to set this parameter again to run the program.

Here's a snapshot of the program:



The sample database program does the following:

Access DB 1: Connects to the Class.mdb database. The database has a table called "Students" with the database table fields as described above.
Serv Call 1: Shows how to delete all records in the database.
Serv Call 2: Adds a record to the Students table.
Serv Call 3: Adds a second record to the Students table.
Serv Call 4: Shows how to list all of the records in the Students table.
Serv Call 5: Shows how to search for a student record given the student's ID. The searched student ID is the ID that we added in the "Serv Call 2" component.

These kinds of database commands are made in the "SuperStore database.vpd" and "SuperStore datagrid.vpd" sample programs in the "Sample Programs" directory of the Synopsis installation.

Here is a helpful site that explains SQL commands and gives helpful tutorials for the SQL syntax:

http://www.w3schools.com/sql/default.asp


Of course whenever possible we try to add feature addition requests for users. Please bear in mind that this must be balanced with other ongoing development efforts. So we will try to get that set focus service in for you.

For setting the cursor to a hand icon or other icons, this is already available through the "Cursor Interface" component from the Windows tab of the Component Tray. Please see the example program "Cursor.vpd" found in the "Sample Programs" directory of your Synopsis installation. A short treatment on this is also covered in the previous forum programming tip entry:

http://www.codemorphis.com/forums/viewtopic.php?t=26
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gavin



Joined: 08 Sep 2004
Posts: 28

PostPosted: Fri Sep 17, 2004 6:31 am    Post subject: Reply with quote

Thank you for the detailed example.

I would need to set the cursor inside the textbox from a flashing Ibeam to a hand and not the mouse cursor.

Gavin
Back to top
View user's profile Send private message Send e-mail
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Sat Sep 18, 2004 4:16 pm    Post subject: Reply with quote

You are welcome for the example.

If you look in the Property Dialog for the TextBox UI component (accessible by double clicking the TextBox while in Edit Mode) you will see a property called "Cursor". There you can change the TextBox cursor shape. The Hand shape is not a standard icon for the TextBox so we will add this to your other request.

It is a little bit unusual to want to have the Hand cursor for the TextBox. Out of curiosity, what is the reason?

Hope that this helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gavin



Joined: 08 Sep 2004
Posts: 28

PostPosted: Sun Sep 19, 2004 2:39 am    Post subject: Reply with quote

Well, my math program is for children from grade R-4 and the text box is where they would complete the answer to the question. The text box has no border and the background color is the same as the panel. The hand is more visible and more appropriate.

I have tried to change the properties of the textbox however, it only changes the mouse over and not the actual textbox.

Regards

Gavin
Back to top
View user's profile Send private message Send e-mail
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Sun Sep 19, 2004 8:21 pm    Post subject: Reply with quote

Good luck with your programming project. We'll do our best to assist you.

The Microsoft Windows programming layer does not allow you to change the text entry cursor (IBeam shape) in text entry UI components. This is likely because other types of shapes obstruct the text. For whatever the reason, because it is not available through traditional programming interfaces it is not possible to offer it through the Synopsis interface, i.e. we can't give you what doesn't exist.

For your other requests, please check the download center - there are new updates for Synopsis 1.1:

http://www.codemorphis.com/index.php?cPath=21
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gavin



Joined: 08 Sep 2004
Posts: 28

PostPosted: Mon Sep 20, 2004 1:35 am    Post subject: Reply with quote

You Guy's are unbelievable!

I think that a couple of large company's can learn about service from you. It's a pitty about the Ibeam set in Windows, however, with the new updates it is not so important. The set focus really makes a huge difference in my program.

Thank you all.

Regards

Gavin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group