Re: AW: [OLEDB_DEV] OLE DB Consumer Templates

Erik Valdes <[email protected]> Thu, 9 Jan 2003 11:17:07 -0700
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_01C2B80B.51AA46E0
Content-Type: text/plain

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]]
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&#40689;gliche Nachricht-----
>   Von: OLEDB_DEV
> [mailto:[email protected]]Im Auftrag von
> Erik
> Valdes
>   Gesendet: Donnerstag, 09. J&#37592;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]]
>   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]]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

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_01C2B80B.51AA46E0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [OLEDB_DEV] AW: [OLEDB_DEV] OLE DB Consumer =
Templates</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi,</FONT>
</P>

<P><FONT SIZE=3D2>I see what you mean about MS recommending the storage =
object way.&nbsp; I've found a lot of articles describing that.&nbsp; =
However, I'm having trouble finding anything that gives an example of =
how to do the in-memory way.&nbsp; Perhaps someone could point me to an =
example or a how-to document?&nbsp; I'd really appreciate it.&nbsp; =
</FONT></P>

<P><FONT SIZE=3D2>Thanks,</FONT>
<BR><FONT SIZE=3D2>Erik</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Yuancai Ye [<A =
HREF=3D"mailto:[email protected]">mailto:[email protected]</A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, January 09, 2003 9:57 AM</FONT>
<BR><FONT SIZE=3D2>To: [email protected]</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [OLEDB_DEV] AW: [OLEDB_DEV] OLE DB =
Consumer Templates</FONT>
</P>

<P><FONT SIZE=3D2>Hi,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; MS recommends us to use storage =
object for sending</FONT>
<BR><FONT SIZE=3D2>a BLOB into a data source. However, as I tested, =
this</FONT>
<BR><FONT SIZE=3D2>way is bad in many cases since your code needs =
to</FONT>
<BR><FONT SIZE=3D2>create a store object and database needs to =
recover</FONT>
<BR><FONT SIZE=3D2>binnary data from the store object. You'd better =
use</FONT>
<BR><FONT SIZE=3D2>in-memory way to send BLOB for faster speed. With =
use</FONT>
<BR><FONT SIZE=3D2>of in-memory way, the previous two extra steps =
are</FONT>
<BR><FONT SIZE=3D2>avoided. Therefore, in-memory way is faster. That =
is</FONT>
<BR><FONT SIZE=3D2>my guess. Test it yourself.</FONT>
</P>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>

<P><FONT SIZE=3D2>Yuancai (Charlie) Ye</FONT>
</P>

<P><FONT SIZE=3D2>--- Rudolf Wiener &lt;[email protected]&gt; =
wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; Erik,</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; For reading and writing blobs, which is what =
you're</FONT>
<BR><FONT SIZE=3D2>&gt; in fact using, I use the</FONT>
<BR><FONT SIZE=3D2>&gt; technologies recommended and stream the data =
with a</FONT>
<BR><FONT SIZE=3D2>&gt; storage object. The</FONT>
<BR><FONT SIZE=3D2>&gt; macro I use in the accessor is</FONT>
<BR><FONT SIZE=3D2>&gt; BLOB_ENTRY_LENGTH_STATUS. I'm not sure =
if</FONT>
<BR><FONT SIZE=3D2>&gt; this is the best way to do it because I have =
the</FONT>
<BR><FONT SIZE=3D2>&gt; impression it slows things</FONT>
<BR><FONT SIZE=3D2>&gt; down a bit. But I haven't had the time yet to =
look</FONT>
<BR><FONT SIZE=3D2>&gt; into faster alternatives.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; If you like I can send you excerpts from my =
app's</FONT>
<BR><FONT SIZE=3D2>&gt; code.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; Regards</FONT>
<BR><FONT SIZE=3D2>&gt; Rudi</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; -----Urspr&amp;#40689;gliche =
Nachricht-----</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Von: OLEDB_DEV</FONT>
<BR><FONT SIZE=3D2>&gt; [<A =
HREF=3D"mailto:[email protected]">mailto:[email protected]=
evelop.com</A>]Im Auftrag von</FONT>
<BR><FONT SIZE=3D2>&gt; Erik</FONT>
<BR><FONT SIZE=3D2>&gt; Valdes</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Gesendet: Donnerstag, 09. =
J&amp;#37592;ner 2003 17:22</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; An: =
[email protected]</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Betreff: Re: [OLEDB_DEV] OLE DB =
Consumer Templates</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; The reason I can't allocate on the =
stack is that</FONT>
<BR><FONT SIZE=3D2>&gt; my variable can be any</FONT>
<BR><FONT SIZE=3D2>&gt; length.&nbsp; It essentially boils down to the =
string</FONT>
<BR><FONT SIZE=3D2>&gt; representation of an xml</FONT>
<BR><FONT SIZE=3D2>&gt; file.&nbsp; That file can be any size.&nbsp; =
When I pass it to</FONT>
<BR><FONT SIZE=3D2>&gt; my SP, the sp's</FONT>
<BR><FONT SIZE=3D2>&gt; parameter is ntext (to allow for any =
size).&nbsp;&nbsp; What</FONT>
<BR><FONT SIZE=3D2>&gt; do people do when they</FONT>
<BR><FONT SIZE=3D2>&gt; want to pass XML of unknown length to a SQL =
Server</FONT>
<BR><FONT SIZE=3D2>&gt; stored procedure?</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; From: Peter Moss [<A =
HREF=3D"mailto:[email protected]">mailto:[email protected]</A>]</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Sent: Thursday, January 09, 2003 =
7:58 AM</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; To: =
[email protected]</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Subject: Re: [OLEDB_DEV] OLE DB =
Consumer Templates</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; If I remember right, you can't use =
the macros for</FONT>
<BR><FONT SIZE=3D2>&gt; heap-allocated</FONT>
<BR><FONT SIZE=3D2>&gt; variables.&nbsp; If you dig into the macro =
definitions, I</FONT>
<BR><FONT SIZE=3D2>&gt; believe you will find</FONT>
<BR><FONT SIZE=3D2>&gt; that pointers offset from the beginning of =
'this'</FONT>
<BR><FONT SIZE=3D2>&gt; are used.&nbsp; Thus, a</FONT>
<BR><FONT SIZE=3D2>&gt; heap-allocated variable like m_WorkRequest will =
not</FONT>
<BR><FONT SIZE=3D2>&gt; work.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Why can't you just allocate a TCHAR =
on the stack</FONT>
<BR><FONT SIZE=3D2>&gt; frame of the object, ie,</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; TCHAR =
m_WorkRequest[257];&nbsp;&nbsp;&nbsp;&nbsp; // Or 1 + the size</FONT>
<BR><FONT SIZE=3D2>&gt; of your SP parameter size</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Then you can just use =
COLUMN_ENTRY.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; HTH,</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; Peter</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -----Original =
Message-----</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; From: OLEDB_DEV</FONT>
<BR><FONT SIZE=3D2>&gt; [<A =
HREF=3D"mailto:[email protected]">mailto:[email protected]=
EVELOP.COM</A>]On Behalf Of</FONT>
<BR><FONT SIZE=3D2>&gt; Erik</FONT>
<BR><FONT SIZE=3D2>&gt; Valdes</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Sent: Wednesday, =
January 08, 2003 5:22 PM</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; To: =
[email protected]</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Subject: [OLEDB_DEV] =
OLE DB Consumer Templates</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I'm having trouble =
implementing an accessor.</FONT>
<BR><FONT SIZE=3D2>&gt; I'm trying to use a</FONT>
<BR><FONT SIZE=3D2>&gt; variable (m_WorkRequest) that's =
dynamically</FONT>
<BR><FONT SIZE=3D2>&gt; allocated as the variable that's</FONT>
<BR><FONT SIZE=3D2>&gt; bound to a parameter in my accessor (commented =
line</FONT>
<BR><FONT SIZE=3D2>&gt; below).&nbsp;&nbsp; The reason I</FONT>
<BR><FONT SIZE=3D2>&gt; need it to be dynamic is that it is XML and can =
be</FONT>
<BR><FONT SIZE=3D2>&gt; any length.&nbsp; The stored</FONT>
<BR><FONT SIZE=3D2>&gt; proc's parameter is of ntext type to handle =
the</FONT>
<BR><FONT SIZE=3D2>&gt; variable length.&nbsp; However, I</FONT>
<BR><FONT SIZE=3D2>&gt; don't know at compile time how big to make =
the</FONT>
<BR><FONT SIZE=3D2>&gt; buffer for my parameter in my</FONT>
<BR><FONT SIZE=3D2>&gt; accessor.&nbsp; What's the proper way to do =
this?&nbsp; I've</FONT>
<BR><FONT SIZE=3D2>&gt; tried COLUMN_ENTRY</FONT>
<BR><FONT SIZE=3D2>&gt; (access violation), COLUMN_ENTRY_LENGTH =
(different</FONT>
<BR><FONT SIZE=3D2>&gt; variations produce</FONT>
<BR><FONT SIZE=3D2>&gt; different errors, but basically I can't set =
the</FONT>
<BR><FONT SIZE=3D2>&gt; length),</FONT>
<BR><FONT SIZE=3D2>&gt; COLUMN_ENTRY_TYPE_SIZE (similar problems as =
the</FONT>
<BR><FONT SIZE=3D2>&gt; previous).&nbsp; I'm running out</FONT>
<BR><FONT SIZE=3D2>&gt; of ideas now.&nbsp; The code below is just one =
of many,</FONT>
<BR><FONT SIZE=3D2>&gt; many variations I've</FONT>
<BR><FONT SIZE=3D2>&gt; tried.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; class =
CAddWorkRequest</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; public:</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
CAddWorkRequest() STD_INIT</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
~CAddWorkRequest()</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; if (m_WorkRequest)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; delete [] m_WorkRequest;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LONG =
m_RETURNVALUE;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LPTSTR m_WorkRequest;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LONG =
m_lLength;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void =
SetStringParam(LPCTSTR szString,int</FONT>
<BR><FONT SIZE=3D2>&gt; cBytes)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; m_WorkRequest =3D (LPTSTR) new</FONT>
<BR><FONT SIZE=3D2>&gt; TCHAR[cBytes];</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; _tcsncpy(m_WorkRequest,szString,cBytes);</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; m_lLength =3D _tcslen(m_WorkRequest);</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
})</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
BEGIN_PARAM_MAP(CAddWorkRequest)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
SET_PARAM_TYPE(DBPARAMIO_OUTPUT)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
COLUMN_ENTRY(1, m_RETURNVALUE)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
SET_PARAM_TYPE(DBPARAMIO_INPUT)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; //</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>COLUMN_ENTRY_TYPE_SIZE(2,DBTYPE_STR,_tcslen(m_WorkReq=
uest),</FONT>
<BR><FONT SIZE=3D2>&gt; m_WorkRequest)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; END_PARAM_MAP()</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
DEFINE_COMMAND(CAddWorkRequest, _T(&quot;{ ? =3D CALL</FONT>
<BR><FONT SIZE=3D2>&gt; dbo.AddWorkRequest;1</FONT>
<BR><FONT SIZE=3D2>&gt; (?) }&quot;))</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; class =
CAddWorkRequestCommand : public</FONT>
<BR><FONT SIZE=3D2>&gt; CBsDbCommand&lt;CAddWorkRequest&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; foo (LPTSTR =
szWor)</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>=3D=3D=3D message truncated =3D=3D=3D</FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>__________________________________________________</FONT>
<BR><FONT SIZE=3D2>Do you Yahoo!?</FONT>
<BR><FONT SIZE=3D2>Yahoo! Mail Plus - Powerful. Affordable. Sign up =
now.</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://mailplus.yahoo.com" =
TARGET=3D"_blank">http://mailplus.yahoo.com</A></FONT>
</P>

<P><FONT SIZE=3D2>You can read messages from the OLEDB_DEV archive, =
unsubscribe from OLEDB_DEV,</FONT>
<BR><FONT SIZE=3D2>or subscribe to other DevelopMentor lists at <A =
HREF=3D"http://discuss.develop.com" =
TARGET=3D"_blank">http://discuss.develop.com</A>.</FONT>
</P>

</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>
------_=_NextPart_001_01C2B80B.51AA46E0--