Board index » delphi » MS SQL 6.0 and Delphi 3.02

MS SQL 6.0 and Delphi 3.02

Hi!

   I have a problem with the MS SQL and the Interbase server. My client
program (written in Delphi 3.02) works OK with Interbase. Unfortunately the
MS SQL server requires owner name before table's name (for example
OwnerPerson.Table01). On the other hand Interbase requires only name of the
table (for example Table01).

   What is my problem? I would like write the same client program for both
servers. Any suggestion would be very appreciated.

       Thanks in advance.

--
Vaclav Kolar
mailto:vaclavko...@melzer.cz
http://www.melzer.cz

 

Re:MS SQL 6.0 and Delphi 3.02


Quote
In article <6a1qit$i...@forums.borland.com>, "Vaclav Kolar" <vaclavko...@melzer.cz> wrote:
>   I have a problem with the MS SQL and the Interbase server. My client
>program (written in Delphi 3.02) works OK with Interbase. Unfortunately the
>MS SQL server requires owner name before table's name (for example
>OwnerPerson.Table01). On the other hand Interbase requires only name of the
>table (for example Table01).

>   What is my problem? I would like write the same client program for both
>servers. Any suggestion would be very appreciated.

Create your own TQuery descendant that knows how to add/remove the table names
as needed.  Have it check some global flag each time it is opened.  Use this
descentant instead of TQuery everywhere in your app.

*****  Kyle Cordes @ Automation Service  *****  kcor...@mo.net  *****

Re:MS SQL 6.0 and Delphi 3.02


Hi,
You could try making the user login name an alias of dbo. This way SQL
Server will see the access the table on behalf of the user as the owner of
the table.

Quote
Vaclav Kolar wrote in message <6a1qit$i...@forums.borland.com>...
>Hi!

>   I have a problem with the MS SQL and the Interbase server. My client
>program (written in Delphi 3.02) works OK with Interbase. Unfortunately the
>MS SQL server requires owner name before table's name (for example
>OwnerPerson.Table01). On the other hand Interbase requires only name of the
>table (for example Table01).

>   What is my problem? I would like write the same client program for both
>servers. Any suggestion would be very appreciated.

>       Thanks in advance.

>--
>Vaclav Kolar
>mailto:vaclavko...@melzer.cz
>http://www.melzer.cz

Re:MS SQL 6.0 and Delphi 3.02


Hi, I've been through the newsgroups recently & Derek D added useful
answers, also Dean @ Leeds Infomatics et al. Hey, what the heck I'm
trying to get consensus on Delphi 3.0X/BDE 4.X to Sybase (MS SQL).
The following problems & solutions seem prominent:

1) FetchAll stops command structure clash, subsequently TQuery wrapped
around stored procs, i.e. exec sp_XXX :Param1, .., ParamN - handle set
using
DbiSetProps stmt_EXECASCURSOR lets multiple result sets open on client
based cursors, N.B. not Db based heavy duty ones. This is also useful for
large
result sets where pragmatically returning the 100,000 rows or similar to
the client, for
QBE style dynamic SQL + FetchAll is not an option.
2) select * from XYZTable at isolation 0 duplicates ISQL or similar ad hoc
queries
with non-cursor locks - see sp_lock, combats above contention problems.
3) Delphi is an optimistic locking solution - as most client-server
are/object
persistent/RDBMS. In fact, most RDBMS server cursors don't provide fetch
previous
as well as fetch. CachedUpdates are used in this respect.
4) Sybase / MS SQL have timestamp (varbinary(8)) type to aid optimistic
locking,
though BDE doesn't support this as a param,
e.g. update Xtable set Col='A' where Id='B' & tsequal = (ts, timestamp).
But equally,
the timestamp can be converted, or Str(DateTime)+Str(UserId) as 'unique'
stamp.
5) We're basically assuming row-level locking using padded FillFactors etc.
6) Were all basically using read committed with some dirty reads, e.g. what
transaction
locking once we scroll up with got potential a row passed its sell by date.
7) It seems were all a bit shafted what ever we do, equally we've got to
deliver solutions asap.

I would be interested if anybody can add to the above, I'm sure I've missed
points
but would spend too much time t{*word*220} the text.

One outstanding one though is I've noticed different transaction behaviour
on stored procs
which call nested stored procs, in the same transaction boundary. In ISQL
the executed
stored proc works as expected. In Delphi it doesn't to see rows inserted
during the transaction
even though the inserted rows when subsequently selected should appear to
the 'transaction'
as if they were commited. Has anyone met this? Also, what Driver Flags
should I be using?

Sorry if the above is a bit long but I'd like to nail the above down.

Reid Roman <rkro...@pacbell.net> wrote in article
<349D299A.A523...@pacbell.net>...

Quote
> I just got assigned a new project to analyize the Database open
> connections an application has from a Delphi interface to a SQL Server
> (6.5).

> In these and other forums I have read both pros and cons of using ONE or
> MANY TDatabase components for an application.

> The problem is we are getting "Killed" with connections on the server
> ....

> Can anytone offer any advice or outline how to minimize redundancy with
> TDatabase connections?

> Any help you could offer would be greatly appreciated!

> Thanks

> Rkr

> --
>                    \|||/
>                    /'^'\
>                   ( 0 0 )
> --------------oOOO--(_)--OOOo--------------
> . Reid Roman                                 .
> . Delphi Programmer / Analyst                .
> . TVisualBasic:=class(None);                 .
> . May the Source be With You                 .
> -------------------------------------------
> . Auto-By-Tel (http://www.autobytel.com)  .
> . Irvine, CA U.S.A                           .
> . E-Mail : rkroman (at) pacbell (dot) net .
> . or reidr (at) autobytel (dot) com          .
> -------------------------------------------

WAS <wsob...@dms.sunbeach.net> wrote in article
<6a2o0v$j...@forums.borland.com>...

- Show quoted text -

Quote
> Hi,
> You could try making the user login name an alias of dbo. This way SQL
> Server will see the access the table on behalf of the user as the owner
of
> the table.

> Vaclav Kolar wrote in message <6a1qit$i...@forums.borland.com>...
> >Hi!

> >   I have a problem with the MS SQL and the Interbase server. My client
> >program (written in Delphi 3.02) works OK with Interbase. Unfortunately
the
> >MS SQL server requires owner name before table's name (for example
> >OwnerPerson.Table01). On the other hand Interbase requires only name of
the
> >table (for example Table01).

> >   What is my problem? I would like write the same client program for
both
> >servers. Any suggestion would be very appreciated.

> >       Thanks in advance.

> >--
> >Vaclav Kolar
> >mailto:vaclavko...@melzer.cz
> >http://www.melzer.cz

Other Threads