|
Using Access 2000 and ADO VC++6.0
I am executing the following statement..
VARIANT Params[2];
Params[0].vt = VT_I2; Params[0].iVal = 1;
Params[1].vt = VT_R4; Params[1].fltVal = 8.99;
m_pCommand->adCmdText = "Query4";
m_pCommand->ActiveConnection = m_pConnection;
m_pCommand->Execute(0, Params, adCmdStoredProc);
Generates an exception {DB_E_PARAMNOTOPTIONAL}
Query4 in Access is as follows:
PARAMETERS vID Short, Rad IEEESingle;
INSERT INTO TABLE1 ( ODID, MeasRadius )
VALUES (vID, Rad);
Thanks for your help in advance.
|
|
|
|
|
I have around 500 records to insert into a table in Access 2000. I am using ADO.
Is it possible to pass all of the 500 records to a query using some kind of SafeArray parameters and Insert them all at once?
Any tips how this can be accomplished ?
Thanks
|
|
|
|
|
I need to open MSWord, retrieve information from it, change some information, and then save it. All these will be done using VC++/MFC. Does anybody have some existing code which I can take a look at it?
|
|
|
|
|
hello,
I need your input/advice on a practical (and urgent) problem!
I am currently developping a time critical app on a Windows NT/2000 platform involving pseudo real-time image acquisition.
The app should be flexible, fast and implement some fault-tolerant features. For example, I want to handle 12 cameras "simultaneously" (multitasks) for an acquisition. One channel acquition task may crash. But the whole application (the remaining working channels) should NOT crash! So I thought of using different processes for each channels.
The next question was then: how do I handle (share?) huge chunk of data (512*512 RGB images), among a pool of processes under Windows NT?
Of course, an obvious solution would be to use either PIPES or SHARED MEMORY (using FileMapping). But lots of coding is necessary and I will end up with a LOT of bugs (and I must have NO MEMORY LEAKS at all, it's imperative!!).
I discovered COM, a standard way of doing what I want, but I was wondering how you transfer BIG CHUNKS of data between COM servers???
What should I use to have something efficient, but also flexible in terms of development?
Please just give me some clues!
Thanks!
Bertrand Boichon
Research Assistant
Electrical & Computer Engr
Oregon State University
|
|
|
|
|
as long as all your modules will be located on the same machine, you can just pass HGLOBAL memory handles to and from COM objects. i do it all the time.
-c
No matter how fast light travels it finds the darkness has always got there first, and is waiting for it.
-- Terry Pratchett,
|
|
|
|
|
Hi
I succesfully added new storage into MSWord compound file (and new stream inside this new storage), but the problem is that when I open this doc in MSWord, made some change and save doc, my storage and stream dissapears. I saw application that adds stream(in root storage) which is "word saving proof" but I don't know how to do this. I also encountered strange thing: when I have word doc with stream added by this application, storage and stream added by me doesn't dissapear. I don't know why this happens. Anyone have some idea how to prevent new streams and storages from deleting by Word? Thanks in advance for any hints.
Greetings
Mariusz Popiolek
|
|
|
|
|
Hi All,
I need to know the reason why the function AddRef returns a long integer?
Could somebody explain me?
|
|
|
|
|
From "Platform SDK : COM"
IUnknown::AddRef
The IUnknown::AddRef method increments the reference count for an interface on an object. It should be called for every new copy of a pointer to an interface on a given object.
ULONG AddRef(void);
Return Value
Returns an integer from 1 to n, the value of the new reference count. This information is meant to be used for diagnostic/testing purposes only, because, in certain situations, the value may be unstable.
I hope that helps.
Iain.
|
|
|
|
|
I recently accepted a project that involves writing a COM component that will be used from a Java program. Does anyone have any suggestions or links about a Java2COM bridge or examples?
With best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
|
The project I am involved with at work is using the jintegra product to do just this, not sure what your requirements are but it is working at our level, which is a ~30 engineer project, running for 1 year so far. There are few 'gotchas' relating to things like type conversions and function overloading. Our prototyping effort/trial to get up to speed was about 1 engineer for 6 weeks.
see:
http://www.linar.com/
David
|
|
|
|
|
How in the world can i get this to work
if i use IXMLDOMNode in the idl it compiles
if i use the using namespace in the c++ code i'm still good
however the headers created from the idl result in the following:
error C2872: 'IXMLDOMNode' : ambiguous symbol
Help!
|
|
|
|
|
|
I have been coding C++ for a while with ATL 3.0 and 7.0. However I cannot figure out how to access the IE com object view ATL 7. Does anyone know a good resource on this as I need to manipulate settings in the browser dynamically with a COM object. The MS Reference Library is no longer available and who knows what they will replace it with.
|
|
|
|
|
ATL has nothing to do with IE.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
|
I have an existing MFC application to which I added some ATL objects. Everything seems to work fine, except that it appears MIDL has changed property names of 'Count', 'Address', and 'Date', to 'count', 'address', and 'date' in the generated type library. Properties with other names are handled OK.
I can create a whole new ATL project from scratch and use these property names with no problem. It seems to fail only with these 'afterthought' objects.
|
|
|
|
|
It seems to me that your IDL-file contains the 'count' word as well.
For example,
[id(1)] HRESULT Test([in] IDispatch* count);<br />
<br />
[id(2),propget] HRESULT Count([out, retval] double *pVal);<br />
[id(2),propput] HRESULT Count([in] double newVal);
With best wishes,
Vita
|
|
|
|
|
IMHO, it is happened because a TLB has only one copy of words which are similar, but differ only by uppercase or lowercase letters.
With best wishes,
Vita
|
|
|
|
|
Hi guys, I have a COM question which has more to do with design than with actual code.
I have a object A and object B. Both objects have exactly the same interface, however, underneath their interface, they have different implementations.
I also have object C which needs to use the interface that both A and B expose. However, depending on some other criteria, object C needs to either use object A's implementation or use object B's implementation.
I have the following questions:
* How do I have object A and B both installed and registered on the same machine (same interfaces but different implementation). Is it OK to have a different GUID, but the same interfaces(methods, properties)?
* What is the most transparent way of making object C load a different implementation (A or B) depedning on which one it needs?
Could anyone help me with the above? Any pointers, advice, thoughts or questions will be greatly appreciated.
Jeremy.
Jeremy Pullicino
Professional C++ Developer
Done any hacking lately?
|
|
|
|
|
Oh boy!... you just cannot ask a simple question can you....
Well, first of all there is no ptoblem at all with two objects with exactly the same interface. But that is really not the main issue behind your design requirements.
Now the part of object C creating an instance of A or B, can be handled in several ways.
I don't think either Containment or Aggregation will help. (COM gurus will be able to answer that better).
So you can have a switch in your object C that either creates A or B. But that just does not look too elegant.
You could consider creating a single COM object D. D provides the COM interface to a base class Z. From Z you derive A and B which provide the different implementations for the interfaces.
Now somewhere in your COM D object you will have Z = new A or Z = new B and then you use Z->Interface().
So you have a single COM object not two. But inside the COM object you use standard OO polymorphism to handle to different implementations of A and B.
I think I may be rambling now. But you may want to think along this path.
Hope this helped.
|
|
|
|
|
If the two objects are seperate COM objects then it simply a case of each having a different Class ID (CLSID) and both supporting the same Interface ID (IID).
Your outer program can create an instance of the either object by selecting the relavent Class ID in the CoCreateInstance call
|
|
|
|
|
The previous post answers your question.
To make it even more configurable you might want to implement a CATID system
and let the objects themself decide if they are matching the critera.
|
|
|
|
|
You never let go of those damn categories do you?
--
Please state the nature of your medical emergency.
|
|
|
|