Source language: Translate to:

dbpFindNext

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

dbpFindNext

Postby antonio45 » Thu Feb 26, 2009 6:26 am

Hi,

I have a Table which have records that;

"ABCD122545"
"ABCD123547"
"ABCD124543"
"ABCD125547"


There is a Grid on rectangle

dbpExecSQL "[DosyaName]" "Select DATE_ as [#34]Tarih[#34], MSGS1 AS [#34]Mesaj1[#34], MSGS2 AS [#34]Mesaj2[#34] FROM LG_000_SYSLOG where FIRMNO=[CurrentFirmaNr] and USERNAME='[CurrentKullanici]'" "Tablo_Mesaj"

dbpSetGridProperties "[DosyaName]" "Tablo_Mesaj" "Color=White;Font=Arial,9,Normal,TURKISH_CHARSET;FontColor=WindowText;AlternateRowColor=Window;AlternateRowFontColor=WindowText;RowHeight=22;TitleColor=BtnFace;TitleFont=Arial,9,Normal,TURKISH_CHARSET;TitleFontColor=BtnText;TitleRowHeight=22;HighlightColor=Highlight;HighlightFontColor=HighlightText;EditColor=Window;EditFontColor=WindowText;ShowTitles=Yes;3DTitles=Yes;ShowGraphics=Yes;ShowIndicator=Yes;ShowColumnLines=Yes;ShowRowLines=Yes;GridLineWidth=1;GridLineColor=BtnFace;AllowRowResize=Yes;AllowColumnResize=Yes;AllowColumnSort=Yes;ConfirmDelete=No;ReadOnly=Yes;EditOnly=No;RowSelect=Yes;ShowScrollBars=Yes;ShowNavigationBar=No;GetDefaultValues=Yes;OnDoubleClick="
dbpShowGrid "[DosyaName]" "Tablo_Mesaj" "Rect_Mesaj"


There is TextEntry1 on my pub.

And There is 2 buttons;

Button1 action is

dbpFind "[Tablo_Mesaj]" "" "Mesaj1;Mesaj2" "[TextEntry1]" "ExactMatch=No;CaseSensitive=No"


And I am entering 547 in TextEntry1.

When I puch the button I can find first record which is "ABCD123547"

And ther second button action is;
dbpFindNext "[DosyaName]" "Tablo_Mesaj"

When I puch the second button I can't find the second records which is "ABCD125547"


I tried dbpFindNext action on other tables but I coudn't success to find the other records.

Can you help me please

Mehmet BAKITKAL
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

Postby Gaev » Thu Feb 26, 2009 7:04 am

Mehmet BAKITKAL:

Assuming that this command ...

dbpFind "[Tablo_Mesaj]" "" "Mesaj1;Mesaj2" "[TextEntry1]" "ExactMatch=No;CaseSensitive=No"

... was posted on the forum with a typo ... and actually is ...

dbpFind "[DosyaName]" "[Tablo_Mesaj]" "Mesaj1;Mesaj2" "[TextEntry1]" "ExactMatch=No;CaseSensitive=No"

... in your pub ... perhaps, the dbpExecSQL command results in only the first record being in the current (filtered) set of records in Table ... does your Grid actually display the second record ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

dbpFindNext

Postby antonio45 » Thu Feb 26, 2009 2:25 pm

Hi,

Yes my Grid displays the second record, but dbpFindNext can't find it.
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

dbpFindNext

Postby antonio45 » Thu Feb 26, 2009 2:32 pm

Hi Gaev,
Yes the button 1 action is ;

dbpFind "[DosyaName]" "Tablo_Mesaj" "Mesaj1;Mesaj2" "[AraText]" "ExactMatch=No;CaseSensitive=No"

and the button2 action is

dbpFindNext "[DosyaName]" "Tablo_Mesaj"

I push first button first and , first record is found, but when I push the second button , the second records is been seen but the action can't find it.
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

Postby Gaev » Thu Feb 26, 2009 2:41 pm

Mbakitkal:
I push first button first and , first record is found, but when I push the second button , the second records is been seen but the action can't find it.
What makes you say that the action can't find it ? ... is the Grid's current record pointer (on the left) positioned at the second record ? ... in your button that does the dbpFindNext command, place an AlertBox command that displays the content of one or more fields in your current record.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

dbpFindNext

Postby antonio45 » Thu Feb 26, 2009 2:59 pm

Hi Gaev,

The pointer is stopping only first record. I put an Alert on the second button next DbpFindNext action. AlertBox "" "[[DosyaName].Tablo_Mesaj.Mesaj1]|[[DosyaName].Tablo_Mesaj.Mesaj2]"

And Alertbox action is showing only first record informations. But There are a lot of words which I wrote in the Textentry( [AraText] ) at the other records.
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

dbpFindNext

Postby antonio45 » Thu Feb 26, 2009 3:09 pm

Sorry,

the pointer is stopping at the first record which is found. It is stopping at the second record In my example. I can sow the fourth record on the grid but the pointer dosn't go there
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

Postby Neosoft Support » Fri Feb 27, 2009 10:57 am

Can you post a small sample publication that demonstrates what you are doing?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

dbpFindNext

Postby antonio45 » Fri Feb 27, 2009 3:10 pm

Hi,

I prepared a sample with Addrbook table. If you select State Arizona /double click) 3 countries displays at the bottom rectangle. And if you write "er" word to TextEntry box, anf push the Find button, the pointer must go to "McConners", and if you pust the FindNext button, the pointer must go to "Albert".

[/code]
NBW Publication Source File
(C)1993-2008 NeoSoft Corp.
Title=Mehmet BAKITKAL
Language=US
NeoBookVer=5,60
ScreenColors=16777216
ScreenWidth=1024
ScreenHeight=720
BkndColor=0
ScreenAutoSize=Yes
LinkColor=16711680
WindowStyle=0
WindowOrder=0
WindowPos=0
WindowProps=31
BiDiMode=0
UseUpdateTimer=Yes
ReturnTime=60
SubroutineAction=:MesajBak¶SetVar "[CurrentKullanici]" "[AddrBook.States.Abbr]"¶.AlertBox "" "[CurrentKullanici]"¶¶ dbpExecSQL "AddrBook" "Select FirstName,LastName FROM Contacts where STATE='[CurrentKullanici]'" "Tablo_Mesaj"¶ dbpSetGridProperties "AddrBook" "Tablo_Mesaj" "Color=White;Font=Arial,9,Normal,TURKISH_CHARSET;FontColor=WindowText;AlternateRowColor=Window;AlternateRowFontColor=WindowText;RowHeight=22;TitleColor=BtnFace;TitleFont=Arial,9,Normal,TURKISH_CHARSET;TitleFontColor=BtnText;TitleRowHeight=22;HighlightColor=Highlight;HighlightFontColor=HighlightText;EditColor=Window;EditFontColor=WindowText;ShowTitles=Yes;3DTitles=Yes;ShowGraphics=Yes;ShowIndicator=Yes;ShowColumnLines=Yes;ShowRowLines=Yes;GridLineWidth=1;GridLineColor=BtnFace;AllowRowResize=Yes;AllowColumnResize=Yes;AllowColumnSort=Yes;ConfirmDelete=Yes;ReadOnly=Yes;EditOnly=Yes;RowSelect=Yes;ShowScrollBars=Yes;ShowNavigationBar=Yes;GetDefaultValues=Yes;OnDoubleClick="¶ dbpShowGrid "AddrBook" "Tablo_Mesaj" "Rect_Mesaj"¶Return
ShapeTransColor=536870912
CompiledName=C:\Program Files\NeoBook 5\LOGUTIL.exe
CompileType=0
MediaType=0
FilesIncluded=1
FontsIncluded=2
FontsToCompile=|
CopyExternalFiles=No
SetupMedia=3
SetupInstDir=C:\MyProgram
SetupTitle=Setup
SetupColors=16711680|0|65535
Variables=[#13]¶[#34]¶[#91]¶[#93]¶[.$Status]¶[.L_CAPIFIRM.NR]¶[.Tablo_Mesaj.Mesaj1]¶[.Tablo_Mesaj.Mesaj2]¶[ActiveTable]¶[AddrBook.State.Abbr]¶[AraText]¶[ComboFirmaName]¶[ComboFirmaNr]¶[ComboFirmaTitle]¶[CurrentFirmaNr]¶[CurrentKullanici]¶[DosyaName]¶[DS]¶[FirmaKasaIsim]¶[FirmaName]¶[FirmaNo]¶[FirmaNr]¶[FirmaStrNo]¶[FirmaTitle]¶[FirmTitle]¶[Kasalar]¶[ListBox1]¶[Mousex]¶[Mousey]¶[Numara]¶[password]¶[SayUzunluk]¶[Select]¶[spler]¶[Tablolar]¶[TusAktif]¶[user_id]¶
VersionMajor=1
VersionMinor=0
VersionRelease=0
VersionBuild=0
CustomFontName=Arial
CustomFontSize=9
CustomFontStyle=0
CustomCharset=1
CacheSize=30
ExtractOp=132
L_OK=OK
L_CANCEL=Cancel
L_YES=Yes
L_NO=No
L_CLOSE=Close
L_ERRORTITLE=Error
L_FINDTITLE=Find
L_FINDPROMPT=Find &What
L_FINDFIRST=&Find First
L_FINDNEXT=Find &Next
L_FINDERROR=Search text not found.
L_PWORDTITLE=Password required
L_PWORDMSG=Before continuing, you must first|enter the correct password.
L_PWORDPROMPT=&Password:
L_PWORDERROR=That's not the right password!
L_MEDIAERROR=In order to play this type of file you must install|the appropriate multimedia hardware and/or|software.
L_INTERNETERROR=Unable to locate Internet Browser software.
L_ABORTFUNCTION=Do you want to cancel this function?
L_EXTRACTERROR=This file could not be extracted and cannot be played.
L_INSTDIRPROMPT=Please enter the drive and directory where you would like this program to be installed. To accept the default drive and directory, simply press Enter.
L_INSTFOLDERPROMPT=Do you wish to create a program folder?
L_INSTRUNPROMPT=Do you want to run
L_INSTDISKPROMPT=Please insert disk #
L_INSTDISKERROR=That's not the correct disk, try again.
L_INSTGENERROR=The installation has terminated.
L_INSTEXITPROMPT=Do you really want to cancel the installation?
L_INSTWINTITLE=Setup
L_INSTPROGTITLE=Extracting Files...
L_SENDEMAIL=Sending Mail...
L_MAILSERVER=Please enter the name of your outgoing email server:
L_COPY=Copy to Clipboard
L_SELECTALL=Select All
L_DONWLOADFILE=Downloading: %s
L_PLEASEWAIT=Please wait...
MenuBegin
MenuName=MenuHeading3
MenuText=Ayarlar
MenuState=3
MenuKey=16497
MenuBegin
MenuName=MenuItem1
MenuText=Firma Ayarları
MenuState=3
MenuKey=0
MenuAction=dbpOpenTable "[DosyaName]" "L_CAPIFIRM" ""¶¶dbpShowGrid "[DosyaName]" "L_CAPIFIRM" "Rectangle1"¶¶dbpSetGridProperties "[DosyaName]" "L_CAPIFIRM" "Color=White;Font=Arial,9,Normal,ANSI_CHARSET;FontColor=WindowText;AlternateRowColor=Window;AlternateRowFontColor=WindowText;RowHeight=22;TitleColor=BtnFace;TitleFont=Arial,9,Normal,ANSI_CHARSET;TitleFontColor=BtnText;TitleRowHeight=22;HighlightColor=Highlight;HighlightFontColor=HighlightText;EditColor=Window;EditFontColor=WindowText;ShowTitles=Yes;3DTitles=Yes;ShowGraphics=Yes;ShowIndicator=Yes;ShowColumnLines=Yes;ShowRowLines=Yes;GridLineWidth=1;GridLineColor=BtnFace;AllowRowResize=Yes;AllowColumnResize=Yes;AllowColumnSort=Yes;ConfirmDelete=No;ReadOnly=Yes;EditOnly=No;RowSelect=Yes;ShowScrollBars=Yes;ShowNavigationBar=No;GetDefaultValues=Yes;OnDoubleClick=GridKapa"¶dbpSetGridBackground "[DosyaName]" "L_CAPIFIRM" "C:\Documents and Settings\MEHMET BAKITKAL\Belgelerim\NeoBook 5\NeoBookDBPro Samples\AddressBook\Background.gif"¶¶dbpSetFieldProperties "[DosyaName]" "L_CAPIFIRM" "NR" "Alignment=Left;TitleAlignment=Left;PickList=;DropDownRows=7;DisplayFormat=;EditMask=;DefaultValue=;ValidChars=;ColumnWidth=;ReadOnly=Yes;Visible=Yes"¶dbpSetFieldProperties "[DosyaName]" "L_CAPIFIRM" "NAME" "Alignment=Left;TitleAlignment=Left;PickList=;DropDownRows=7;DisplayFormat=;EditMask=;DefaultValue=;ValidChars=;ColumnWidth=;ReadOnly=Yes;Visible=Yes"¶¶dbpSetColumnOrder "[DosyaName]" "L_CAPIFIRM" "NR;NAME"¶¶CustomWindow "Firma Seçimi" "296" "261" "Container3" "DialogBox+Exclusive"
MenuName=MenuItem2
MenuText=Kasa ve Banka Ayarları
MenuState=3
MenuKey=0
MenuAction=SetVar "[FirmaKasaIsim]" "LG_[FirmaStrNo]_KSCARD"¶dbpOpenTable "[DosyaName]" "[FirmaKasaIsim]" ""¶SetVar "[Kasalar]" ""¶dbpFieldToVar "[DosyaName]" "[FirmaKasaIsim]" "CODE" "[Kasalar]" "Delimiter=[#34][#34][#34];[#34][#34][#34];SkipBlanks=Yes;NoDuplicates=Yes"¶GotoPage "Kaslar"¶FileRead "[PubDir]Dosya" "All" "[Select]"¶AlertBox "" "[Select]"¶dgListCheckBox "Rectangle9" "FileRead [#34][#91]PubDir[#93]Dosya[#34] [#34]All[#34] [#34][#91]Select[#93][#34]" "" "[Select]" "[Kasalar]"
MenuEnd
MenuName=MenuHeading4
MenuText=Raporlar
MenuState=3
MenuKey=16499
MenuName=MenuHeading5
MenuText=Çıkış
MenuState=3
MenuKey=16505
MenuEnd
TrayMenuBegin
MenuName=TrayOpen
MenuText=Open
MenuState=3
MenuKey=0
MenuAction=SetVar "[WindowState]" "Normal"
MenuName=TrayExit
MenuText=Exit
MenuState=3
MenuKey=0
MenuAction=Exit "" ""
MenuEnd
MasterPage
NewPage=New Page
PageStyle=2
PageColor=16777215
PageGradient1=4239608
PageGradient2=255
PageGradientDir=1
PageWallPaper=C:\Documents and Settings\MEHMET BAKITKAL\Belgelerim\NeoBook 5\NeoBookDBPro Samples\AddressBook\Background.gif
WallpaperStyle=0
EffectSpeed=0
ObjectType=21
Name=Container42
X=0
Y=0
W=186
H=720
Anchor=3
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
TabOrder=1
HMargin=0
VMargin=0
ContainerBegin
ObjectType=3
Name=PushButton142
X=1
Y=1
W=184
H=62
Anchor=1
Text=States
Align=2
ImageStyle=0
XPTheme=Yes
ObjAction=dbpOpenAccessDatabase "AddrBook" "F:\NeoBook\PlugIns\NeoBookDBPro\AddressBook\AddressBook.mdb" ""¶¶dbpOpenTable "AddrBook" "States" ""¶dbpOpenTable "AddrBook" "Contacts" ""¶¶dbpDefineRelationship "AddrBook" "States" "Abbr" "Contacts" "State" ""¶¶¶dbpSetGridProperties "AddrBook" "States" "Color=White;Font=Arial,9,Normal,TURKISH_CHARSET;FontColor=WindowText;AlternateRowColor=Window;AlternateRowFontColor=WindowText;RowHeight=22;TitleColor=BtnFace;TitleFont=Arial,9,Normal,TURKISH_CHARSET;TitleFontColor=BtnText;TitleRowHeight=22;HighlightColor=Highlight;HighlightFontColor=HighlightText;EditColor=Window;EditFontColor=WindowText;ShowTitles=Yes;3DTitles=Yes;ShowGraphics=Yes;ShowIndicator=Yes;ShowColumnLines=Yes;ShowRowLines=Yes;GridLineWidth=1;GridLineColor=BtnFace;AllowRowResize=Yes;AllowColumnResize=Yes;AllowColumnSort=Yes;ConfirmDelete=No;ReadOnly=Yes;EditOnly=No;RowSelect=Yes;ShowScrollBars=Yes;ShowNavigationBar=No;GetDefaultValues=Yes;OnDoubleClick=MesajBak"¶dbpShowGrid "AddrBook" "States" "Rect_ActiveUsers"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=0
ObjectType=3
Name=PushButton141
X=1
Y=63
W=184
H=65
Anchor=1
Text=Find
Align=2
ImageStyle=0
XPTheme=Yes
ObjAction=dbpFind "AddrBook" "Tablo_Mesaj" "FirstName;LastName" "[AraText]" "ExactMatch=No;CaseSensitive=No"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=1
ObjectType=9
Name=TextEntry55
X=1
Y=174
W=184
H=37
Anchor=1
VarName=[AraText]
EditLen=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=1
FillMode=Yes
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=2
ObjectType=3
Name=PushButton143
X=1
Y=128
W=184
H=46
Anchor=1
Text=Find Next
Align=2
ImageStyle=0
XPTheme=Yes
ObjAction=dbpFindNext "AddrBook" "Tablo_Mesaj"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ContainerEnd
ObjectType=21
Name=Container43
X=186
Y=0
W=838
H=720
Anchor=5
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
TabOrder=2
HMargin=0
VMargin=0
ContainerBegin
ObjectType=5
Name=Rect_ActiveUsers
X=1
Y=1
W=836
H=310
Anchor=1
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
TabOrder=0
ObjectType=5
Name=Rect_Mesaj
X=1
Y=311
W=836
H=382
Anchor=5
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
TabOrder=1
ObjectType=21
Name=Container44
X=1
Y=693
W=836
H=26
Anchor=2
LineColor=0
LineWidth=1
LineStyle=0
FillColor=7395576
FillPattern=1
FillMode=Yes
TabOrder=2
HMargin=0
VMargin=0
ContainerBegin
ContainerEnd
ContainerEnd
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

dbpFindNext

Postby antonio45 » Mon Mar 02, 2009 10:05 am

Hi,

Can you look my sample pub and help me about dbpFindNext problem please ?
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

Postby Neosoft Support » Mon Mar 02, 2009 11:23 am

Thank you for supplying the sample publication. That was extremely helpful.

The grid's "RowSelect" option is interfering with the dbpFindNext action. When RowSelect is set to true, the grid always assumes that the first column is selected. When you call dbpFindNext, the search starts from the selected column. This causes dbpFindNext to find the same column over and over, giving the appearance that it's not working. To fix the problem, change dbpSetGridProperties in the MesajBak subroutine so that RowSelect is set to "No". For example:

dbpSetGridProperties "AddrBook" "Tablo_Mesaj" "Color=White;Font=Arial,9,Normal,TURKISH_CHARSET;FontColor=WindowText;AlternateRowColor=Window;AlternateRowFontColor=WindowText;RowHeight=22;TitleColor=BtnFace;TitleFont=Arial,9,Normal,TURKISH_CHARSET;TitleFontColor=BtnText;TitleRowHeight=22;HighlightColor=Highlight;HighlightFontColor=HighlightText;EditColor=Window;EditFontColor=WindowText;ShowTitles=Yes;3DTitles=Yes;ShowGraphics=Yes;ShowIndicator=Yes;ShowColumnLines=Yes;ShowRowLines=Yes;GridLineWidth=1;GridLineColor=BtnFace;AllowRowResize=Yes;AllowColumnResize=Yes;AllowColumnSort=Yes;ConfirmDelete=Yes;ReadOnly=Yes;EditOnly=Yes;RowSelect=No;ShowScrollBars=Yes;ShowNavigationBar=Yes;GetDefaultValues=Yes;OnDoubleClick="
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

dbpFindNext

Postby antonio45 » Mon Mar 02, 2009 12:27 pm

Thank you for your help,
Is it normal behaviour ?, because dbpFind action is finding first record while rowselect is "Yes", but dbpFindNext action isn't finding ?
antonio45
 
Posts: 42
Joined: Fri Mar 31, 2006 11:37 am

Postby Neosoft Support » Mon Mar 02, 2009 3:09 pm

Is it normal behaviour ?, because dbpFind action is finding first record while rowselect is "Yes", but dbpFindNext action isn't finding ?


When Row Select is enabled, the grid always thinks that the first column is highlighted. Because FindNext always starts from the selected column, this quirk causes FindNext to fail. We may be able to rewrite the Find/FindNext function to compensate for this in a future update. For now you will have to avoid using Row Select and FindNext at the same time.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
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

cron