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


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

Re: Odbc and client library/drivers

Received by 10.180.107.167 with SMTP id hd7mr1189811wib.0.1348087289056; Wed, 19 Sep 2012 13:41:29 -0700 (PDT)
Received by 10.182.139.99 with SMTP id qx3mr205901obb.3.1348087288802; Wed, 19 Sep 2012 13:41:28 -0700 (PDT)
Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeeder.ewetel.de!eweka.nl!lightspeed.eweka.nl!209.85.212.216.MISMATCH!yt1no22796317wib.1!news-out.google.com!ed8ni2292956wib.0!nntp.google.com!i6no11777qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.databases.ms-sqlserver
Date Wed, 19 Sep 2012 13:41:28 -0700 (PDT)
In-Reply-To <2d9k58l3ufpbvim2n0ad7irssv0tp7frfq@4ax.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=46.195.147.193; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9
NNTP-Posting-Host 46.195.147.193
References <94298aed-7cbb-41f8-a155-c4632fc9db35@googlegroups.com> <XnsA0D2DF54CB785Yazorman@127.0.0.1> <4486daa1-575b-4713-9ca5-f4c8654eb9c8@googlegroups.com> <XnsA0D3D87BB2DB5Yazorman@127.0.0.1> <2d9k58l3ufpbvim2n0ad7irssv0tp7frfq@4ax.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <cb2be13a-c230-4e05-bd18-86798cb5d582@googlegroups.com> (permalink)
Subject Re: Odbc and client library/drivers
From björn lundin <b.f.lundin@gmail.com>
Injection-Date Wed, 19 Sep 2012 20:41:28 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.databases.ms-sqlserver:1299

Show key headers only | View raw


Den onsdagen den 19:e september 2012 kl. 22:14:36 UTC+2 skrev Gene Wirchenko:
>      In what way is it better?  It takes more memory, bandwidth, and
> time.

Indeed, but as it is more future proof. 
It handles table changes more easy.

> It would be much harder to find references to columns.
Well no.
define a struct like

type Table_A_Type is record
 Col_A : Integer;
 Col_B _ String (1..4);
end record:

 My_Table_A_Record : Table_A_Type;


 Sql.prepare(A_Select, "select * from TABLE_A"):
 Sql.Open_Cursor(A_Select);
 Sql.Fetch(A_Select,End_Of_Set);
 if not End_Of_Set then
  My_REcord := Table_A.Get(A_Select):
 end if:
 Sql.Close(A_Select);

 if My_Table_A_Rec.Col_B then 
....


Not that difficult to understand where Col_B came from?

>      get() is miswritten then.  
Nope see reply to Erland.


>I think your comment is wrong, too.
Indeed, sorry for that
 
> Your bogus code corrected is likely:
>           get(a,varA);
>           get(c,varC);
>           get(b,varB); <--fail because we got C first.
> 
>                                               ^
>      I agree with this.  I think that there is some sloppy or limited
> code between the data and the app.

Nope.
I point you to the same page as I referred Erland to.
http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html#07002

Under SqlGetData

§5 (hmm I counted to 6 before)

(DM) The application has already called SQLGetData for the current row; the number of the column specified in the current call was less than the number of the column specified in the preceding call; and the driver does not return the SQL_GD_ANY_ORDER bitmask for the SQL_GETDATA_EXTENSIONS option in SQLGetInfo.


But I am surprised that you have not run into this.

--
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