Source language: Translate to:

Database Problems

General questions about NeoBook

Moderator: Neosoft Support

Database Problems

Postby Dixan » Fri Jun 10, 2016 10:31 pm

Hi Guys, I´m trying to do a medical database but when I serch I don´t get any results It give me an alert "No matching record found"
Is there a limit of textEntry for a database? The mine should have 60 TextEntry. All informaton about patient. Is there any tutorial to help me to work with database?
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: Database Problems

Postby Gaev » Sat Jun 11, 2016 6:45 am

Dixan:

Is there a limit of textEntry for a database? The mine should have 60 TextEntry. All informaton about patient.

It is unclear what you are asking here ... why don't you post your "query command" ... and details (type, size etc.) of the database fields referenced in the command.
Is there any tutorial to help me to work with database?

If you are using dbpQuery, have you looked at the Help file.

Or you could use dbpExecSQL ... and search the internet (www) for help with SQL commands.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Database Problems

Postby Dixan » Sat Jun 11, 2016 1:45 pm

Look Gaev, I have a serious problem with internet, in fact I haven´t internet, hahaha, I don´t know how I have acces to this web pages, I can´t entry to facebook or a lot of other web pages, I´m trying to get some advantage in this inadvertency of someone, and my conection is by modem, very slow, so I can´t acces to help pages and In my computer help file says I have to update my PC to get help file and of course I can´t do it. Just take advantage of this blessed missing of someone. I´ll try to upload a picture of my program, I need so much time to entry to http://zagruzitfoto.com/, sometimes I can´t.

Here is the querydialog
(My database file name is "DBCC.dbf")

SetVar "[Filter]" ""

If "[DBCCNombre]" ">" ""
SetVar "[Filter]" "Nombre = [#34][DBCCNombre][#34]"
EndIf

If "[DBCCApellidos]" ">" ""
If "[Filter]" ">" ""
SetVar "[Filter]" "[Filter] AND "
EndIf
SetVar "[Filter]" "[Filter]Apellidos = [#34][DBCCApellidos][#34]"
EndIf

If "[DBCCEdad]" ">" ""
If "[Filter]" ">" ""
SetVar "[Filter]" "[Filter] AND "
EndIf
SetVar "[Filter]" "[Filter]Edad = [#34][DBCCEdad][#34]"
EndIf

If "[DBCCSexo]" ">" ""
If "[Filter]" ">" ""
SetVar "[Filter]" "[Filter] AND "
EndIf
SetVar "[Filter]" "[Filter]Sexo = [#34][DBCCSexo][#34]"
EndIf

If "[DBCCRaza]" ">" ""
If "[Filter]" ">" ""
SetVar "[Filter]" "[Filter] AND "
EndIf
SetVar "[Filter]" "[Filter]Raza = [#34][DBCCRaza][#34]"
EndIf

("""Here there are more like this until 60***)


If "[Filter]" ">" ""
dbfQuery "DBCC.dbf" "[Filter]"
Else
dbfShowAll "DBCC.dbf"
EndIf

CloseCustomWindow "Buscar"



Here are the subs:

:DataBaseUpdate
SetVar "[OldError]" "[dbfError]"
dbfGetSeqRecordNumber "[PubDir]DBCC.dbf" "[CurRec]"
dbfQueryCount "[PubDir]DBCC.dbf" "[RecCount]"
TrackBarSetMax "BarraNumerica1" "[RecCount]"
SetVar "[DbfError]" "[OldError]"
Return

:DatabaseOpen
If "[DBStatus]" "<>" "Open"


dbfCreate "[PubDir]DBCC.dbf" "NOMBRE,String,25|APELLIDOS,String,60|EDAD,String,3|SEXO,String,3|RAZA,String,3|(here there are others)ECVH,String,10" "DataBaseUpdate"
dbfSetColumnTitles "[PubDir]DBCC.dbf" "NOMBRE|APELLIDOS|EDAD|SEXO|RAZA|(here there are others)ECVH"
dbfSetColumnWidths "[PubDir]DBCC.dbf" "100|100|20|20|20|(here there are others)100"
dbfSetTitleStyle "[PubDir]DBCC.dbf" "219,219,219" "Arial" "9" "Normal" "Black"
dbfSetCellStyle "[PubDir]DBCC.dbf" "236,233,216" "Arial" "9" "Normal" "WindowText"
dbfShowTable "[PubDir]DBCC.dbf" "Rectangulo1" "NavigationBar"
SetVar "[DBStatus]" "Open"
EndIf
Return
Last edited by Dixan on Sat Jun 11, 2016 2:16 pm, edited 1 time in total.
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: Database Problems

Postby Dixan » Sat Jun 11, 2016 1:57 pm

Image
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: Database Problems

Postby Gaev » Sat Jun 11, 2016 3:19 pm

Dixan:

1) From the code you posted, it looks like you are using the (free) NeoBookDB plugin (which uses the very old (circa 1984) DBase IV database to store the data) ... I had assumed that you were using the NeoBookDBPro plugin (which can connect with a number of modern SQL based Databases) ... so ignore my previous comments about using dbpExecSQL.

2) Compared to modern databases, DBase has severe limitations ... number of fields, size of each field, size of records and more ... I do not know if there are limitations about the "size of the filter string" that DBase can handle ... so just before the ...

dbfQuery "DBCC.dbf" "[Filter]"

... command, insert ...

StrLen "[Filter]" "[FilterSize]"
AlertBox "Filter" "[FilterSize][#13][#10][Filter]"

... and copy/paste the result over here.

3) since you did not post all of the code, I can not tell ...

- how many fields you defined in your dbfCreate command
- what the total record size was

... so I can not tell if the dbCreate even worked or not ... can you verify that you have one/more records in the database with all the defined fields ?

Also, I can not tell if all the fields are of the "String" type or not (Filter definitions are different for different field types).

If the records are inserted as expected, I suggest you try and determine the root of the dbfQuery problem in baby steps ... try and do a filter with just 2 (string) fields ... then add fields of different types ... until you reproduce the original error ... that should give you a clue.

4) Note that the plugins merely provide a gateway (connection) to the different Databases ... so they are limited by the limitations of the Databases being deployed ... so you HAVE to go to the relevant database website for documentation ... since dBase is an ancient (no longer supported) database, it is not easy to find all the information ... now that I am on Windows 10, even the Help file for NeoBookDB can not be read.

5) Finally, keep in mind that you can not do everything with an old database that you can do with modern ones ... same as you can not go to Mars in the same plane that Orville/Wilbur Wright built over 100 years ago !!! ... so keep your expectations in check.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Database Problems

Postby fieldhopper » Wed Jun 15, 2016 4:00 am

Like Gaev told, use an other DB. Dbase is to old to manage such complexed project. Is better to use a DB like sqlite or mysql.
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Database Problems

Postby Dixan » Wed Jun 15, 2016 6:04 pm

:( Well, unfortunally I can´t to get the NeoBookDBPro plugin, so I´ll try to find a way to work with that old DB, Thanks guys. :(
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: Database Problems

Postby Neosoft Support » Fri Jun 17, 2016 5:20 pm

What folder is your database file located? It should be somewhere under your documents folder.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Database Problems

Postby Dixan » Fri Jun 17, 2016 5:38 pm

The problem isn´t where I have the folder, problem is I can´t download the NeoBookDBPro plugin becouse I cant´t pay it haha, I don´t have any bank account or something like that, just I got a trial of the plugin but is unusefull to compile. :(
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests