Well, IF64 is 1 so SZI is 8...
The problem for iad is that it should be, for 64-bit systems:
iad=: 3 : 0
ple=. 15!:6 <y NB. pointer to local entry
pa=. memr ple,(IF64{4 8), 1 4 NB. 2nd. integer is a ptr to array
''$pa+memr pa,0 1 4 NB. plus offset to data
)
or perhaps, to get a customized version:
iad=: 3 : ('ple=. 15!:6 <y';('pa=. memr ple,', (IF64{'48'), ' 1
4');'''''$pa+memr pa,0 1 4')
this is a buggy function in a public package, someone should correct it!
BTW, I've checked where iad (and vad, which is <iad) get used outside ddins:
both are used in ddparm (a top-level verb like ddins); in bindcol and dcolbind,
both used by dbind, itself used by ddbind and ddfch (another top-level verb)...
Which means that three of the "data driver utilities" listed in dd.ins won't
work if IF64!
Is anyone using these guys on J-64?
I'll be having a little fun trying to get [the rest of] ddins working... will
keep you guys posted!
Denis
> Date: Thu, 17 Jun 2010 09:16:32 +0800
> From: [email protected]
> To: [email protected]
> Subject: Re: [Jprogramming] bulk insert with ODBC (into MySQL db)
>
> > Turns out <ddins> just doesn't work on a 64bit system: it uses a
> > little verb, <iad> from packages/odbc/odbc.ijs, (same module as ins) which
> > returns the address of the first [byte of] data in a variable.
> > Now, this verb obviously still assumes 32-bit adresses and integers, so it
> > does not work in j64: it reads the 2nd integer at offset 4 rather than 8
> > and returns an 8-byte address with the LSW and MSW swapped, which gives
> > huuuuge addresses!
> >
> > I can`t see any way ddins could work with this verb! (btw, iad is
> > used by a couple of other utility verbs, so perhaps these don`t get used a
> > lot either!)
> >
> > And, If I correct <iad>, the call to SQLExecDirect a bit later does
> > return a 070001 error, about not all parameters being bound. Which is
> > pretty normal, since ddins does bother to SQLBindParam only later!
> >
> > How long ago have you checked ;-P it did work for you? And I`d like to
> > know the rationale for using SQLExecDirect there rather than wait and use
> > SQLExec after the binds?
> >
>
> I haven't actually test it for a few years, but it have been used in
> production on a daily base. If it does not work, I should receive
> complaint within a few hours.
>
> for 64-bit J, what is value of SZI you found? you might also need to
> update the base library using pacman.
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
_________________________________________________________________
Look 'em in the eye: FREE Messenger video chat
http://go.microsoft.com/?linkid=9734386
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm