home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,753 of 19,505   
   =?ISO-8859-1?Q?bj=F6rn_lundin?= to All   
   Re: Odbc and client library/drivers   
   18 Sep 12 13:24:30   
   
   From: b.f.lundin@gmail.com   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca