Source language: Translate to:

Suggestions

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Suggestions

Postby smartmedia » Wed Jun 20, 2007 12:26 pm

Hi...

I want to be able to set an attribute in Grid (on or off)
dbpSetGridProperties "Rap" "Data" "Color=Window;Font=Arial,9,Normal,ANSI_CHARSET;FontColor=WindowText.........DoubleClick=Yes"
So when Read only=Yes and i double click on a record, be able to run the commands i put.

This is very important for me...

Thanks
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Thu Jun 21, 2007 10:26 am

That's an interesting idea.

So the double click option would only work when ReadOnly=True or does the state of ReadOnly make any difference?

Also, where should the commands to be executed be stored? Maybe in a subroutine like:

:Rectangle1_OnDoubleClick
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Wrangler » Thu Jun 21, 2007 11:33 am

I agree. Being able to do something with the records displayed in the grid would be a powerful feature. Maybe take it so far as to add right click, with options configurable through a menu action, such as delete record, add record, edit record. The events could be executed the same way the menu system now works, with actions for each menu item.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby smartmedia » Thu Jun 21, 2007 12:32 pm

Hi...

Neosoft Support wrote:That's an interesting idea.

So the double click option would only work when ReadOnly=True or does the state of ReadOnly make any difference?

Also, where should the commands to be executed be stored? Maybe in a subroutine like:

:Rectangle1_OnDoubleClick


I think is better to have the ability to choose to use it in Read only or Edit mode.
One other thing is, when the mode is read only and select the record, it's better the highlight to be in the all record not only in the field...
Be able to choose the name of subroutine it's better i think...

Thanks
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Gaev » Thu Jun 21, 2007 1:15 pm

So the double click option would only work when ReadOnly=True or does the state of ReadOnly make any difference?

a) The more powerful (versatile) you make the features of the grid, the more appealing the plug-in will be to developers ... even those that do not necessarily need the database functionality.

b) To make it as versatile as possible, perhaps the grid properties can provide for developer specification of call backs for all mouse events ... at least click, right-click and double-click for the first version.

c) Haven't given it much thought yet, but might also allow for specifying keyboard shortcuts ... i.e. when focus is within grid, shortcut keys trigger developer specified routines.

Also, where should the commands to be executed be stored? Maybe in a subroutine like:
:Rectangle1_OnDoubleClick

As for associating a routine with an event, my first choice would be for the developer to actually enter the name of the routine within the properties command e.g. ...

Property:Value
onClick:smartRoutine1
onDoubleClick:daveDouble
onRightClick:wranglerStuff

... and perhaps one can specify non-routine related functions like #EditField, #AddRecord, #DeleteRecord etc. ... as well as a do-nothing function #Nothing (the default).

If this is not to be, I would suggest ...

:database_table_OnClick
:database_table_OnDoubleClick
:database_table_OnRightClick

... as developers may design applications where the same Rectangle object is deployed ... at different times (or depending on user selection) ... to map different database tables ... this way, the developer can keep the design simple by developing separate routines for each database table ... notice that it fits in with the other properties of the grid ...

dbpSetGridProperties "database" "table" "properties"
dbpShowGrid "database" "table" "rectangle"

... i.e. properties are associated with a grid that is defined for a table within a database ... the grid can then be mapped to ANY desired rectangle.



On another note, I like the inclusion of ...

dbpGetActiveField "database" "table" "variable"

... in this plug-in ... something I missed in the non-pro version.



Also, something you might consider (perhaps for v1.0+) ... a command to enable the developer to control Edit/NoEdit at the field/column level in the grid ... so, e.g. he could specify a routine for the onDoubleClick property ... and in that routine, determine the current field (dbpGetActiveField) ... and if this field is allowed to be editable, invoke a grid related command like ...

dbpEditActiveField "database" "table" "field"

... whereby NeoBookDBPro would facilitate in cell editing of the named field in the current record ... note that being able to specify the field provides developer with the versatility of specifying any field in the current record ... not just the one the user double clicked on.
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Database status

Postby smartmedia » Wed Jun 27, 2007 2:20 pm

Hi...

As i saw there is a read only var [ID.$Status] which takes values "Connected" or not "Connected when you open a database ...

It's possible to have a command that check the status of the database after is opened...??? Example:

dbpStatus "[ID of database]" "Return variable"

Why...???
Because it's better to check the right moment before you send a query to database if is connected or not, and not after with dbpError...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Wed Jun 27, 2007 2:48 pm

It's possible to have a command that check the status of the database after is opened...???


What about this:

Code: Select all
If "[ID.$Status]" "=" "Connected"
  .database is open
Else
  .database is not open
EndIf
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Wed Jun 27, 2007 10:03 pm

Hi...

If "[ID.$Status]" "=" "Connected"
.database is open
Else
.database is not open
EndIf

I know it, thanks

Maybe i wasn't clear enough...
To help you understand i give an example...

1) I open a database, the [ID.$Status] is "Connected"
2) If for any reason after Database is open, (database loose connectivity) [ID.$Status] is still "Connected"
3) Now if you have an available command to check connectivity like dbpStatus "[ID of database]" "Return variable"
thinks are more accurate...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Gaev » Thu Jun 28, 2007 5:24 am

1) I open a database, the [ID.$Status] is "Connected"
2) If for any reason after Database is open, (database loose connectivity) [ID.$Status] is still "Connected"
3) Now if you have an available command to check connectivity like dbpStatus "[ID of database]" "Return variable"
thinks are more accurate...
a) If it is true that "[ID.$Status] does not change to 'Not Connected' whenever the database loses connectivity, perhaps the first suggestion would be to have NeoBookDBPro try and ensure this.

b) If NeoBookDBPro can not do this, perhaps the additional command might be ...
Code: Select all
dbpRefreshStatus "[ID of database]"

... and have this command refresh the value of variable [ID.$Status].

c) Also, if NeoBookDBPro is capable of knowing whenever a database loses connectivity (i.e. getting a message from the ODBC connection code), one might also consider a facility for developers to specify a routine to be invoked upon recognizing this condition ... that way, developers would not need to bloat their script code to check for this condition before EVERY database command ... this can be specified either via a separate command ...
Code: Select all
dbpErrorRoutine "database" "subroutine"
... or just add a parameter to the commands that open the database ...
Code: Select all
dbpOpenDatabase "database" "filename or connection string" "subroutine"
dbpOpenAccessDatabase "database id" "file name" "password" "subroutine"
... enabling developers to have a single comprehensive strategy for handling error conditions.
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby smartmedia » Thu Jun 28, 2007 6:20 am

Hi...

From the first day DBP beta came up, i play only with it...:oops:
It's really a very good plugin but i have notice some serious issues about data integrity and connectivity so far... After all everything is about data.
5 times so far error's about connectivity and data integrity came up without any obvious reason... I like to think that i am responsible for that mistakes.
I keep testing...

And Gaen, you right, we need at least to know if a error came up with code or something so we can handle it...

Sorry again for my bad english...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Thu Jun 28, 2007 10:10 am

c) Also, if NeoBookDBPro is capable of knowing whenever a database loses connectivity (i.e. getting a message from the ODBC connection code)...


There is an event that's supposed to be generated when the database connection is closed which DBPro already handles. However, if the connection suddenly quits due to a problem with the server or the connection, this event is not triggered. When that happens, I think the only way to check if the connection is functioning is by attempting to send the server some type of command and seeing if it responds.

5 times so far error's about connectivity and data integrity came up without any obvious reason... I like to think that i am responsible for that mistakes.


What type of database are you using and how are you connecting to it?

DBPro doesn't deal with the details of how a connection is established or maintained. That's the job of the database driver. Typically, if you're having problems with the server connection it might be caused by driver, hardware or database configuration issues.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Automatic Row

Postby smartmedia » Sun Sep 09, 2007 2:08 am

Hi...

I have 3 suggestions to make...

1) I want to be able to set a counter for the records in dbpSetGridProperties.
Example, let's say we have a table with 10 records, when the counter is on then you get the results like this:

1) Product 1
2) Product 2
3) Product 3
4) Product 4
5) Product 5
6) Product 6
7) Product 7
8) Product 8
9) Product 9
10) Product 10
the counter will be the 10)
Now if is possible to change the counter view like this:

1)
1.
(I)
(i)
1...

I hope i give you to understand what i am saying...

2) second suggestion is to be able to adjust the size of preview in dbpSetGridProperties command.

3) Where is the backround color of the grid...??? I am trying to change the backround with dbpSetGridProperties but there in no where any option.

Thanks...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Wrangler » Sun Sep 09, 2007 9:52 am

1) I want to be able to set a counter for the records in dbpSetGridProperties.
Example, let's say we have a table with 10 records, when the counter is on then you get the results like this:


You can use the Primary Key or index to number the records. Of course, you won't have any choice of the number format.

3) Where is the backround color of the grid...??? I am trying to change the backround with dbpSetGridProperties but there in no where any option.


It's the first parameter, called Color.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby dpayer » Sun Sep 09, 2007 5:47 pm

smartmedia wrote:Hi...

From the first day DBP beta came up, i play only with it...:oops:
It's really a very good plugin but i have notice some serious issues about data integrity and connectivity so far... After all everything is about data.
5 times so far error's about connectivity and data integrity came up without any obvious reason... I like to think that i am responsible for that mistakes.
I keep testing...

And Gaen, you right, we need at least to know if a error came up with code or something so we can handle it...

Sorry again for my bad english...


Are all your connections done on a database located on a lan or are they all over the internet? How far (how many hops) are you from the database? You may want to test the latency in the connection as it may influence timeouts on the MySQL.

When we use MySQL web sites (via asp / php) the execution is done on the site so there is no issue on time/lag (unless a query takes too long by the way it was designed).

Is it your hope to run a Client Server relationship as if it were on a local lan?

D
User avatar
dpayer
 
Posts: 1383
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neosoft Support » Mon Sep 10, 2007 11:25 am

1) I want to be able to set a counter for the records in dbpSetGridProperties. Example, let's say we have a table with 10 records, when the counter is on then you get the results like...


I don't think that's something that DBPro can do for you, but you might be able to write some SQL code to create a formula field as part of a query. I've never attempted something like that so I don't have any examples to share with you.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Next

Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest