Re: [DUG] MSSQL ID field binary(8)

2010-08-17 Thread Stephen Barker
words[0]+' '+words[22]+' '+words[26]+' '+words[32]+' '+words[28]+' '+words[-1] Steve _ From: John Bird [mailto:johnkb...@paradise.net.nz] Sent: Tuesday, 17 August 2010 3:55 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] MSSQL ID field binary(8) I think I have

Re: [DUG] MSSQL ID field binary(8)

2010-08-16 Thread Neven MacEwan
John I work on systems where some idiot used a decimal(9,0) as a PK and mixed it with other tables with integers, I think with any PK the main thing is use the same otherwise you force the server to use hash joins (v slow) and secondly use the smallest key you can (I'm currently using a

Re: [DUG] MSSQL ID field binary(8)

2010-08-16 Thread John Bird
I think I have to agree with your words[5] and words[6] . Where - words:array[0..xxx] of string; John I work on systems where some idiot used a decimal(9,0) as a PK and mixed it with other tables with integers, I think with any PK the main thing is use the same otherwise you force the

Re: [DUG] MSSQL ID field binary(8)

2010-08-05 Thread John Bird
MessageDealing with index/ID field that is set as binary - here is the solution that worked in case any one else comes across same Note for MSSQL using such a field in a JOIN SQL statement would be perfectly fine as normal, as MSSQL has a native binary type. Delphi ADO however does not,

Re: [DUG] MSSQL ID field binary(8)

2010-08-05 Thread David Brennan
...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Friday, 6 August 2010 1:11 p.m. To: delphi@delphi.org.nz Subject: Re: [DUG] MSSQL ID field binary(8) Dealing with index/ID field that is set as binary - here is the solution that worked in case any one else comes across same

[DUG] MSSQL ID field binary(8)

2010-08-01 Thread John Bird
Dealing with a MSSQL database where the ID field is defined as Binary ( 8 ) and using D2007 / ADO. I can open the table and read in data, but I cannot figure out: 1 - how to get the ID value out of this field - when displayed a grid shows this column as (BYTES), if I try to get the value as