RE: EuCom

new topic     » goto parent     » topic index » view thread      » older message » newer message

10963508 at europeonline.com wrote:
> Yes that was just example, in reality I need to go thru every 
> record in
> table from first till last and check some fields, and depending on 
> value of
> those fields set value of other field in same record. That's all I 
> want to
> do.

Maybe there's a slick SQL way to do it.  If you want to email me 
privately (use matthew.w.lewis at saic.com right now, I can't get into my 
yahoo account today), I can maybe help you.

> And I can't do it in Euphoria, ODBC API is so complicated it's 
> driving
> me nuts :(. Lost whole week trying to figure it out.
> MFC wrapps ODBC API with 4000 lines file, that gives you idea how
> complicated is ODBC API.
> I thought about wrapping MFC dll, but MFC uses C++ classes so how 
> would that
> work?

Ughhh...

> Your example probably wouldn't speed things much up as you said, 
> but using
> SQLSetPos with SQL_UPDATE would.

Maybe.  If I get a chance, I'll test it to see what the speed difference 
is.

> I have this C++ code (below, it's easier in this case to test it in 
> C++) and
> it doesn't work, last SQLSetPos() fails. It gets correct data from 
> table,
> but it's unable to update it with new data. I followed example and
> instructions from MSDN exactly and it still doesn't work :(.

I don't know what to tell you about that.  But I've had similar 
experiences with other tests. :)

> Now I have these options:
> - Write this whole part in C++ and make dll out of it (I can't use 
> ADO in
> C++(had some problems), so I would need to use MFC, complications 
> again).
> - You will fix EuCom and I will use ADO.
>     (BTW Eucom crashed with Windows error on WinXP and other 
>     computer which has Win98 installed when I run comtest.exw.)

I tried your simple test on Win2000, and got a crash.  Then I included 
eucom before including the ado wrapper, and it didn't crash (although 
there were some errors).  I haven't had a chance to thoroughly 
investigate the situation, but here are some tips:
-  Make sure you wrap ado as an ActiveX object (because it is).
-  You'll need to change calls to get_dispid() to register_dispid().
-  If you actually plan to use the result of these calls, you'll need to 
add the VT_ codes for the parameters.

In general, I've found that I only use the top level objects this way.  
Most other objects get passed to you through other calls, and I've found 
it easier to use the invoke_ptr method of calling things.  I'll try to 
get a working demo out here shortly.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu