Re: CADORecordBinding



For binding recordset values, can i use CString(or my own data types)
instead of char array

I don't think you can because you are lying to the CADORecordBinding class.
You say str is of type adChar, and yet you _DO NOT_ provide a char type.
RecordBinding works because there is a 1-1 relationship between ADO data
types and C++ data types.
There is no such relationship between CString and ADO data types.

the reason i need to do this way is that i have all my datamembers in
another structure. i don't want to change the whole thing to char array
etc.
any idea?

Well don't. Provide a conversion constructor for your struct that takes the
recordbinding struct as an argument.

Stephen Howe






.



Relevant Pages

  • Re: structs for data transfer?
    ... > should then be able to contain some information whose layout depends on ... >} MsgCoreInfoStruct; ... Write some code to convert the struct you want to send into a char array. ...
    (comp.lang.cpp)
  • Re: structs for data transfer?
    ... > John Harrison wrote: ... >> Write some code to convert the struct you want to send into a char array. ... or sentinels and delimeters for the ends of strings. ...
    (comp.lang.cpp)
  • Re: struct with fixed size
    ... > i didnt checked it because i tried to assign char array that is 22 bytes ... > long and it didnt caused any problem and so i told it didnt allocates 20 ... returns the marshaled length in bytes of the struct tt which is 32. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: store contents of structure into an array
    ... > see if i want to copy the contents of a char arrary into a equally ... > size struct, assuming that the structure has no holes, padding etc., i ... potential alignment problems: if the alignment requirement ... > the structure to an char array. ...
    (comp.lang.c)