Source language: Translate to:

F.A.Q.

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

F.A.Q.

Postby smartmedia » Tue Jun 12, 2007 12:48 pm

Hi...

This is a topic for F.A.Q.

I have the following question...

What Stored Procedures section do...???

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

Re: F.A.Q.

Postby dpayer » Tue Jun 12, 2007 3:58 pm

smartmedia wrote:Hi...

This is a topic for F.A.Q.

I have the following question...

What Stored Procedures section do...???

Thanks


Here is a wikipedia explanation:

http://en.wikipedia.org/wiki/Stored_procedure

Essentially, you can cause the database to run actions based on changes in data.

Not all versions of SQL servers support it. Only the latest Mysql does.

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

Show 2 grids of the same table

Postby smartmedia » Sun Jun 17, 2007 5:32 am

Hi...

If i remember correctly, be able to have to grids in the same page working it was on future list... I try to show 2 grids from the same table but is not working...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Mon Jun 18, 2007 10:45 am

...I try to show 2 grids from the same table but is not working...


I'll look into it, but I'm not sure it will be possible.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

INNER JOIN

Postby smartmedia » Wed Jun 20, 2007 1:13 pm

Hi...

In MySQL there is a command INNER JOIN, that command joins two or more columns together. How this can be happen here...???

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

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

In MySQL there is a command INNER JOIN, that command joins two or more columns together. How this can be happen here...???


You should be able to use the dbpExecSQL action for most types of SQL commands.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Fri Jun 22, 2007 8:34 am

Hi...

Neosoft Support wrote:
In MySQL there is a command INNER JOIN, that command joins two or more columns together. How this can be happen here...???


You should be able to use the dbpExecSQL action for most types of SQL commands.


This affects the grid...? As result i will take a table-->grid which has both columns...???

I have 2 new questions...

1) How i will know when i run a dbpExecSQL that has been accepted from server...??? Or i must look in dbpError....???

2) What is the purpose of [ID.Table.$State], how it change, and what are the differents between browse and edit in the all picture...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Fri Jun 22, 2007 11:24 am

This affects the grid...? As result i will take a table-->grid which has both columns...???


That's an interesting question. Working with SQL can be very difficult, especially for inexperienced users. DBPro mostly insulates users from the complexities of SQL, while still providing access to most features. However, being insulated from SQL brings up some questions.

Some of the more complicated SQL commands can return results that are combinations of different tables or totally unrelated to tables at all. DBPro is table oriented so it tries to map these results to the most appropriate table, but I'm not sure that will always work in the most extreme cases. It's likely that most users will never run into this problem, but if those with expertise in SQL have any suggestions that would be great.

1) How i will know when i run a dbpExecSQL that has been accepted from server...??? Or i must look in dbpError....???


If the server doesn't like your SQL it will generate an error which DBPro will stuff into the [dbpError] variable. The errors are generated by the database server, so sometimes they are very helpful and other times they can be cryptic.

2) What is the purpose of [ID.Table.$State], how it change, and what are the differents between browse and edit in the all picture...


I'm not sure if this will really be of any use. In theory, you can check the value of this variable to see if the table is in edit or browse mode.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby dpayer » Fri Jun 22, 2007 11:54 am

Neosoft Support wrote:
This affects the grid...? As result i will take a table-->grid which has both columns...???


That's an interesting question. Working with SQL can be very difficult, especially for inexperienced users. DBPro mostly insulates users from the complexities of SQL, while still providing access to most features. However, being insulated from SQL brings up some questions.

Some of the more complicated SQL commands can return results that are combinations of different tables or totally unrelated to tables at all.



I will have to experiment to see how dbpro handles this but you can make select statements and use the adverb "as" and give it a new table name.

SELECT COL1,COL2 AS NEWTABLE WHERE COL3 = SOMEVALUE

I believe thistable "newtable" is a temporary structure so I don't know if dbpro will see it. You may need to retrieve a list of tables AFTER doing a select using AS or join using AS to see if dbpro can sense it.

If so, it would likely be handled as any normal table but it would not be a permanent structure in the database.

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

SELECT COUNT

Postby smartmedia » Fri Jul 06, 2007 5:20 am

Hi...

I like to use the sql command SELECT COUNT to count the records but where i will get the return...??? dbpError return's empty... And please don't tell me to use that command dbp has.

Also i like to run other commands that return result's, there is any return variable, if not how this can happend...???

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

Postby Neosoft Support » Fri Jul 06, 2007 10:50 am

I like to use the sql command SELECT COUNT to count the records but where i will get the return...???


There are several methods you can use to accomplish the same thing.

1. After performing a normal query, you can examine the table's [DB.Table.$RecCount] variable to determine how many records were found. This yields the same results as SELECT COUNT.

2. Alternatively, the results of SQL SELECT commands will be displayed in the table's grid. For example, when the following SQL command is executed on the example Address Book database*:

SELECT COUNT(*) FROM Contacts

the grid will display the following information:

Code: Select all
+---------------+
| Expr1000      |
+---------------+
| 111           |
+---------------+


The debugger will also show a variable named [AddrBook.Contacts.Expr1000] set to "111". (The name of this variable is chosen by MS Access not NeoBook.)

dbpShowAll will restore the grid's normal view of the database.

*You may receive an error message with DBPro beta 1 depending on the structure of your database. If you do try again with beta 2 when it's released later today (7/6/07) or tomorrow (7/7/07).
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Fri Jul 06, 2007 12:42 pm

Hi...

The database i use is MySQL 4.1 standard edition.
The database has 4 tables.

1) correct me if i am wrong but when you send a query or dbpshowAll command normally all data come to you (in memory) and in grid if you have. If that is true if i have 10.000 records all of them will come in my pc from internet...???

The command i run:
dbpExecSQL "Rapid" "SELECT id FROM Data WHERE (Username = '[Rapid.Users.Username]' AND DateInserted = CURRENT_DATE);||"
insted of right result i get error that tells me: Field www not found. that filed exist in my database.
After that [DB.Table.$State] change to inactive

Except normal commands SELECT - UPDATE - INSERT etc. are commands that are returning useful information, what is going to happen in that mater...???
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Fri Jul 06, 2007 6:32 pm

1) correct me if i am wrong but when you send a query or dbpshowAll command normally all data come to you (in memory) and in grid if you have. If that is true if i have 10.000 records all of them will come in my pc from internet...???


I don't think that's correct. The command should not return 10,000 records, but only a small subset of records - the current record and enough to fill the visible portion of the grid (if you're using one).

The command i run:
dbpExecSQL "Rapid" "SELECT id FROM Data WHERE (Username = '[Rapid.Users.Username]' AND DateInserted = CURRENT_DATE);||"
insted of right result i get error that tells me: Field www not found. that filed exist in my database.


Yes, I think that's a bug in beta 1. Try beta 2 which is now availble.

Except normal commands SELECT - UPDATE - INSERT etc. are commands that are returning useful information, what is going to happen in that mater...???


You should be able to get most information using beta 2. There may be some SQL commands that return datasets that are not accessible with DBPro. If it's important, the question becomes how can we get that information into NeoBook and have it make sense? I'm open to suggestions.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest