Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1294

Re: Odbc and client library/drivers

Newsgroups comp.databases.ms-sqlserver
Date 2012-09-18 13:24 -0700
References <94298aed-7cbb-41f8-a155-c4632fc9db35@googlegroups.com> <XnsA0D2DF54CB785Yazorman@127.0.0.1>
Message-ID <4486daa1-575b-4713-9ca5-f4c8654eb9c8@googlegroups.com> (permalink)
Subject Re: Odbc and client library/drivers
From björn lundin <b.f.lundin@gmail.com>

Show all headers | View raw


Den tisdagen den 18:e september 2012 kl. 21:57:14 UTC+2 skrev Erland Sommarskog:
> björn lundin  writes:
> 
> 
> You should use SQL Server Native Client 10 as the ODBC driver if you 
> are on SQL 2008, not SQL Server, which is an old driver. Whether this  
> resolves the issue you are talking about I don't know. 

Sorry I did not mention that. We are on sql server 2008,
but I expect to move to 2012 fairly soon.

SQL Server Native Client 10 is the one we are using, thus 
giving me headache.

>But you should not use SELECT * in production code.

Why?

The system is in Ada, and being in Ada it is strongly typed.
That means we use some kind of struct, with members
that corresponds to the fields of a table.
We want to fill the whole struct, because i project adaptions,
they might want to use a field that we do not use in standard.
And then, we find the quality of the system increases a whole lot,
if we get all the data out, instead of just getting the data we want rigth now.
Ie fill all the struct members, or else someone will look at an empty field.
(Yes the y should check this, but experience shows otherwise)


Besides, the select * are the simple ones, since we have routines that fills that struct 
in correct order.

select a,b,c, from d 
are farr worse, since that tends to be

get(a,varA);
get(c,varC);
get(b,varB); <--fail because we got B first.


This is mostly a problem in migrating old sites,
since the select * method gets it right.

--
Björn Lundin

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-18 10:48 -0700
  Re: Odbc and client library/drivers Erland Sommarskog <esquel@sommarskog.se> - 2012-09-18 21:57 +0200
    Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-18 13:24 -0700
      Re: Odbc and client library/drivers George Neuner <gneuner2@comcast.net> - 2012-09-19 11:46 -0400
      Re: Odbc and client library/drivers Erland Sommarskog <esquel@sommarskog.se> - 2012-09-19 21:16 +0200
        Re: Odbc and client library/drivers Gene Wirchenko <genew@ocis.net> - 2012-09-19 13:14 -0700
          Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-19 13:41 -0700
            Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-19 13:45 -0700
              Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-19 13:56 -0700
                Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-19 14:00 -0700
        Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-19 13:26 -0700
          Re: Odbc and client library/drivers Erland Sommarskog <esquel@sommarskog.se> - 2012-09-19 23:44 +0200
            Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-20 01:50 -0700
              Re: Odbc and client library/drivers Erland Sommarskog <esquel@sommarskog.se> - 2012-09-20 23:31 +0200
                Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-21 01:18 -0700
                Re: Odbc and client library/drivers bradbury9 <ray.bradbury9@gmail.com> - 2012-09-21 02:57 -0700
                Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-21 03:10 -0700
                Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-21 03:14 -0700
  Re: Odbc and client library/drivers rja.carnegie@gmail.com - 2012-09-19 16:57 -0700
    Re: Odbc and client library/drivers björn lundin <b.f.lundin@gmail.com> - 2012-09-20 01:58 -0700

csiph-web