Re: AW: [OLEDB_DEV] OLE DB Consumer Templates
Duncan Smith <[email protected]> Thu, 9 Jan 2003 15:20:37 -0500
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C2B81C.924AA71A
Content-Type: text/plain
I encountered this exact issue. I wanted to pass a string buffer containing
XML data to the provider using client-owned memory. The OLE DB data type I
use is DBTYPE_STR | DBTYPE_BYREF. Using the standard OLE DB consumer
template macros will result in this being provider-owned memory (see
CAccessorBase::Bind in atldbcli.h). So I created my own CAccessorBase type
class (called CAccessorBaseEx below) with 2 static methods and created my
own bind macro as follows:
// This macro is to be used in place of _COLUMN_ENTRY_CODE (in atldbcli.h)
for a parameter or
// column whose type has the DBTYPE_BYREF bit set. CAccessorBase::Bind
always sets dwMemOwner
// to DBMEMOWNER_PROVIDEROWNED if the DBTYPE_BYREF bit set. This macro
changes that behavior by
// setting dwMemOwner to the value passed as the last macro parameter.
// Use COLUMN_ENTRY_EX_BYREF instead of COLUMN_ENTRY_EX (in atldbcli.h) for
DBTYPE_BYREF entries.
#define _COLUMN_ENTRY_CODE_BYREF(nOrdinal, wType, nLength, nPrecision,
nScale, dataOffset, lengthOffset, statusOffset, dwMemOwner) \
if (pBuffer != NULL) \
{ \
if (!bClearOnly) \
CAccessorBaseEx::FreeType(wType, pBuffer + dataOffset,
dwMemOwner); \
memset(pBuffer + dataOffset, 0, nLength); \
} \
else if (pBinding != NULL) \
{ \
ATLASSERT( pColumnNames != NULL ); \
*pColumnNames = NULL; \
CAccessorBaseEx::Bind(pBinding, nOrdinal, wType, nLength,
nPrecision, nScale, eParamIO, \
dataOffset, lengthOffset, statusOffset, NULL, dwMemOwner);
\
pColumnNames++; \
pBinding++; \
} \
nColumns++;
#define COLUMN_ENTRY_EX_BYREF(nOrdinal, wType, nLength, nPrecision, nScale,
data, length, status, dwMemOwner) \
_COLUMN_ENTRY_CODE_BYREF(nOrdinal, wType, nLength, nPrecision, nScale,
offsetbuf(data), offsetbuf(length), offsetbuf(status), dwMemOwner)
class CAccessorBaseEx
{
public:
static void Bind(DBBINDING* pBinding, ULONG nOrdinal, DBTYPE wType,
ULONG nLength, BYTE nPrecision, BYTE nScale, DBPARAMIO eParamIO,
ULONG nDataOffset, ULONG nLengthOffset = NULL, ULONG
nStatusOffset = NULL,
DBOBJECT* pdbobject = NULL, DBMEMOWNER dwMemOwner =
DBMEMOWNER_CLIENTOWNED) throw()
{
ATL::CAccessorBase::Bind(
pBinding,
nOrdinal,
wType,
nLength,
nPrecision,
nScale,
eParamIO,
nDataOffset,
nLengthOffset,
nStatusOffset,
pdbobject);
pBinding->dwMemOwner = dwMemOwner;
}
static inline void FreeType(DBTYPE wType, BYTE* pValue, DBMEMOWNER
dwMemOwner) throw()
{
if ((wType & DBTYPE_BYREF) && (dwMemOwner ==
DBMEMOWNER_CLIENTOWNED))
{
void * pData = *(void **)pValue;
if (pData != NULL)
CoTaskMemFree(pData);
}
else
ATL::CAccessorBase::FreeType(wType, pValue);
}
};
Then the accessor I used has the following (the SQL Server data type I am
using is text):
char * m_pszData;
DBLENGTH m_DataLength;
DBSTATUS m_DataStatus;
...
COLUMN_ENTRY_EX_BYREF(5, DBTYPE_STR | DBTYPE_BYREF, sizeof(char *), 0, 0,
m_pszData, m_DataLength, m_DataStatus, DBMEMOWNER_CLIENTOWNED)
Hope this helps.
Duncan Smith
-----Original Message-----
From: Erik Valdes [mailto:[email protected]]
Sent: Thursday, January 09, 2003 1:17 PM
To: [email protected]
Subject: Re: [OLEDB_DEV] AW: [OLEDB_DEV] OLE DB Consumer Templates
Hi,
I see what you mean about MS recommending the storage object way. I've
found a lot of articles describing that. However, I'm having trouble
finding anything that gives an example of how to do the in-memory way.
Perhaps someone could point me to an example or a how-to document? I'd
really appreciate it.
Thanks,
Erik
-----Original Message-----
From: Yuancai Ye [mailto:[email protected] <mailto:[email protected]> ]
Sent: Thursday, January 09, 2003 9:57 AM
To: [email protected]
Subject: Re: [OLEDB_DEV] AW: [OLEDB_DEV] OLE DB Consumer Templates
Hi,
MS recommends us to use storage object for sending
a BLOB into a data source. However, as I tested, this
way is bad in many cases since your code needs to
create a store object and database needs to recover
binnary data from the store object. You'd better use
in-memory way to send BLOB for faster speed. With use
of in-memory way, the previous two extra steps are
avoided. Therefore, in-memory way is faster. That is
my guess. Test it yourself.
Regards,
Yuancai (Charlie) Ye
--- Rudolf Wiener <[email protected]> wrote:
> Erik,
>
> For reading and writing blobs, which is what you're
> in fact using, I use the
> technologies recommended and stream the data with a
> storage object. The
> macro I use in the accessor is
> BLOB_ENTRY_LENGTH_STATUS. I'm not sure if
> this is the best way to do it because I have the
> impression it slows things
> down a bit. But I haven't had the time yet to look
> into faster alternatives.
>
> If you like I can send you excerpts from my app's
> code.
>
> Regards
> Rudi
>
> -----Urspr黱gliche Nachricht-----
> Von: OLEDB_DEV
> [mailto:[email protected]
<mailto:[email protected]> ]Im Auftrag von
> Erik
> Valdes
> Gesendet: Donnerstag, 09. J鋘ner 2003 17:22
> An: [email protected]
> Betreff: Re: [OLEDB_DEV] OLE DB Consumer Templates
>
>
> The reason I can't allocate on the stack is that
> my variable can be any
> length. It essentially boils down to the string
> representation of an xml
> file. That file can be any size. When I pass it to
> my SP, the sp's
> parameter is ntext (to allow for any size). What
> do people do when they
> want to pass XML of unknown length to a SQL Server
> stored procedure?
>
>
>
> -----Original Message-----
> From: Peter Moss [mailto:[email protected] <mailto:[email protected]> ]
> Sent: Thursday, January 09, 2003 7:58 AM
> To: [email protected]
> Subject: Re: [OLEDB_DEV] OLE DB Consumer Templates
>
>
>
> If I remember right, you can't use the macros for
> heap-allocated
> variables. If you dig into the macro definitions, I
> believe you will find
> that pointers offset from the beginning of 'this'
> are used. Thus, a
> heap-allocated variable like m_WorkRequest will not
> work.
>
>
>
> Why can't you just allocate a TCHAR on the stack
> frame of the object, ie,
>
>
>
> TCHAR m_WorkRequest[257]; // Or 1 + the size
> of your SP parameter size
>
>
>
> Then you can just use COLUMN_ENTRY.
>
>
>
> HTH,
>
> Peter
>
> -----Original Message-----
> From: OLEDB_DEV
> [mailto:[email protected]
<mailto:[email protected]> ]On Behalf Of
> Erik
> Valdes
> Sent: Wednesday, January 08, 2003 5:22 PM
> To: [email protected]
> Subject: [OLEDB_DEV] OLE DB Consumer Templates
>
> I'm having trouble implementing an accessor.
> I'm trying to use a
> variable (m_WorkRequest) that's dynamically
> allocated as the variable that's
> bound to a parameter in my accessor (commented line
> below). The reason I
> need it to be dynamic is that it is XML and can be
> any length. The stored
> proc's parameter is of ntext type to handle the
> variable length. However, I
> don't know at compile time how big to make the
> buffer for my parameter in my
> accessor. What's the proper way to do this? I've
> tried COLUMN_ENTRY
> (access violation), COLUMN_ENTRY_LENGTH (different
> variations produce
> different errors, but basically I can't set the
> length),
> COLUMN_ENTRY_TYPE_SIZE (similar problems as the
> previous). I'm running out
> of ideas now. The code below is just one of many,
> many variations I've
> tried.
>
>
>
>
>
> class CAddWorkRequest
>
> {
>
> public:
>
> CAddWorkRequest() STD_INIT
>
> ~CAddWorkRequest()
>
> {
>
> if (m_WorkRequest)
>
> delete [] m_WorkRequest;
>
> }
>
> LONG m_RETURNVALUE;
>
> LPTSTR m_WorkRequest;
>
> LONG m_lLength;
>
>
>
> void SetStringParam(LPCTSTR szString,int
> cBytes)
>
> {
>
> m_WorkRequest = (LPTSTR) new
> TCHAR[cBytes];
>
> _tcsncpy(m_WorkRequest,szString,cBytes);
>
> m_lLength = _tcslen(m_WorkRequest);
>
> })
>
>
>
> BEGIN_PARAM_MAP(CAddWorkRequest)
>
> SET_PARAM_TYPE(DBPARAMIO_OUTPUT)
>
> COLUMN_ENTRY(1, m_RETURNVALUE)
>
> SET_PARAM_TYPE(DBPARAMIO_INPUT)
>
> //
>
COLUMN_ENTRY_TYPE_SIZE(2,DBTYPE_STR,_tcslen(m_WorkRequest),
> m_WorkRequest)
>
>
>
>
>
> END_PARAM_MAP()
>
>
>
> DEFINE_COMMAND(CAddWorkRequest, _T("{ ? = CALL
> dbo.AddWorkRequest;1
> (?) }"))
>
>
>
> };
>
>
>
> class CAddWorkRequestCommand : public
> CBsDbCommand<CAddWorkRequest>
>
> {
>
> };
>
>
>
> foo (LPTSTR szWor)
>
> {
>
>
=== message truncated ===
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com <http://mailplus.yahoo.com>
You can read messages from the OLEDB_DEV archive, unsubscribe from
OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com
<http://discuss.develop.com> .
You can read messages from the OLEDB_DEV archive, unsubscribe from
OLEDB_DEV, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.
You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.
------_=_NextPart_001_01C2B81C.924AA71A
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:[email protected]">
<title>RE: [OLEDB_DEV] AW: [OLEDB_DEV] OLE DB Consumer =
Templates</title>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:navy;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dblue =
style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I encountered this exact issue. I wanted to pass a =
string
buffer containing XML data to the provider using client-owned memory. =
The OLE
DB data type I use is DBTYPE_STR | DBTYPE_BYREF. Using the standard OLE =
DB
consumer template macros will result in this being provider-owned =
memory (see <span
class=3DSpellE>CAccessorBase::Bind</span> in <span =
class=3DSpellE>atldbcli.h</span>).
So I created my own <span class=3DSpellE>CAccessorBase</span> type =
class (called <span
class=3DSpellE>CAccessorBaseEx</span> below) with 2 static methods and =
created my
own bind macro as follows:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dgreen face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:green'>// <span class=3DGramE>This</span> macro is =
to be used
in place of _COLUMN_ENTRY_CODE (in <span =
class=3DSpellE>atldbcli.h</span>) for a
parameter or<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dgreen face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:green'>// column whose type has the DBTYPE_BYREF =
bit set. <span
class=3DSpellE>CAccessorBase::Bind</span> always sets <span =
class=3DSpellE>dwMemOwner</span><o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dgreen face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:green'>// to DBMEMOWNER_PROVIDEROWNED if the =
DBTYPE_BYREF
bit set. This macro changes that behavior =
by<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dgreen face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:green'>// setting <span =
class=3DSpellE>dwMemOwner</span> to
the value passed as the last macro =
parameter.<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dgreen face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:green'>// Use COLUMN_ENTRY_EX_BYREF instead of
COLUMN_ENTRY_EX (in <span class=3DSpellE>atldbcli.h</span>) for =
DBTYPE_BYREF
entries.<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dblue face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:blue'>#define</span></font><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier New"'> =
_COLUMN_ENTRY_CODE_<span
class=3DGramE>BYREF(</span><span class=3DSpellE>nOrdinal</span>, <span
class=3DSpellE>wType</span>, <span class=3DSpellE>nLength</span>, <span
class=3DSpellE>nPrecision</span>, <span class=3DSpellE>nScale</span>, =
<span
class=3DSpellE>dataOffset</span>, <span =
class=3DSpellE>lengthOffset</span>, <span
class=3DSpellE>statusOffset</span>, <span =
class=3DSpellE>dwMemOwner</span>) \<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>if</span></font></span> (<span
class=3DSpellE>pBuffer</span> !=3D NULL) \<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span>{ =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>if</span></font></span>
(!<span class=3DSpellE>bClearOnly</span>) =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE>CAccessorBaseEx::<span =
class=3DGramE>FreeType</span></span><span
class=3DGramE>(</span><span class=3DSpellE>wType</span>, <span =
class=3DSpellE>pBuffer</span>
+ <span class=3DSpellE>dataOffset</span>, <span =
class=3DSpellE>dwMemOwner</span>);
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>memset</span></span><span =
class=3DGramE>(</span><span
class=3DSpellE>pBuffer</span> + <span class=3DSpellE>dataOffset</span>, =
0, <span
class=3DSpellE>nLength</span>); \<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span>} =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>else</span></font></span>
<font color=3Dblue><span style=3D'color:blue'>if</span></font> (<span =
class=3DSpellE>pBinding</span>
!=3D NULL) \<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span>{ =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DGramE>ATLASSERT(</span> <span =
class=3DSpellE>pColumnNames</span> !=3D NULL );
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>*<span
class=3DSpellE>pColumnNames</span> =3D NULL; =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE>CAccessorBaseEx::<span =
class=3DGramE>Bind</span></span><span
class=3DGramE>(</span><span class=3DSpellE>pBinding</span>, <span =
class=3DSpellE>nOrdinal</span>,
<span class=3DSpellE>wType</span>, <span class=3DSpellE>nLength</span>, =
<span
class=3DSpellE>nPrecision</span>, <span class=3DSpellE>nScale</span>, =
<span
class=3DSpellE>eParamIO</span>, \<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>dataOffset</span></span>, <span =
class=3DSpellE>lengthOffset</span>,
<span class=3DSpellE>statusOffset</span>, NULL, <span =
class=3DSpellE>dwMemOwner</span>);
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>pColumnNames</span></span>++; =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>pBinding</span></span>++; =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span>} =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DSpellE><span =
class=3DGramE>nColumns</span></span>++;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 color=3Dblue face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:
"Courier New";color:blue'>#define</span></font><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier New"'> =
COLUMN_ENTRY_EX_<span
class=3DGramE>BYREF(</span><span class=3DSpellE>nOrdinal</span>, <span
class=3DSpellE>wType</span>, <span class=3DSpellE>nLength</span>, <span
class=3DSpellE>nPrecision</span>, <span class=3DSpellE>nScale</span>, =
data, length,
status, <span class=3DSpellE>dwMemOwner</span>) =
\<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>_COLUMN_ENTRY_CODE_<span
class=3DGramE>BYREF(</span><span class=3DSpellE>nOrdinal</span>, <span
class=3DSpellE>wType</span>, <span class=3DSpellE>nLength</span>, <span
class=3DSpellE>nPrecision</span>, <span class=3DSpellE>nScale</span>, =
<span
class=3DSpellE>offsetbuf</span>(data), <span =
class=3DSpellE>offsetbuf</span>(length),
<span class=3DSpellE>offsetbuf</span>(status), <span =
class=3DSpellE>dwMemOwner</span>)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D2 color=3Dblue face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier =
New";color:blue'>class</span></font></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
<span =
class=3DSpellE>CAccessorBaseEx</span><o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>{<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D2 color=3Dblue face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier =
New";color:blue'>public</span></font></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>:<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>static</span></font></span>
<font color=3Dblue><span style=3D'color:blue'>void</span></font> =
Bind(DBBINDING* <span
class=3DSpellE>pBinding</span>, ULONG <span =
class=3DSpellE>nOrdinal</span>, DBTYPE <span
class=3DSpellE>wType</span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>ULONG
<span class=3DSpellE>nLength</span>, BYTE <span =
class=3DSpellE>nPrecision</span>,
BYTE <span class=3DSpellE>nScale</span>, DBPARAMIO <span =
class=3DSpellE>eParamIO</span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>ULONG
<span class=3DSpellE>nDataOffset</span>, ULONG <span =
class=3DSpellE>nLengthOffset</span>
=3D NULL, ULONG <span class=3DSpellE>nStatusOffset</span> =3D =
NULL,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>DBOBJECT*
<span class=3DSpellE>pdbobject</span> =3D NULL, DBMEMOWNER <span =
class=3DSpellE>dwMemOwner</span>
=3D DBMEMOWNER_CLIENTOWNED) <span class=3DGramE><font =
color=3Dblue><span
style=3D'color:blue'>throw</span></font>()</span><o:p></o:p></span></fon=
t></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>{<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE>ATL:<span =
class=3DGramE>:CAccessorBase</span>::Bind</span>(<o:p></o:p></span></fon=
t></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>pBinding</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nOrdinal</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>wType</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nLength</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'mso-layout-grid-align:none;text-autospace:=
none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nPrecision</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nScale</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>eParamIO</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nDataOffset</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nLengthOffset</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE><span =
class=3DGramE>nStatusOffset</span></span>,<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
style=3D'mso-tab-count:1'> </span><span
class=3DSpellE><span =
class=3DGramE>pdbobject</span></span>);<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>pBinding</span></span>-><span =
class=3DSpellE>dwMemOwner</span>
=3D <span =
class=3DSpellE>dwMemOwner</span>;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt;font-famil=
y:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>static</span></font></span>
<font color=3Dblue><span style=3D'color:blue'>inline</span></font> =
<font
color=3Dblue><span style=3D'color:blue'>void</span></font> <span =
class=3DSpellE>FreeType</span>(DBTYPE
<span class=3DSpellE>wType</span>, BYTE* <span =
class=3DSpellE>pValue</span>,
DBMEMOWNER <span class=3DSpellE>dwMemOwner</span>) <font =
color=3Dblue><span
style=3D'color:blue'>throw</span></font>()<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>{<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>if</span></font></span>
((<span class=3DSpellE>wType</span> & DBTYPE_BYREF) && =
(<span
class=3DSpellE>dwMemOwner</span> =3D=3D =
DBMEMOWNER_CLIENTOWNED))<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>{<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>void</span></font></span>
* <span class=3DSpellE>pData</span> =3D *(<font color=3Dblue><span =
style=3D'color:blue'>void</span></font>
**)<span class=3DSpellE>pValue</span>;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>if</span></font></span> (<span
class=3DSpellE>pData</span> !=3D NULL)<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:4'> &nbs=
p; &nbs=
p; </span><span
class=3DSpellE><span class=3DGramE>CoTaskMemFree</span></span><span =
class=3DGramE>(</span><span
class=3DSpellE>pData</span>);<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:2'> &nbs=
p; </span><span
class=3DGramE><font color=3Dblue><span style=3D'color:blue'>else</span><=
/font></span><font
color=3Dblue><span =
style=3D'color:blue'><o:p></o:p></span></font></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:3'> &nbs=
p; </span><span
class=3DSpellE>ATL:<span =
class=3DGramE>:CAccessorBase</span>::FreeType</span>(<span
class=3DSpellE>wType</span>, <span =
class=3DSpellE>pValue</span>);<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>};<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Then the <span class=3DSpellE>accessor</span> I used =
has the
following (the SQL Server data type I am using is =
text):<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> </span><span
class=3DGramE><font color=3Dblue><span =
style=3D'color:blue'>char</span></font></span>
*<span style=3D'mso-tab-count:1'> =
</span><span
class=3DSpellE>m_pszData</span>;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>DBLENGTH<span
style=3D'mso-tab-count:1'> </span><span =
class=3DSpellE>m_DataLength</span>;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'><span
style=3D'mso-tab-count:1'> =
</span>DBSTATUS<span
style=3D'mso-tab-count:1'> </span><span =
class=3DSpellE>m_DataStatus</span>;<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>...<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'text-indent:.5in;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>COLUMN_ENTRY_EX_<span =
class=3DGramE>BYREF(</span>5,
DBTYPE_STR | DBTYPE_BYREF, <span class=3DSpellE><font =
color=3Dblue><span
style=3D'color:blue'>sizeof</span></font></span>(<font =
color=3Dblue><span
style=3D'color:blue'>char</span></font> *), 0, 0, <span =
class=3DSpellE>m_pszData</span>,
<span class=3DSpellE>m_DataLength</span>, <span =
class=3DSpellE>m_DataStatus</span>,
DBMEMOWNER_CLIENTOWNED)<o:p></o:p></span></font></p>
<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:Arial;mso-bidi-font-family:"Times =
New Roman"'>Hope
this helps.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><st1:PersonName><font size=3D2 face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'>Duncan =
Smith</span></font></st1:PersonName><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;
font-family:Arial;mso-bidi-font-family:"Times New =
Roman"'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>=
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Erik Valdes
[mailto:[email protected]] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, January =
09, 2003
1:17 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
[email protected]<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Re: [OLEDB_DEV] =
AW:
[OLEDB_DEV] OLE DB Consumer Templates</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>Hi,</span></font> <o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>I see what you mean about MS recommending =
the storage
object way. I've found a lot of articles describing that. =
However,
I'm having trouble finding anything that gives an example of how to do =
the
in-memory way. Perhaps someone could point me to an example or a =
how-to
document? I'd really appreciate it. =
</span></font><o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>Thanks,</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>Erik</span></font> =
<o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>-----Original Message-----</span></font> =
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>From: Yuancai Ye [<a
href=3D"mailto:[email protected]">mailto:[email protected]</a>] =
</span></font><br>
<font size=3D2><span style=3D'font-size:10.0pt'>Sent: Thursday, January =
09, 2003
9:57 AM</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>To: =
[email protected]</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>Subject: Re: =
[OLEDB_DEV] AW:
[OLEDB_DEV] OLE DB Consumer Templates</span></font> <o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>Hi,</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'> MS =
recommends us
to use storage object for sending</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>a BLOB into a data =
source. However,
as I tested, this</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>way is bad in many =
cases since your
code needs to</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>create a store object =
and database
needs to recover</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>binnary data from the =
store object.
You'd better use</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>in-memory way to send =
BLOB for
faster speed. With use</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>of in-memory way, the =
previous two
extra steps are</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>avoided. Therefore, =
in-memory way
is faster. That is</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>my guess. Test it =
yourself.</span></font>
<o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>Regards,</span></font> <o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>Yuancai (Charlie) Ye</span></font> =
<o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>--- Rudolf Wiener <[email protected]> =
wrote:</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Erik,</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> For reading and =
writing blobs,
which is what you're</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> in fact using, I =
use the</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> technologies =
recommended and
stream the data with a</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> storage object. =
The</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> macro I use in the =
accessor is</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
BLOB_ENTRY_LENGTH_STATUS. I'm
not sure if</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> this is the best =
way to do it
because I have the</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> impression it =
slows things</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> down a bit. But I =
haven't had
the time yet to look</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> into faster =
alternatives.</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> If you like I can =
send you
excerpts from my app's</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
code.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Regards</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Rudi</span></font> =
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>>
-----Urspr&#40689;gliche Nachricht-----</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Von: =
OLEDB_DEV</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> [<a
href=3D"mailto:[email protected]">mailto:[email protected]=
evelop.com</a>]Im
Auftrag von</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Erik</span></font> =
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Valdes</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Gesendet:
Donnerstag, 09. J&#37592;ner 2003 17:22</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> An:
[email protected]</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Betreff: Re:
[OLEDB_DEV] OLE DB Consumer Templates</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> The =
reason I can't
allocate on the stack is that</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> my variable can be =
any</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> length. It =
essentially
boils down to the string</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> representation of =
an xml</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> file. That =
file can be
any size. When I pass it to</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> my SP, the =
sp's</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> parameter is ntext =
(to allow for
any size). What</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> do people do when =
they</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> want to pass XML =
of unknown
length to a SQL Server</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> stored =
procedure?</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
-----Original
Message-----</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> From: =
Peter Moss [<a
href=3D"mailto:[email protected]">mailto:[email protected]</a>]</span></fo=
nt> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Sent: =
Thursday,
January 09, 2003 7:58 AM</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> To:
[email protected]</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Subject: Re:
[OLEDB_DEV] OLE DB Consumer Templates</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> If I =
remember
right, you can't use the macros for</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
heap-allocated</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> variables. =
If you dig
into the macro definitions, I</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> believe you will =
find</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> that pointers =
offset from the
beginning of 'this'</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> are used. =
Thus, a</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> heap-allocated =
variable like
m_WorkRequest will not</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
work.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Why =
can't you just
allocate a TCHAR on the stack</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> frame of the =
object, ie,</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> TCHAR
m_WorkRequest[257]; // Or 1 + the =
size</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> of your SP =
parameter size</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Then =
you can just
use COLUMN_ENTRY.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
HTH,</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Peter</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>
-----Original Message-----</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> &n=
bsp; From:
OLEDB_DEV</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> [<a
href=3D"mailto:[email protected]">mailto:[email protected]=
EVELOP.COM</a>]On
Behalf Of</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> Erik</span></font> =
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
Valdes</span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> Sent:
Wednesday, January 08, 2003 5:22 PM</span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> To:
[email protected]</span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> Subject:
[OLEDB_DEV] OLE DB Consumer Templates</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> I'm
having trouble implementing an accessor.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> I'm trying to use =
a</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> variable =
(m_WorkRequest)
that's dynamically</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> allocated as the =
variable
that's</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> bound to a =
parameter in my
accessor (commented line</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
below). The reason
I</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> need it to be =
dynamic is that
it is XML and can be</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> any length. =
The stored</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> proc's parameter =
is of ntext
type to handle the</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> variable =
length.
However, I</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> don't know at =
compile time how
big to make the</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> buffer for my =
parameter in my</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> accessor. =
What's the
proper way to do this? I've</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> tried =
COLUMN_ENTRY</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> (access =
violation),
COLUMN_ENTRY_LENGTH (different</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> variations =
produce</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> different errors, =
but
basically I can't set the</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
length),</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
COLUMN_ENTRY_TYPE_SIZE
(similar problems as the</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> previous). =
I'm running
out</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> of ideas =
now. The code
below is just one of many,</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> many variations =
I've</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
tried.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> class
CAddWorkRequest</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> {</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>
public:</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
CAddWorkRequest() STD_INIT</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
~CAddWorkRequest()</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
{</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
if (m_WorkRequest)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
delete [] m_WorkRequest;</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
}</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
LONG m_RETURNVALUE;</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
LPTSTR m_WorkRequest;</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
LONG m_lLength;</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
void SetStringParam(LPCTSTR szString,int</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
cBytes)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
{</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
m_WorkRequest =3D (LPTSTR) new</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
TCHAR[cBytes];</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
_tcsncpy(m_WorkRequest,szString,cBytes);</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
m_lLength =3D _tcslen(m_WorkRequest);</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
})</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>
BEGIN_PARAM_MAP(CAddWorkRequest)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
SET_PARAM_TYPE(DBPARAMIO_OUTPUT)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
COLUMN_ENTRY(1, m_RETURNVALUE)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>  =
;
SET_PARAM_TYPE(DBPARAMIO_INPUT)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> =
//</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>COLUMN_ENTRY_TYPE_SIZE(2,DBTYPE_STR,_tcslen(m=
_WorkRequest),</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
m_WorkRequest)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>
END_PARAM_MAP()</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>>
DEFINE_COMMAND(CAddWorkRequest, _T("{ ? =3D CALL</span></font> =
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
dbo.AddWorkRequest;1</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>> (?) =
}"))</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> =
};</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> class
CAddWorkRequestCommand : public</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>> =
CBsDbCommand<CAddWorkRequest></span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> {</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> =
};</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> foo
(LPTSTR szWor)</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span =
style=3D'font-size:10.0pt'>> {</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>></span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>=3D=3D=3D message =
truncated =3D=3D=3D</span></font>
<o:p></o:p></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>_____________________________________________=
_____</span></font>
<br>
<font size=3D2><span style=3D'font-size:10.0pt'>Do you =
Yahoo!?</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>Yahoo! Mail Plus - =
Powerful.
Affordable. Sign up now.</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'><a =
href=3D"http://mailplus.yahoo.com"
target=3D"_blank">http://mailplus.yahoo.com</a></span></font> =
<o:p></o:p></p>
<p style=3D'margin-left:.5in'><font size=3D2 face=3D"Times New =
Roman"><span
style=3D'font-size:10.0pt'>You can read messages from the OLEDB_DEV =
archive,
unsubscribe from OLEDB_DEV,</span></font> <br>
<font size=3D2><span style=3D'font-size:10.0pt'>or subscribe to other =
DevelopMentor
lists at <a href=3D"http://discuss.develop.com" =
target=3D"_blank">http://discuss.develop.com</a>.</span></font>
<o:p></o:p></p>
</div>
</body>
You can read messages from the OLEDB_DEV archive, unsubscribe from =
OLEDB_DEV,
or subscribe to other DevelopMentor lists at =
http://discuss.develop.com.
</html>
You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.
------_=_NextPart_001_01C2B81C.924AA71A--