Search and Display Runtime Error

Search and Display Runtime Error

Post by Karen Wei » Mon, 07 Aug 1995 04:00:00



  I need help implementing a database search and display function.
The code below works once then raises a runtime error 210 at 1010:****
(the last 4 digits vary). I have tried the same code with an OKOnClick
procedure in the search.pas but that gives me a GPF on the first try.

  I think the problem is the searchdlg form not being destroyed and
the second search attempt tries to make a second searchdlg form.  I've
tried every way I know to get rid of the darn thing without any better
success.  Any help is appreciated but please bear in mind that I am a
beginner and speak beginner-eze.

unit Main;
.
.
.
procedure TFormOpening.BtnSearchClick(Sender: TObject);
var
  S : String;
begin
  {Calls the Search dialog screen}
  SearchDlg.ShowModal;
  S := SearchDlg.FindValue.Text;
  SearchDlg.Free;
  FormDisplay := TFormDisplay.Create(Self);
  FormDisplay.StaffDB.IndexName := 'Name';
  FormDisplay.StaffDB.FindNearest([S]);
  FormDisplay.Visible := True;

end;

Karen Weiss


 
 
 

Search and Display Runtime Error

Post by Karlheinz Spae » Thu, 10 Aug 1995 04:00:00



>  I need help implementing a database search and display function.
>The code below works once then raises a runtime error 210 at 1010:****
>(the last 4 digits vary). I have tried the same code with an OKOnClick
>procedure in the search.pas but that gives me a GPF on the first try.
>.
>procedure TFormOpening.BtnSearchClick(Sender: TObject);
>var
>  S : String;
>begin
>  {Calls the Search dialog screen}
>  SearchDlg.ShowModal;
>  S := SearchDlg.FindValue.Text;
>  SearchDlg.Free;

     ^ Maybe you have to use  "SearchDlg.Hide;" instead

 
 
 

Search and Display Runtime Error

Post by Matthias Romppe » Thu, 10 Aug 1995 04:00:00


:   I need help implementing a database search and display function.
: The code below works once then raises a runtime error 210 at 1010:****
: (the last 4 digits vary). I have tried the same code with an OKOnClick
: procedure in the search.pas but that gives me a GPF on the first try.

:   I think the problem is the searchdlg form not being destroyed and
: the second search attempt tries to make a second searchdlg form.  I've
: tried every way I know to get rid of the darn thing without any better
: success.  Any help is appreciated but please bear in mind that I am a
: beginner and speak beginner-eze.
:  
: unit Main;
: .
: .
: .
: procedure TFormOpening.BtnSearchClick(Sender: TObject);
: var
:   S : String;
: begin
:   {Calls the Search dialog screen}
:   SearchDlg.ShowModal;
:   S := SearchDlg.FindValue.Text;
:   SearchDlg.Free;
:   FormDisplay := TFormDisplay.Create(Self);
:   FormDisplay.StaffDB.IndexName := 'Name';
:   FormDisplay.StaffDB.FindNearest([S]);
:   FormDisplay.Visible := True;

: end;

Delete the following line:

SearchDlg.Free;

because you will need the SearchDlg for your next search.
The dialog is not created using ShowModal, it's shown and hidden by pressing
the Ok or Cancel button. The dialog has been created at another point
(don't know where this is located in your code), I suppose in your project
unit.

Regards
Matthias
--


Institut fuer Psychologie
Gosslerstr. 14
D-37073 Goettingen

 
 
 

1. Runtime Errors displaying the Taskpad in EM

Hello, I keep getting runtime error(s) when EM is displaying the Taskpad of
a DB from a client computer connected to a server running SQL2K Standard
Edition, SP2.  I also have recently applied SP2 to the client computer.

When the script to display the Taskpad is running, an error message always
pops up saying there's an Unspecified Error on Line 306, and asks if I want
to debug.  I always click No, and then no data is loaded into the Taskpad.
All 3 of the tabs which normally are labeled "General", "Table Info", &
"Wizards" all say "Undefined", "Undefined" & "Undefined".  The rest of the
DB info. also is missing -- which is because of the script error.

Just a few minutes ago, when the error occurred and I was prompted if I want
to debug or not, I clicked "Yes", and I could see the line where the error
is occurring.  The error is occurring in:

res://C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\Resources\1033\sqlmmc.rll/Tabs.html

The actual line where the error is occuring (and I guess it is Line #306)
is:

szDB                   =
parent.window.objSQLNSContext.GetDisplayName(strContextCookie)

When I "Step Into" that line, the error message is:
"An exception of type 'unknown exception' was not handled."

I feel like I have the location of the error pretty well pinned down, but I
have no idea what needs to be done to avoid this error.  If anyone has any
information, I'd very much appreciate it.

Thanks in Advance.
Ben

2. MySQL and LCC compiler

3. Display Properties for 5.0 Runtime

4. does version have large file support

5. Forms runtime 16bit to 32 bit migration and search paths

6. How big can my DB be?

7. Using FTI-Search (likely a more general runtime-puzzle)

8. HELP! Trouble with ComboBoxes...

9. Search Runtime for Paradox DOS 3.5

10. displaying data in a search form

11. searching tool to display database-contents graphically

12. limit search result display on web page??

13. How do I display search results across pages???