Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

OLEDB crete-bind-execute

5 posts in General Discussion Last posting was on 2003-11-26 13:11:05.0Z
Arno Posted on 2003-11-13 08:54:03.0Z
From: "Arno" <seitinger@4u2.com>
Newsgroups: ianywhere.public.general
Subject: OLEDB crete-bind-execute
Lines: 88
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 81.223.57.50
Message-ID: <3fb347f3$1@forums-2-dub>
X-Original-Trace: 13 Nov 2003 00:59:31 -0800, 81.223.57.50
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 13 Nov 2003 00:44:56 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 13 Nov 2003 00:54:03 -0800
X-Trace: forums-1-dub 1068713643 10.22.108.75 (13 Nov 2003 00:54:03 -0800)
X-Original-Trace: 13 Nov 2003 00:54:03 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2070
Article PK: 4287

Hi!

We use Sybase Anywhere 8 and OLEDB.
I can create and bind parameters,
but not execute the command.
The same code works with MSSQL and Oracle.

Thanks

Arno


My sample (Visual .net 2003, C++):

class InsertAccessor
{
public:
LONG m_Zahl;
TCHAR m_text[128];

BEGIN_PARAM_MAP(InsertAccessor)
COLUMN_ENTRY(1, m_Zahl)
COLUMN_ENTRY(2, m_text)
END_PARAM_MAP()

void ClearRecord()
{
memset(this, 0, sizeof(*this));
}
};

CSession m_session;

class InsertRow : public CCommand<CAccessor<InsertAccessor> >
{
public:
CSession session;
DBPARAMS params;
DBPARAMS *pParams;
HRESULT Open()
{
CString sqlstr="insert into A_A1 values(?,?)";
HRESULT hr;
session=m_session;
hr = CCommand<CAccessor<InsertAccessor> >::Create(session, sqlstr,
DBGUID_DEFAULT);
if(FAILED(hr))
{
CString Errormsg;
Errormsg.Format(_T("OLEDB error: Create: %d "),hr);
cout << Errormsg <<endl;
}

hr = CCommand<CAccessor<InsertAccessor>
>::BindParameters(&m_hParameterAccessor, m_spCommand, &params.pData);
if(FAILED(hr))
{
CString Errormsg;
Errormsg.Format(_T("OLEDB error: CBindParameters: %d "),hr);
cout << Errormsg <<endl;
}
// Setup the DBPARAMS structure
params.cParamSets = 1;
params.hAccessor = m_hParameterAccessor;
pParams = &params;
return hr;
}
HRESULT NewRow()
{
return CCommand<CAccessor<InsertAccessor>
>::Execute(CCommand<CAccessor<InsertAccessor> >::GetInterfacePtr(), pParams,
NULL, NULL);
}
};

BOOL NewIndexRow(class InsertRow *xn)
{
HRESULT hr;
xn->m_Zahl=5;
_tcscpy(xn->m_text,"text");

if(FAILED(hr=xn->NewRow()))
return false;

return TRUE;
}


Jason Hinsperger Posted on 2003-11-17 20:05:55.0Z
From: "Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com>
Newsgroups: ianywhere.public.general
References: <3fb347f3$1@forums-2-dub>
Subject: Re: OLEDB crete-bind-execute
Lines: 105
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: hinsperg-pc1.sybase.com
X-Original-NNTP-Posting-Host: hinsperg-pc1.sybase.com
Message-ID: <3fb92a23$1@forums-1-dub>
Date: 17 Nov 2003 12:05:55 -0800
X-Trace: forums-1-dub 1069099555 172.31.143.226 (17 Nov 2003 12:05:55 -0800)
X-Original-Trace: 17 Nov 2003 12:05:55 -0800, hinsperg-pc1.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2094
Article PK: 4311

What is the exact version and build you are using? (dbeng8 -v)
What is the error that you get?

--
Jason Hinsperger
International and Sustaining Engineering
iAnywhere Solutions

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer
--

"Arno" <seitinger@4u2.com> wrote in message news:3fb347f3$1@forums-2-dub...
> Hi!
>
> We use Sybase Anywhere 8 and OLEDB.
> I can create and bind parameters,
> but not execute the command.
> The same code works with MSSQL and Oracle.
>
> Thanks
>
> Arno
>
>
> My sample (Visual .net 2003, C++):
>
> class InsertAccessor
> {
> public:
> LONG m_Zahl;
> TCHAR m_text[128];
>
> BEGIN_PARAM_MAP(InsertAccessor)
> COLUMN_ENTRY(1, m_Zahl)
> COLUMN_ENTRY(2, m_text)
> END_PARAM_MAP()
>
> void ClearRecord()
> {
> memset(this, 0, sizeof(*this));
> }
> };
>
> CSession m_session;
>
> class InsertRow : public CCommand<CAccessor<InsertAccessor> >
> {
> public:
> CSession session;
> DBPARAMS params;
> DBPARAMS *pParams;
> HRESULT Open()
> {
> CString sqlstr="insert into A_A1 values(?,?)";
> HRESULT hr;
> session=m_session;
> hr = CCommand<CAccessor<InsertAccessor> >::Create(session, sqlstr,
> DBGUID_DEFAULT);
> if(FAILED(hr))
> {
> CString Errormsg;
> Errormsg.Format(_T("OLEDB error: Create: %d "),hr);
> cout << Errormsg <<endl;
> }
>
> hr = CCommand<CAccessor<InsertAccessor>
> >::BindParameters(&m_hParameterAccessor, m_spCommand, &params.pData);
> if(FAILED(hr))
> {
> CString Errormsg;
> Errormsg.Format(_T("OLEDB error: CBindParameters: %d "),hr);
> cout << Errormsg <<endl;
> }
> // Setup the DBPARAMS structure
> params.cParamSets = 1;
> params.hAccessor = m_hParameterAccessor;
> pParams = &params;
> return hr;
> }
> HRESULT NewRow()
> {
> return CCommand<CAccessor<InsertAccessor>
> >::Execute(CCommand<CAccessor<InsertAccessor> >::GetInterfacePtr(),
pParams,
> NULL, NULL);
> }
> };
>
> BOOL NewIndexRow(class InsertRow *xn)
> {
> HRESULT hr;
> xn->m_Zahl=5;
> _tcscpy(xn->m_text,"text");
>
> if(FAILED(hr=xn->NewRow()))
> return false;
>
> return TRUE;
> }
>
>


Arno Posted on 2003-11-24 14:49:41.0Z
From: "Arno" <seitinger@4u2.com>
Newsgroups: ianywhere.public.general
References: <3fb347f3$1@forums-2-dub> <3fb92a23$1@forums-1-dub>
Subject: Re: OLEDB crete-bind-execute
Lines: 117
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 81.223.57.50
X-Original-NNTP-Posting-Host: 81.223.57.50
Message-ID: <3fc21a85$1@forums-1-dub>
Date: 24 Nov 2003 06:49:41 -0800
X-Trace: forums-1-dub 1069685381 81.223.57.50 (24 Nov 2003 06:49:41 -0800)
X-Original-Trace: 24 Nov 2003 06:49:41 -0800, 81.223.57.50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2125
Article PK: 4341

version: 8.0.2 (3601)
HResult:-2147467259

Arno

"Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com> wrote in message
news:3fb92a23$1@forums-1-dub...
> What is the exact version and build you are using? (dbeng8 -v)
> What is the error that you get?
>
> --
> Jason Hinsperger
> International and Sustaining Engineering
> iAnywhere Solutions
>
> Whitepapers, TechDocs, and bug fixes are all available through the
iAnywhere
> Developer Community at www.ianywhere.com/developer
> --
>
>
> "Arno" <seitinger@4u2.com> wrote in message
news:3fb347f3$1@forums-2-dub...
> > Hi!
> >
> > We use Sybase Anywhere 8 and OLEDB.
> > I can create and bind parameters,
> > but not execute the command.
> > The same code works with MSSQL and Oracle.
> >
> > Thanks
> >
> > Arno
> >
> >
> > My sample (Visual .net 2003, C++):
> >
> > class InsertAccessor
> > {
> > public:
> > LONG m_Zahl;
> > TCHAR m_text[128];
> >
> > BEGIN_PARAM_MAP(InsertAccessor)
> > COLUMN_ENTRY(1, m_Zahl)
> > COLUMN_ENTRY(2, m_text)
> > END_PARAM_MAP()
> >
> > void ClearRecord()
> > {
> > memset(this, 0, sizeof(*this));
> > }
> > };
> >
> > CSession m_session;
> >
> > class InsertRow : public CCommand<CAccessor<InsertAccessor> >
> > {
> > public:
> > CSession session;
> > DBPARAMS params;
> > DBPARAMS *pParams;
> > HRESULT Open()
> > {
> > CString sqlstr="insert into A_A1 values(?,?)";
> > HRESULT hr;
> > session=m_session;
> > hr = CCommand<CAccessor<InsertAccessor> >::Create(session, sqlstr,
> > DBGUID_DEFAULT);
> > if(FAILED(hr))
> > {
> > CString Errormsg;
> > Errormsg.Format(_T("OLEDB error: Create: %d "),hr);
> > cout << Errormsg <<endl;
> > }
> >
> > hr = CCommand<CAccessor<InsertAccessor>
> > >::BindParameters(&m_hParameterAccessor, m_spCommand, &params.pData);
> > if(FAILED(hr))
> > {
> > CString Errormsg;
> > Errormsg.Format(_T("OLEDB error: CBindParameters: %d "),hr);
> > cout << Errormsg <<endl;
> > }
> > // Setup the DBPARAMS structure
> > params.cParamSets = 1;
> > params.hAccessor = m_hParameterAccessor;
> > pParams = &params;
> > return hr;
> > }
> > HRESULT NewRow()
> > {
> > return CCommand<CAccessor<InsertAccessor>
> > >::Execute(CCommand<CAccessor<InsertAccessor> >::GetInterfacePtr(),
> pParams,
> > NULL, NULL);
> > }
> > };
> >
> > BOOL NewIndexRow(class InsertRow *xn)
> > {
> > HRESULT hr;
> > xn->m_Zahl=5;
> > _tcscpy(xn->m_text,"text");
> >
> > if(FAILED(hr=xn->NewRow()))
> > return false;
> >
> > return TRUE;
> > }
> >
> >
>
>


Jason Hinsperger Posted on 2003-11-25 14:52:52.0Z
From: "Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com>
Newsgroups: ianywhere.public.general
References: <3fb347f3$1@forums-2-dub> <3fb92a23$1@forums-1-dub> <3fc21a85$1@forums-1-dub>
Subject: Re: OLEDB crete-bind-execute
Lines: 137
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: hinsperg-pc1.sybase.com
Message-ID: <3fc36e3b@forums-2-dub>
X-Original-Trace: 25 Nov 2003 06:59:07 -0800, hinsperg-pc1.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 25 Nov 2003 06:42:36 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 25 Nov 2003 06:52:52 -0800
X-Trace: forums-1-dub 1069771972 10.22.108.75 (25 Nov 2003 06:52:52 -0800)
X-Original-Trace: 25 Nov 2003 06:52:52 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2133
Article PK: 4346

This is a pretty generic error.
I would recommend applying the latest 8.0.2 ebf (available from the website)
and trying your test again.
If it doesn't help, you should log a case with a complete reproducable via
case express (free), or by calling tech. support and logging an issue.

--
Jason Hinsperger
International and Sustaining Engineering
iAnywhere Solutions

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer
--

"Arno" <seitinger@4u2.com> wrote in message news:3fc21a85$1@forums-1-dub...
> version: 8.0.2 (3601)
> HResult:-2147467259
>
> Arno
>
>
> "Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com> wrote in message
> news:3fb92a23$1@forums-1-dub...
> > What is the exact version and build you are using? (dbeng8 -v)
> > What is the error that you get?
> >
> > --
> > Jason Hinsperger
> > International and Sustaining Engineering
> > iAnywhere Solutions
> >
> > Whitepapers, TechDocs, and bug fixes are all available through the
> iAnywhere
> > Developer Community at www.ianywhere.com/developer
> > --
> >
> >
> > "Arno" <seitinger@4u2.com> wrote in message
> news:3fb347f3$1@forums-2-dub...
> > > Hi!
> > >
> > > We use Sybase Anywhere 8 and OLEDB.
> > > I can create and bind parameters,
> > > but not execute the command.
> > > The same code works with MSSQL and Oracle.
> > >
> > > Thanks
> > >
> > > Arno
> > >
> > >
> > > My sample (Visual .net 2003, C++):
> > >
> > > class InsertAccessor
> > > {
> > > public:
> > > LONG m_Zahl;
> > > TCHAR m_text[128];
> > >
> > > BEGIN_PARAM_MAP(InsertAccessor)
> > > COLUMN_ENTRY(1, m_Zahl)
> > > COLUMN_ENTRY(2, m_text)
> > > END_PARAM_MAP()
> > >
> > > void ClearRecord()
> > > {
> > > memset(this, 0, sizeof(*this));
> > > }
> > > };
> > >
> > > CSession m_session;
> > >
> > > class InsertRow : public CCommand<CAccessor<InsertAccessor> >
> > > {
> > > public:
> > > CSession session;
> > > DBPARAMS params;
> > > DBPARAMS *pParams;
> > > HRESULT Open()
> > > {
> > > CString sqlstr="insert into A_A1 values(?,?)";
> > > HRESULT hr;
> > > session=m_session;
> > > hr = CCommand<CAccessor<InsertAccessor> >::Create(session, sqlstr,
> > > DBGUID_DEFAULT);
> > > if(FAILED(hr))
> > > {
> > > CString Errormsg;
> > > Errormsg.Format(_T("OLEDB error: Create: %d "),hr);
> > > cout << Errormsg <<endl;
> > > }
> > >
> > > hr = CCommand<CAccessor<InsertAccessor>
> > > >::BindParameters(&m_hParameterAccessor, m_spCommand, &params.pData);
> > > if(FAILED(hr))
> > > {
> > > CString Errormsg;
> > > Errormsg.Format(_T("OLEDB error: CBindParameters: %d "),hr);
> > > cout << Errormsg <<endl;
> > > }
> > > // Setup the DBPARAMS structure
> > > params.cParamSets = 1;
> > > params.hAccessor = m_hParameterAccessor;
> > > pParams = &params;
> > > return hr;
> > > }
> > > HRESULT NewRow()
> > > {
> > > return CCommand<CAccessor<InsertAccessor>
> > > >::Execute(CCommand<CAccessor<InsertAccessor> >::GetInterfacePtr(),
> > pParams,
> > > NULL, NULL);
> > > }
> > > };
> > >
> > > BOOL NewIndexRow(class InsertRow *xn)
> > > {
> > > HRESULT hr;
> > > xn->m_Zahl=5;
> > > _tcscpy(xn->m_text,"text");
> > >
> > > if(FAILED(hr=xn->NewRow()))
> > > return false;
> > >
> > > return TRUE;
> > > }
> > >
> > >
> >
> >
>
>


Arno Posted on 2003-11-26 13:11:05.0Z
From: "Arno" <seitinger@4u2.com>
Newsgroups: ianywhere.public.general
References: <3fb347f3$1@forums-2-dub> <3fb92a23$1@forums-1-dub> <3fc21a85$1@forums-1-dub> <3fc36e3b@forums-2-dub>
Subject: Re: OLEDB crete-bind-execute
Lines: 151
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 81.223.57.50
X-Original-NNTP-Posting-Host: 81.223.57.50
Message-ID: <3fc4a669$1@forums-1-dub>
Date: 26 Nov 2003 05:11:05 -0800
X-Trace: forums-1-dub 1069852265 81.223.57.50 (26 Nov 2003 05:11:05 -0800)
X-Original-Trace: 26 Nov 2003 05:11:05 -0800, 81.223.57.50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2136
Article PK: 4348

It works with ASAprov.90

thanks
arrno

"Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com> wrote in message
news:3fc36e3b@forums-2-dub...
> This is a pretty generic error.
> I would recommend applying the latest 8.0.2 ebf (available from the
website)
> and trying your test again.
> If it doesn't help, you should log a case with a complete reproducable via
> case express (free), or by calling tech. support and logging an issue.
>
> --
> Jason Hinsperger
> International and Sustaining Engineering
> iAnywhere Solutions
>
> Whitepapers, TechDocs, and bug fixes are all available through the
iAnywhere
> Developer Community at www.ianywhere.com/developer
> --
>
>
>
> "Arno" <seitinger@4u2.com> wrote in message
news:3fc21a85$1@forums-1-dub...
> > version: 8.0.2 (3601)
> > HResult:-2147467259
> >
> > Arno
> >
> >
> > "Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com> wrote in message
> > news:3fb92a23$1@forums-1-dub...
> > > What is the exact version and build you are using? (dbeng8 -v)
> > > What is the error that you get?
> > >
> > > --
> > > Jason Hinsperger
> > > International and Sustaining Engineering
> > > iAnywhere Solutions
> > >
> > > Whitepapers, TechDocs, and bug fixes are all available through the
> > iAnywhere
> > > Developer Community at www.ianywhere.com/developer
> > > --
> > >
> > >
> > > "Arno" <seitinger@4u2.com> wrote in message
> > news:3fb347f3$1@forums-2-dub...
> > > > Hi!
> > > >
> > > > We use Sybase Anywhere 8 and OLEDB.
> > > > I can create and bind parameters,
> > > > but not execute the command.
> > > > The same code works with MSSQL and Oracle.
> > > >
> > > > Thanks
> > > >
> > > > Arno
> > > >
> > > >
> > > > My sample (Visual .net 2003, C++):
> > > >
> > > > class InsertAccessor
> > > > {
> > > > public:
> > > > LONG m_Zahl;
> > > > TCHAR m_text[128];
> > > >
> > > > BEGIN_PARAM_MAP(InsertAccessor)
> > > > COLUMN_ENTRY(1, m_Zahl)
> > > > COLUMN_ENTRY(2, m_text)
> > > > END_PARAM_MAP()
> > > >
> > > > void ClearRecord()
> > > > {
> > > > memset(this, 0, sizeof(*this));
> > > > }
> > > > };
> > > >
> > > > CSession m_session;
> > > >
> > > > class InsertRow : public CCommand<CAccessor<InsertAccessor> >
> > > > {
> > > > public:
> > > > CSession session;
> > > > DBPARAMS params;
> > > > DBPARAMS *pParams;
> > > > HRESULT Open()
> > > > {
> > > > CString sqlstr="insert into A_A1 values(?,?)";
> > > > HRESULT hr;
> > > > session=m_session;
> > > > hr = CCommand<CAccessor<InsertAccessor> >::Create(session, sqlstr,
> > > > DBGUID_DEFAULT);
> > > > if(FAILED(hr))
> > > > {
> > > > CString Errormsg;
> > > > Errormsg.Format(_T("OLEDB error: Create: %d "),hr);
> > > > cout << Errormsg <<endl;
> > > > }
> > > >
> > > > hr = CCommand<CAccessor<InsertAccessor>
> > > > >::BindParameters(&m_hParameterAccessor, m_spCommand,
&params.pData);
> > > > if(FAILED(hr))
> > > > {
> > > > CString Errormsg;
> > > > Errormsg.Format(_T("OLEDB error: CBindParameters: %d "),hr);
> > > > cout << Errormsg <<endl;
> > > > }
> > > > // Setup the DBPARAMS structure
> > > > params.cParamSets = 1;
> > > > params.hAccessor = m_hParameterAccessor;
> > > > pParams = &params;
> > > > return hr;
> > > > }
> > > > HRESULT NewRow()
> > > > {
> > > > return CCommand<CAccessor<InsertAccessor>
> > > > >::Execute(CCommand<CAccessor<InsertAccessor> >::GetInterfacePtr(),
> > > pParams,
> > > > NULL, NULL);
> > > > }
> > > > };
> > > >
> > > > BOOL NewIndexRow(class InsertRow *xn)
> > > > {
> > > > HRESULT hr;
> > > > xn->m_Zahl=5;
> > > > _tcscpy(xn->m_text,"text");
> > > >
> > > > if(FAILED(hr=xn->NewRow()))
> > > > return false;
> > > >
> > > > return TRUE;
> > > > }
> > > >
> > > >
> > >
> > >
> >
> >
>
>