[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 44.392::delphi_in_dec

Title:Borland Delphi conference
Moderator:BROUGH::DAVIES
Created:Tue Mar 12 1996
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:33
Total number of notes:110

32.0. "General SQL error - max number of dbprocess allocated" by 21272::INFO_RIBERTO () Tue May 13 1997 01:23

    Hello,
    
    I have a project that use the follow architecture :
    
    - A PC running Windows 95( pentiun 133 16Mb RAM) with Delphi2.0 C/S version 
    - accessing a Data Base SQLServer 6.5 running under Windows NT 4.0 on
      a Alpha Plataform
    - the protocol used is TCP/IP
    
    My problem is :
    
    When the application starts and the initial section open the tables
    ( using tb_xxx.open command ) on create event of the form, the 
    sequence of open is executed ( I used the debug mode to trace the
    opens ) normally, sudenly the application fails over on a open table.
    The total number of table to be opened is about 20 tables and the error is
    not returned in a specificly table, but in a certain of number of open
    table ( I changed the order of tables and the error occurred in a 
    different table ).
    The error message returned is :
    " General SQL error. Maximum number of DBPROCESS already allocated "
  
    Any points will be very appreciated, cause I'm in deploy phase of my
    project and I don't know if the problem is a bad configuration of
    SQLserver or bad configuration of BDE link or something about Delphi
    configuration.
    
    	Please,	Waiting for anybody save me.
    
    	Thanks.    Riberto.
    
T.RTitleUserPersonal
Name
DateLines
32.145080::CWINPENNYFri May 16 1997 14:1414
    
    In the BDE configuration utility click on the aliases tab and select
    your alias. In the right hand window there will be an entry called
    'Schema Cache Size' which according to the BDE help is described as 

    SCHEMA CACHE SIZE	Number of SQL tables whose schema information will
                        be cached. Can be any whole number from 0 to 32.
                        Default: 8

    Try increasing this parameter to allow for the number of tables you
    expect to be using at any one time, 20 concurrent tables does seem to
    be quite high.

    Chris
32.2I increase, but no good news.21272::INFO_RIBERTOFri May 16 1997 17:5719
    
    	I tried increase that parameter and I did not have a good result,
    the application failed again, I contacted the local Borland's support
    and they told to me that the real problem is in the type of object that
    I'm using. The object is Ttable to point to SQLServer table, and they
    told to me that this kind of object is very heavy, cause there are a
    lot of controls embbebed ( very easy to use and programming but not
    good to use high ) and the solution proposed is change from ttable to
    tquery object, well the problem is I don't have to much time to convert
    my application, because I'll need add and change a lot of source-code.
    
    	In your point of view, is it true ? is it necessary to convert my 
    application or is there another way to use the ttable object but better
    configured or with some adjust to make to preserv my source-code.
    
    	Thanks in advanced,
    
    
    				Riberto.
32.345080::CWINPENNYFri May 16 1997 19:198
    
    The things like TTable, TdbListBox, Tdb... are there for people to
    knock up quick applications for proving concepts and such but are not
    really to be used in anger. What Borland say is quite right but once
    you get started you'll probably find it easier to convert your code
    than you first thought.
    
    Chris
32.4Do or do not. There is not try ( Yoda )21272::INFO_RIBERTOMon May 19 1997 18:358
    
    I get started the conversion process of my application and in my point
    of view the major effort to do will be write the SQL commands for all
    properties of Tquery object ( Insert, Update and Delete ).
    Do you know if is possible omit this SQL texts to perform necessary
    operations when use Tquery over a grid object.
    
    Thanks again Chris	   ;-)
32.545080::CWINPENNYMon May 26 1997 18:1018
    
    For Tquery you need some SQL somewhere. If all you want to do is look
    at tables in a grid object then the dirtiest way after Ttable is to 
    create a Tquery with the SQL 'select * from tbl order by tbl.field'.
    Right click on the Tquery and enter the fields editor to choose the
    fields you want on your grid. Stick on a datasource linked to the query
    and a dbgrid linked to the datasource and off you go.
    
    The documentation will give code examples for preparing and calling the
    query.
    
    If you are just dealing with one table, ie. not joined, then according
    to the documentation it should be possible to update the table from the
    dbgrid using the same query but I've never tried it. Doing things
    manually, although making a mockery of the rapid development concept,
    is by far the best method.
    
    Chris
32.6A man, a plan, a canal panama.21272::INFO_RIBERTOFri May 30 1997 20:4918
    
    I tried to use a SQL select statement in all cases, but when I used
    with SQL Server did not function properly, I made a test with a
    Interbase Database and the results was good !!. I need to put a 
    completed statements in SQL properties "Insert,Update,Delete" to
    work fine.
    
    Do you know if the SQL Server have a problem to use the Select
    statement to "Insert", "Update" or "Delete" on Tquery object ? 
    
    By the way, do you know some tricks or trips to optimize the
    performance when the Tquery object are opening ? Is there a good
    parameter to set to "magic value" ?
    
    Thanks again,
    
    				Riberto.