Question:
At client, how can I get the IP address or host name of
itself.
Answer:
The following example requires using the Winsock API
encapsulated in WinSock.pas.
uses
WinSock;
procedure GetHostInfo(var Name, Address: string);
var
WSAData: TWSAData;
HostEnt: PHostEnt;
begin
{ no error checking...}
WSAStartup(2, WSAData);
SetLength(Name, 255);
Gethostname(PChar(Name), 255);
SetLength(Name, StrLen(PChar(Name)));
HostEnt := gethostbyname(PChar(Name));
with HostEnt^ do
Address := Format('%d.%d.%d.%d',[
Byte(h_addr^[0]),
Byte(h_addr^[1]),
Byte(h_addr^[2]),
Byte(h_addr^[3])]);
WSACleanup;
end;
Question:
"External Exception C0000008" or "Access Violation" error with
2.3.3 SQL NET client: I get an Access Violation with Delphi 3
and an External Exception error with Delphi 2 when connecting
to an Oracle server when in Delphi's IDE or Turbo Debugger with
NT4. If I run the application alone, it executes correctly. How
do I get around the problem?
Answer:
Borland has determined that this is a problem with SQL NET
2.3.3. Oracle also recognizes this as a SQL NET problem. There
are a couple of workarounds:
Rename or remove the registry entry
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OTRACE73
This is the solution that Oracle support recommends!
Start Oracle's Installer and remove the "Oracle Trace
collection Serveces 7.3.3.x.x"
Turn off Integrated Debugging in Delphi's IDE
Use an Oracle SQL NET that is older than 2.3.3
Question:
If I use TMidasConnection with the sockets (TCP/IP)
transport, can I still take advantage of OLE Enterprise load
balancing and fail over? Would I then have to install OLE
Enterprise on the client machines?
Answer:
You can take advantage of OLE Enterprise without installing
it on the clients machines. Just set up the server (the
machine running SCKTSRVR.EXE) as a OLE Enterprise client.
That way, when a request comes in from a real client,
SCKTSRVR will attempt to create the object, and OLE
Enterprise will intercept and provide the service.
Question:
When attempting a connection to Oracle using the BDE Oracle SQL Links driver, why am I getting the error, Vendor initialization failure: ORANT71.DLL, when the driver's Vendor Init parameter is set to ORA73.DLL [or ORA72.DLL]?
Answer:
The BDE always searches the path first for the DLL specified in the Vendor Init parameter and if that fails, the BDE searches, by default, for ORANT71.DLL. Thus the Vendor Init error means that the BDE failed to find and load the DLL you specified and ORANT71.DLL.
Question:
How does the socket server (\bin\Scktsrvr.exe) interact with
TMidasConnection?
Answer:
The socket server is something like a service that replaces
DCOM, but without the security. When a client application sets
Connected = True on a TMidasConnection, the socket server on the
server machine creates the remote data module. Then it takes
the IDispatch invoke and GetIDsOfNames methods and marshals them
through the socket connection, using TCP/IP.





