Board index » delphi » Problem reading memo or VarChar>255 with SQL Server

Problem reading memo or VarChar>255 with SQL Server

Hello there,
I have a quite common as I can see problem, but there are a couple of
questions not answered..

I am building an ISAPI dll with Delphi5, which will access through ODBC
(therefore also through BDE??) a database, run a Query and return some
fields, some of which are of type Text in SQL Server and some other of type
VarChar(3000). I am also using Sessions in my dll.
The query is parametirized so it is created at run-time, using information
taken from the user (for example
http://myserver/scripts/MyISAPI.dll/find?id=SomeID).

I experimented a lot and I have noticed that:
1. There is only problem when I choose in my query to get fields of kind
Text or VarChar>255.
2. There is NO problem if I try to use a TTable insted of a query, even with
Texts, or VarChars>255!! (but of course for me this is not a solution, cause
it is NOT paramatirized).
3. There is also NO problem if I use ADO, but I suppose that I can forget
about Sessions then, isn't that right?

I also downloaded and updated the BDE, with ver5.11, but also NO result!

So:
After reading some hundrends of news posts, I still haven't got an answer
for the following matter:

How can I get a Text or VarChar>255 field from an SQL Server by using a
query whose SQL is created at runtime and also have sessions???

If anyone should have an answer, I would be grateful...
Thanks in advance
Nikolas

 

Re:Problem reading memo or VarChar>255 with SQL Server


Quote
Nikolas wrote:

> I am building an ISAPI dll with Delphi5, which will access through ODBC
> (therefore also through BDE??) a database, run a Query and return some
> fields, some of which are of type Text in SQL Server and some other of type
> VarChar(3000). I am also using Sessions in my dll.

        If you're using SQL Server > 6.5, I'd strongly advise you to use ADO in
some form (such as dbGo for ADO in D6 or ADOExpress in D5 -- same
controls with a different name).  ADO is the only interface which
Microsoft would like you to use to access SQL Server.

        You can buy ADOExpress as an add-in for D5P, and it's included with
D5E.  dbGo for ADO is included with D6P and D6E.  There are also
third-party ADO components available.

        Note that the BDE's native driver for SQL Server uses Microsoft's
DB-LIB interface for SQL Server, which Microsoft no longer updates.  The
native driver cannot access character fields > 255.  ODBC on top of the
BDE should work, but why go through two middleware layers when one (ADO)
will do?

        HTH,

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
     Delphi/InterBase WebLog: http://delphi.weblogs.com

Re:Problem reading memo or VarChar>255 with SQL Server


Thanks for the immediate response..
I am using SQL Server 2000.
I have no problem using ADOExpress (D5E), but is there a way of using
Sessions with ADO? I haven't seen in ADO Components the "session" property
of TQuery and TDatabase(BDE), so how can I have sessions with ADO?
Thanx again

? "Craig Stuntz (TeamB)" <cstuntz@no_spam.vertexsoftware.com> ?????? ???
?????? news:3BEAD7D9.B07511F3@no_spam.vertexsoftware.com...

Quote

> Nikolas wrote:

> > I am building an ISAPI dll with Delphi5, which will access through ODBC
> > (therefore also through BDE??) a database, run a Query and return some
> > fields, some of which are of type Text in SQL Server and some other of
type
> > VarChar(3000). I am also using Sessions in my dll.

> If you're using SQL Server > 6.5, I'd strongly advise you to use ADO in
> some form (such as dbGo for ADO in D6 or ADOExpress in D5 -- same
> controls with a different name).  ADO is the only interface which
> Microsoft would like you to use to access SQL Server.

> You can buy ADOExpress as an add-in for D5P, and it's included with
> D5E.  dbGo for ADO is included with D6P and D6E.  There are also
> third-party ADO components available.

> Note that the BDE's native driver for SQL Server uses Microsoft's
> DB-LIB interface for SQL Server, which Microsoft no longer updates.  The
> native driver cannot access character fields > 255.  ODBC on top of the
> BDE should work, but why go through two middleware layers when one (ADO)
> will do?

> HTH,

> -Craig

> --
>  Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
> We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
>      Delphi/InterBase WebLog: http://delphi.weblogs.com

Re:Problem reading memo or VarChar>255 with SQL Server


On Sat, 10 Nov 2001 19:20:27 +0200, "Nikolas" <soume...@netscape.net>
wrote:

Quote
>I am using SQL Server 2000.
>I have no problem using ADOExpress (D5E), but is there a way of using
>Sessions with ADO? I haven't seen in ADO Components the "session" property
>of TQuery and TDatabase(BDE), so how can I have sessions with ADO?

Use multiple TADOConnection objects, each defining it's own connection
(= session), and hook up your controls to the various connections.

Marc

------------------------------------------------------------------------
Marc Scheuner                                          Software Engineer
Quest Software Canada                       Halifax, Nova Scotia, Canada
Email: marc.scheu...@quest.com                      http://www.quest.com

Other Threads