Subject | Re: INET/inet_error: read errno = 10054 in localhost |
---|---|
Author | Federico Bobbio |
Post date | 2008-01-29T01:48:37Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
multi-user use. Since you are using XP, develop from a remote desktop
client and use the node name of the server in your TCP/IP string. (IP
address is also possible, if you can be certain that, when the system
is deployed, you can be certain that the IP address will be statically
defined.)
Yes you're right, i get what you're saying here :)
SELECT list and your WHERE clause determine (respectively) how many
columns and how many rows are in your sets. When you go into a
deployed client/server situation the size of the sets becomes a lot
more important than it is when everything is happening on a single
machine!
Good point, think i was going to a certain death :P
have:
for the client application to communicate with the Firebird server.
On a Windows client machine, its name is fbclient.dll. On Linux SS,
it is libfbclient.so.
driver, a PHP or Python library, a set of Delphi components, a set of
wrapper components such as IBPP for C++, and so on).
having called one or more appropriate functions of the API. Each
different, client-language-specific data access layer (see 3 above)
has its own way to wrap up the DPB and the required API calls. Your
application would call these wrappers and is not concerned about what
the wrapper code does beneath the surface. When this call succeeds,
you have "a connection".
work. It also isolates its "view" of database state from the "view"
seen by any other transaction. That goes for different transactions
within this session, as well as transactions within other sessions.
returns a SET to a buffer at the server. Rows from that buffer are
fetched on request *within* the current execution of the statement and
within the current transaction. Statements that are not SELECTs
return data directly to the calling transaction.
statements, sets, etc.)
executable statements (insert/update/delete) needed for a single task
should be defined within the context of a single connection |
transaction. If you make separate *connections* for each statement
and then try to "hook them up" you will have access violations in the
client. When the client crashes, the connection to the server is
broken and you get the 10054 (and other) network errors that you are
seeing.
When i said "one big query" i meant: use join as Ann told before,
would that be right?
driver you are using for your data access layer and get some direction
on how to manage the connections, transactions and statements in your
client application. Visit http://firebirdsql.org/index.php?op=lists
to find the right list.
Ok i'll be taking a look to the jaybird mailing list and trying to put
what you taught me today to work :)
article, "How to Ask Smart Questions". It's essential for everyone
who hasn't used support lists before...
>to develop a 2-tier fat client system that you intend to deploy for
> At 10:01 AM 29/01/2008, Federico Bobbio wrote:
> >> -- Is this a single-user, stand-alone system?
> >> -- Is it 2-tier client server or n-tier? If it is 2-tier then
> >remote clients cannot access a database through localhost...
> >
> >
> >At this time is a single user in one computer, really simple, but in
> >the future it should grow.
> >The business and presentation tiers are managed in the client side (if
> >i get you right)
>
> Accessing databases as a local user via localhost is not a great way
multi-user use. Since you are using XP, develop from a remote desktop
client and use the node name of the server in your TCP/IP string. (IP
address is also possible, if you can be certain that, when the system
is deployed, you can be certain that the IP address will be statically
defined.)
Yes you're right, i get what you're saying here :)
>means "in the same network as the server host, but on a different node".
> >> Tell us more about "user disconnecting from the server".
> >
> >I'm developing the app and i didn't give it to the customer yet, so
> >i'm the only user right now, the problem is that i can't make it work
> >fine :(
>
> You can, however, develop and test it as a remote user. "Remote"
>Ouch :(
> >> >and a problem with the used SQL.
> >>
> >> How long is a piece of string? Bad SQL can make response slow but
> >it wouldn't directly cause a client connection to break...
> >
> >As i said i'm not an experienced user so i'll tell you how i'm working
> >with SQL. For example i have an Employeers table and they hava Phones
> >(table) and Addresses (table) and when i need to get the data i open a
> >connection to get the info from the Employeers table, inside of this
> >connection i open another for the phones and another for the
> >addresses, is this as bad as it sounds? :P
>
> Yes, even worse. :-(
>language*, which means it is designed to let you retrieve SETS. Your
> >The querys are like "SELECT <COLUMN_NAMES> FROM <ONLY_ONE_TABLE> WHERE
> >EMPLOYEER_ID = X", this is just an example, there are no more than 10
> >or 12 columns in the bigger tables
>
> It's not primarily about the size of the tables. SQL is a *query
SELECT list and your WHERE clause determine (respectively) how many
columns and how many rows are in your sets. When you go into a
deployed client/server situation the size of the sets becomes a lot
more important than it is when everything is happening on a single
machine!
Good point, think i was going to a certain death :P
>better to try to get you to understand the concept of a "session".
> >> >Could the problem be that when i need data from multiple tables i'm
> >> >opening a lot of connections to get it?
> >>
> >> Yes. The client should have one connection per thread and the work
> >within one thread should never refer to other connections or to
> >transactions and statements in other connections.
> >
> >So i need to separate the connections in different threads or should i
> >bring all the data i need in one big query?
>
> Hmmm, instead of trying to answer that question, perhaps it is
>user application" connecting to "a database". In your fat client, you
> "Session" is a client-side concept that represents the model of "a
have:
>library that exposes all the functions, macros, etc. that are needed
> 1. Your client application code that runs on the client machine.
>
> 2. The Firebird API, which is loaded on the client machine as a
for the client application to communicate with the Firebird server.
On a Windows client machine, its name is fbclient.dll. On Linux SS,
it is libfbclient.so.
>layer, such as a driver (e.g. Jaybird for Java, an ODBC driver, a .NET
> 3. Between the client application and the Firebird is a data access
driver, a PHP or Python library, a set of Delphi components, a set of
wrapper components such as IBPP for C++, and so on).
>connection to one database using one Database Parameter Block (DPB),
> At its simplest, a "session" is one client that has made one
having called one or more appropriate functions of the API. Each
different, client-language-specific data access layer (see 3 above)
has its own way to wrap up the DPB and the required API calls. Your
application would call these wrappers and is not concerned about what
the wrapper code does beneath the surface. When this call succeeds,
you have "a connection".
>isolates one block of work in your application from another block of
> Within the connection, you have transactions. A transaction
work. It also isolates its "view" of database state from the "view"
seen by any other transaction. That goes for different transactions
within this session, as well as transactions within other sessions.
>isolated within one and only one transaction. A SELECT statement
> Within a transaction, you have statements. Each statement is
returns a SET to a buffer at the server. Rows from that buffer are
fetched on request *within* the current execution of the statement and
within the current transaction. Statements that are not SELECTs
return data directly to the calling transaction.
>transaction]
> So, to summarise the simple picture, a session consists of:
>
> 1 connection
> a transaction
> [one or many statements pertaining to that transaction]
> [one or many sets and other results pertaining to that
>transaction]
> another transaction
> [one or many statements pertaining to that transaction]
> [one or many sets and other results pertaining to that
>must comprise a totally isolated session (its own transactions,
> another transaction ..... etc.
>
> >Is a simple application for a company that sells medical products, it
> >should manage only information about the statistics of the sales.
>
>
> >So i need to separate the connections in different threads
>
> Separate connections must be in different threads. Each connection
statements, sets, etc.)
>needs to work with, all of the sets (output of SELECT statements) and
> > or should i bring all the data i need in one big query?
>
> That's the wrong question to ask. For all of the data that the user
executable statements (insert/update/delete) needed for a single task
should be defined within the context of a single connection |
transaction. If you make separate *connections* for each statement
and then try to "hook them up" you will have access violations in the
client. When the client crashes, the connection to the server is
broken and you get the 10054 (and other) network errors that you are
seeing.
When i said "one big query" i meant: use join as Ann told before,
would that be right?
>I strongly advise that you subscribe to the support list of whatever
> So, yes, I think at this point there is a LOT that you are missing.
driver you are using for your data access layer and get some direction
on how to manage the connections, transactions and statements in your
client application. Visit http://firebirdsql.org/index.php?op=lists
to find the right list.
Ok i'll be taking a look to the jaybird mailing list and trying to put
what you taught me today to work :)
>click the ASK SMART link at the top of that page and study the linked
> To make it easier for the people whom you want to help you, please
article, "How to Ask Smart Questions". It's essential for everyone
who hasn't used support lists before...
>Thank you very much Helen!
> ./heLen
>