Re: How do I get data from buffer after call to IRows et GetData?
Carl McClellan <[email protected]> Wed, 24 Apr 2002 18:26:39 -0400
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <D14D95745752104AA47F7D338026151B1214CE@cltvelc001.velsol.ireadyworld.com> |
Well, I kinda figured out a way to do it but I dont really like it. I figured out that money types in SQL Server correspond to DBTYPE_CY which really use an eight byte (UI8) representation. I used the C++ datatype CURRENCY to extract the data out and called VarR8FromCy to convert the CURRENCY type to double. This seems to work nicely. What I really wanted to do was to set up my DBBINDING struct to 'tell' the service provider to do the conversion for me. That is, once I get the columninfo, I would set the wType (in my bindings) to DBTYPE_R8 whenever I got a column with a type of DBTYPE_CY. Of course, there is no conversion for this on the provider side, as there is only a (safe) conversion to DBTYPE_I8 ...duh! Why do I have to do all the work? , lol - I know that there must be a way to specify the conversion (other than specifying a 50 char string or something).... But since I am short on time - I am going to convert myself with VarR8FromCy.....