AW: [OLEDB_DEV] OLE DB Consumer Templates

Rudolf Wiener <[email protected]> Thu, 9 Jan 2003 17:30:57 +0100
Newsgroups gmane.comp.windows.devel.oledb.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C2B804.DE7ED830
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

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üngliche Nachricht-----
  Von: OLEDB_DEV [mailto:[email protected]]Im Auftrag von Erik
Valdes
  Gesendet: Donnerstag, 09. Jänner 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)

    {

                CAddWorkRequestCommand cmd;

                cmd.SetStringParam(szWor,_tcslen(szWor)+1);

    cmd.Open();

    }



    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, You can read messages from the OLEDB_DEV archive, unsubscribe
from OLEDB_DEV, or subscribe to other DevelopMentor lists at
http://discuss.develop.com. 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_000_001F_01C2B804.DE7ED830
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.emailstyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003>Erik,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D718082516-09012003>For=20
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=20
use in the accessor is <FONT size=3D2>BLOB_ENTRY_LENGTH_STATUS. I'm not =
sure if=20
this is the best way to do it because I have the impression it slows =
things down=20
a bit. But I haven't had the time yet to look into faster=20
alternatives.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D718082516-09012003><FONT=20
size=3D2></FONT></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D718082516-09012003><FONT=20
size=3D2>If you like I can send you excerpts from my app's=20
code.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003>Regards</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003>Rudi</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D718082516-09012003></SPAN></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Urspr=FCngliche Nachricht-----<BR><B>Von:</B> OLEDB_DEV=20
  [mailto:[email protected]]<B>Im Auftrag von </B>Erik=20
  Valdes<BR><B>Gesendet:</B> Donnerstag, 09. J=E4nner 2003 =
17:22<BR><B>An:</B>=20
  [email protected]<BR><B>Betreff:</B> Re: [OLEDB_DEV] OLE =
DB=20
  Consumer Templates<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The reason =
I can't=20
  allocate on the stack is that my variable can be any length.&nbsp; It=20
  essentially boils down to the string representation of an xml file. =
&nbsp;That=20
  file can be any size.&nbsp; When I pass it to my SP, the sp's =
parameter is=20
  ntext (to allow for any size).&nbsp;&nbsp; What do people do when they =
want to=20
  pass XML of unknown length to a SQL Server stored =
procedure?</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DTahoma =
size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original=20
  Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: bold">From:</SPAN></B> =
Peter Moss=20
  [mailto:[email protected]] <BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, January 09, =
2003 7:58=20
  AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
  [email protected]<BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [OLEDB_DEV] OLE DB =
Consumer=20
  Templates</SPAN></FONT></P>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">If I=20
  remember right, you can't use the macros for heap-allocated =
variables.&nbsp;=20
  If you dig into the macro definitions, I believe you will find that =
pointers=20
  offset from the beginning of 'this' are used.&nbsp; Thus, a =
heap-allocated=20
  variable like m_WorkRequest will not work.</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">Why=20
  can't you just allocate a TCHAR on the stack frame of the object,=20
  ie,</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">TCHAR=20
  m_WorkRequest[257];&nbsp;&nbsp;&nbsp;&nbsp; // Or 1 + the size of your =
SP=20
  parameter size</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">Then you=20
  can just use COLUMN_ENTRY.</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">HTH,</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">Peter</SPAN></FONT></P></DIV>
  <BLOCKQUOTE style=3D"MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt">
    <P class=3DMsoNormal=20
    style=3D"MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0in"><FONT=20
    face=3DTahoma size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original=20
    Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: =
bold">From:</SPAN></B>=20
    OLEDB_DEV [mailto:[email protected]]<B><SPAN=20
    style=3D"FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Erik =
Valdes<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, January 08, =
2003 5:22=20
    PM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
    [email protected]<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> [OLEDB_DEV] OLE DB =
Consumer=20
    Templates</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I'm having trouble =
implementing=20
    an accessor. &nbsp;I'm trying to use a variable (m_WorkRequest) =
that's=20
    dynamically allocated as the variable that's bound to a parameter in =
my=20
    accessor (commented line below).&nbsp; &nbsp;The reason I need it to =
be=20
    dynamic is that it is XML and can be any length.&nbsp; The stored =
proc's=20
    parameter is of ntext type to handle the variable length.&nbsp; =
However, I=20
    don't know at compile time how big to make the buffer for my =
parameter in my=20
    accessor.&nbsp; What's the proper way to do this?&nbsp; I've tried=20
    COLUMN_ENTRY (access violation), COLUMN_ENTRY_LENGTH (different =
variations=20
    produce different errors, but basically I can't set the length),=20
    COLUMN_ENTRY_TYPE_SIZE (similar problems as the previous).&nbsp; I'm =
running=20
    out of ideas now.&nbsp; The code below is just one of many, many =
variations=20
    I've tried.</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">class=20
    CAddWorkRequest</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">{</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">public:</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; =
CAddWorkRequest()=20
    STD_INIT</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;=20
    ~CAddWorkRequest()</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; {=20
</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    if (m_WorkRequest)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    delete [] m_WorkRequest;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; =
}</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; LONG=20
    m_RETURNVALUE;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; LPTSTR=20
    m_WorkRequest;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; LONG=20
    m_lLength;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; void=20
    SetStringParam(LPCTSTR szString,int cBytes)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; =
{</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    m_WorkRequest =3D (LPTSTR) new TCHAR[cBytes];</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    _tcsncpy(m_WorkRequest,szString,cBytes);</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    m_lLength =3D _tcslen(m_WorkRequest);</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;=20
})</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">BEGIN_PARAM_MAP(CAddWorkRequest)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;=20
    SET_PARAM_TYPE(DBPARAMIO_OUTPUT)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; =
COLUMN_ENTRY(1,=20
    m_RETURNVALUE)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;=20
    SET_PARAM_TYPE(DBPARAMIO_INPUT)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">//&nbsp;&nbsp;=20
    COLUMN_ENTRY_TYPE_SIZE(2,DBTYPE_STR,_tcslen(m_WorkRequest),=20
    m_WorkRequest)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">END_PARAM_MAP()</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">DEFINE_COMMAND(CAddWorkRequest,=20
    _T("{ ? =3D CALL dbo.AddWorkRequest;1 (?) }"))</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">};</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">class =
CAddWorkRequestCommand : public=20
    CBsDbCommand&lt;CAddWorkRequest&gt;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">{</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">};</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">foo (LPTSTR =
szWor)</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">{</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN=20
    style=3D"FONT-SIZE: =
12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

    CAddWorkRequestCommand cmd;</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN=20
    style=3D"FONT-SIZE: =
12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

    cmd.SetStringParam(szWor,_tcslen(szWor)+1);</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in"><FONT=20
    face=3D"Times New Roman" size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt">cmd.Open();</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">}</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt">You can read messages from =
the=20
    OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other =

    DevelopMentor lists at http://discuss.develop.com.=20
  </SPAN></FONT></P></BLOCKQUOTE></DIV>You can read messages from the =
OLEDB_DEV=20
  archive, unsubscribe from OLEDB_DEV, You can read messages from the =
OLEDB_DEV=20
  archive, unsubscribe from OLEDB_DEV, or subscribe to other =
DevelopMentor lists=20
  at http://discuss.develop.com. or subscribe to other DevelopMentor =
lists at=20
  http://discuss.develop.com.</BLOCKQUOTE></BODY></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_000_001F_01C2B804.DE7ED830--