Board index » delphi » Passing SQL 7 GUID fields to stored proc and tables in Delphi

Passing SQL 7 GUID fields to stored proc and tables in Delphi

Hello,

Is there anyone who could shed some light on the passing of GUID parameters
from SQL 7 to Delphi (3 and 4). The parameter just doesn't show up in the
fieldlist for the stored proc or the table. I'm sure it has something to do
with BDE and/or ODBC versions, but i'm using ODBC for SQL 7 and BDE/SQL
5.01. I know there is a problem using the native Borland libs. But is should
work over ODBC. Or doesn't it!?

BTW, the param list for a stored procedure shows a GUID parameter with type
'ftUnknown'. If you change it to 'ftBytes' it works however.

W.J. Roes

 

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


This looks like a replication column, used by SQL server internally. Why
would you want to use this in you application?

Kees de Kooter
Boplicity Software

Quote
W.J. Roes wrote in message <7p6i7t$m...@forums.borland.com>...
>Hello,

>Is there anyone who could shed some light on the passing of GUID parameters
>from SQL 7 to Delphi (3 and 4). The parameter just doesn't show up in the
>fieldlist for the stored proc or the table. I'm sure it has something to do
>with BDE and/or ODBC versions, but i'm using ODBC for SQL 7 and BDE/SQL
>5.01. I know there is a problem using the native Borland libs. But is
should
>work over ODBC. Or doesn't it!?

>BTW, the param list for a stored procedure shows a GUID parameter with type
>'ftUnknown'. If you change it to 'ftBytes' it works however.

>W.J. Roes

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


select convert(varchar(255),guid_field) from mytable
marshman

You can pass the parm back to SQL but make sure you use a string.

Quote
W.J. Roes wrote in message <7p6i7t$m...@forums.borland.com>...
>Hello,

>Is there anyone who could shed some light on the passing of GUID parameters
>from SQL 7 to Delphi (3 and 4). The parameter just doesn't show up in the
>fieldlist for the stored proc or the table. I'm sure it has something to do
>with BDE and/or ODBC versions, but i'm using ODBC for SQL 7 and BDE/SQL
>5.01. I know there is a problem using the native Borland libs. But is
should
>work over ODBC. Or doesn't it!?

>BTW, the param list for a stored procedure shows a GUID parameter with type
>'ftUnknown'. If you change it to 'ftBytes' it works however.

>W.J. Roes

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


See the statement from Borland below:

- - - 8< - - -

    SQL Links uses DBLIB (native API for MS-SQL Server).
    DBLIB only implements the MS-SQL Server 6.5 feature set.
    This means that new types in MS-SQL Server 7 like GUID,
    Unicode, and CHAR columns longer than 255 characters are
    not supported. Microsoft will not be adding support for
    these new types to DBLIB, so the SQL Links driver does not
    support these new MS-SQL Server 7 types.

- - - 8< - - -

Regards
Johan Arthursson

W.J. Roes skrev i meddelandet <7p6i7t$m...@forums.borland.com>...

Quote
>Hello,

>Is there anyone who could shed some light on the passing of GUID parameters
>from SQL 7 to Delphi (3 and 4). The parameter just doesn't show up in the
>fieldlist for the stored proc or the table. I'm sure it has something to do
>with BDE and/or ODBC versions, but i'm using ODBC for SQL 7 and BDE/SQL
>5.01. I know there is a problem using the native Borland libs. But is
should
>work over ODBC. Or doesn't it!?

>BTW, the param list for a stored procedure shows a GUID parameter with type
>'ftUnknown'. If you change it to 'ftBytes' it works however.

>W.J. Roes

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


Yes, but this only holds for applications using the native MS-SQL driver,
and I'm using (or rather would like) the ODBC-driver.

Quote
Johan Arthursson <SendAnswerToNewsGroup> wrote in message

news:7p8i7j$o4p10@forums.borland.com...
Quote

> See the statement from Borland below:

> - - - 8< - - -

>     SQL Links uses DBLIB (native API for MS-SQL Server).
>     DBLIB only implements the MS-SQL Server 6.5 feature set.
>     This means that new types in MS-SQL Server 7 like GUID,
>     Unicode, and CHAR columns longer than 255 characters are
>     not supported. Microsoft will not be adding support for
>     these new types to DBLIB, so the SQL Links driver does not
>     support these new MS-SQL Server 7 types.

> - - - 8< - - -

> Regards
> Johan Arthursson

> W.J. Roes skrev i meddelandet <7p6i7t$m...@forums.borland.com>...
> >Hello,

> >Is there anyone who could shed some light on the passing of GUID
parameters
> >from SQL 7 to Delphi (3 and 4). The parameter just doesn't show up in the
> >fieldlist for the stored proc or the table. I'm sure it has something to
do
> >with BDE and/or ODBC versions, but i'm using ODBC for SQL 7 and BDE/SQL
> >5.01. I know there is a problem using the native Borland libs. But is
> should
> >work over ODBC. Or doesn't it!?

> >BTW, the param list for a stored procedure shows a GUID parameter with
type
> >'ftUnknown'. If you change it to 'ftBytes' it works however.

> >W.J. Roes

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


I'm not the authority, but it looks like you will be using Delphi 5 with ADO
if you want to get to the advanced features.

Cash

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


Yeah, certainly looks that way. But I'v found a work-around for the time
being: in the tables we'll keep using GUIDs but in the stored procedures
acting as interface to our Delphi application, we typecast the GUIDs to
BINARY(16). So far, this seems to work just fine.

Quote
Cash Foley <em...@cashfoley.com> wrote in message

news:7pca4p$ssu9@forums.borland.com...
Quote
> I'm not the authority, but it looks like you will be using Delphi 5 with
ADO
> if you want to get to the advanced features.

> Cash

Re:Passing SQL 7 GUID fields to stored proc and tables in Delphi


I was just a little bit too enthusiastic. It works but you'll have to use
CHAR(36) instead of BINARY(16).

Quote
W.J. Roes <wir...@romulus.kdc.kun.nl> wrote in message

news:7pccba$ssb9@forums.borland.com...
Quote
> Yeah, certainly looks that way. But I'v found a work-around for the time
> being: in the tables we'll keep using GUIDs but in the stored procedures
> acting as interface to our Delphi application, we typecast the GUIDs to
> BINARY(16). So far, this seems to work just fine.

> Cash Foley <em...@cashfoley.com> wrote in message
> news:7pca4p$ssu9@forums.borland.com...
> > I'm not the authority, but it looks like you will be using Delphi 5 with
> ADO
> > if you want to get to the advanced features.

> > Cash

Other Threads