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.

select image, binary data from ASE using ODBC Windows64

13 posts in General Discussion Last posting was on 2012-03-05 23:21:27.0Z
bganes Posted on 2012-02-16 03:23:40.0Z
Sender: 447d.4f3c749f.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f3c76bc.44fb.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 15 Feb 2012 19:23:40 -0800
X-Trace: forums-1-dub 1329362620 172.20.134.41 (15 Feb 2012 19:23:40 -0800)
X-Original-Trace: 15 Feb 2012 19:23:40 -0800, 172.20.134.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30919
Article PK: 73809

Dear All,
I am new to Sybase ASE. I am trying to fetch image, binary
data stored in Sybase ASE DB (on Windows7 64bit) using ODBC
(C++) from Windows7 64bit.
Data can be seen by right click & selecting "View data in
Interactive SQL" from "Sybase Central" - which is nothing
but "select * from <tablename>.
But, same query ran thru SQLExecDirect from ODBC app, gives
NULL data. Data buffer is SQLBindCol with SQL_C_BINARY data
type.
I am using 64bit ODBC driver.

Sorry if this is not the correct forum for ODBC questions.

Can you please help me know, how can I get the image data
correctly in ODBC application?

Thanks.


Paul Vero [Sybase] Posted on 2012-02-16 18:17:04.0Z
From: "Paul Vero [Sybase]" <pvero@nospam.com>
Newsgroups: sybase.public.ase.general
References: <4f3c76bc.44fb.1681692777@sybase.com>
Subject: Re: select image, binary data from ASE using ODBC Windows64
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f3d4820@forums-1-dub>
Date: 16 Feb 2012 10:17:04 -0800
X-Trace: forums-1-dub 1329416224 10.22.241.152 (16 Feb 2012 10:17:04 -0800)
X-Original-Trace: 16 Feb 2012 10:17:04 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30921
Article PK: 73811

Hi

sybase.public.connectivity.odbc is the correct forum.

What is the exact driver version and exactly what are you doing in ODBC
Test?
I haven't tried this in x64 machine but should work. I don't know how
OdbcTest handles retrieval of
the data when it's image - should printout a bunch of binary numbers.

I did simple test on x86 machine using 15.7.104.0 Driver and it seems to
work okay but didn't do this on real large image.

-Paul

<bganes> wrote in message news:4f3c76bc.44fb.1681692777@sybase.com...
> Dear All,
> I am new to Sybase ASE. I am trying to fetch image, binary
> data stored in Sybase ASE DB (on Windows7 64bit) using ODBC
> (C++) from Windows7 64bit.
> Data can be seen by right click & selecting "View data in
> Interactive SQL" from "Sybase Central" - which is nothing
> but "select * from <tablename>.
> But, same query ran thru SQLExecDirect from ODBC app, gives
> NULL data. Data buffer is SQLBindCol with SQL_C_BINARY data
> type.
> I am using 64bit ODBC driver.
>
> Sorry if this is not the correct forum for ODBC questions.
>
> Can you please help me know, how can I get the image data
> correctly in ODBC application?
>
> Thanks.


bganes Posted on 2012-02-17 02:01:12.0Z
Sender: 533b.4f3ccc80.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f3db4e8.7835.1681692777@sybase.com>
References: <4f3d4820@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 16 Feb 2012 18:01:12 -0800
X-Trace: forums-1-dub 1329444072 172.20.134.41 (16 Feb 2012 18:01:12 -0800)
X-Original-Trace: 16 Feb 2012 18:01:12 -0800, 172.20.134.41
Lines: 87
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30922
Article PK: 73812

Hi,

Driver details are as below:

C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
SybaseACE
Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
/P/X64/Windows Server/ase157/282
0/64-bit/OPT/Thu Sep 15 21:32:03 2011
ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC 21:01:39
2011
OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC 01:00:28
2011

> odbcversion.exe -fullversion
Sybase ASE ODBC
Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
80/64-bit/Normal/
Thu Aug 25 UTC 22:10:30 2011

SQL_DRIVER_NAME:Adaptive Server Enterprise
SQL_DRIVER_ODBC_VER:03.51
SQL_DRIVER_VER:15.7.0.80

NULL is returned not only for the image that I inserted
(using bcp) but also for "pic" column (image type) in
pubs2.au_pix (User Tables) the sample table generated at ASE
installation.

In my ODBC application (& not in a ODBCTest), I am doing
following steps:
1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
2) SQLExec(); // execute the prepared statement
3) SQLFetchScroll(); // fetch a rowset of 5 rows

When I check the str_len_ind value, I get -1 & the buffer
has nulls.

My this same code sequence works fine for SQL_C_CHAR type
columns for this same installation. Just that binary & image
columns are having issues.

Should I provide the actual code snippets for you to
examine?

Thanks and Regards.
-------------

> Hi
>
> sybase.public.connectivity.odbc is the correct forum.
>
> What is the exact driver version and exactly what are you
> doing in ODBC Test?
> I haven't tried this in x64 machine but should work. I
> don't know how OdbcTest handles retrieval of
> the data when it's image - should printout a bunch of
> binary numbers.
>
> I did simple test on x86 machine using 15.7.104.0 Driver
> and it seems to work okay but didn't do this on real
> large image.
>
> -Paul
>
>
>
> <bganes> wrote in message
> > news:4f3c76bc.44fb.1681692777@sybase.com... Dear All,
> > I am new to Sybase ASE. I am trying to fetch image,
> > binary data stored in Sybase ASE DB (on Windows7 64bit)
> > using ODBC (C++) from Windows7 64bit.
> > Data can be seen by right click & selecting "View data
> > in Interactive SQL" from "Sybase Central" - which is
> > nothing but "select * from <tablename>.
> > But, same query ran thru SQLExecDirect from ODBC app,
> > gives NULL data. Data buffer is SQLBindCol with
> > SQL_C_BINARY data type.
> > I am using 64bit ODBC driver.
> >
> > Sorry if this is not the correct forum for ODBC
> questions. >
> > Can you please help me know, how can I get the image
> > data correctly in ODBC application?
> >
> > Thanks.
>
>


bganes Posted on 2012-02-20 07:03:03.0Z
Sender: 3f77.4f419c7c.1804289383@sybase.com
From: Bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f41f026.4d32.1681692777@sybase.com>
References: <4f3db4e8.7835.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 19 Feb 2012 23:03:03 -0800
X-Trace: forums-1-dub 1329721383 172.20.134.41 (19 Feb 2012 23:03:03 -0800)
X-Original-Trace: 19 Feb 2012 23:03:03 -0800, 172.20.134.41
Lines: 102
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30927
Article PK: 73817

Dear Paul

Can you please help me know if this is a issue with 64 bit
ODBC driver or do I need to upgrade the ODBC driver on my
server from 15.7.0.80.1008 to 15.7.104.0?

How / from where can I get the driver 15.7.104.0 for X64
Windows 7?

Please guide.

Thanks for your help.

Best Regards.

> Hi,
>
> Driver details are as below:
>
> C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
> SybaseACE
> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
> /P/X64/Windows Server/ase157/282
> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC 21:01:39
> 2011
> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC 01:00:28
> 2011
>
> > odbcversion.exe -fullversion
> Sybase ASE ODBC
> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
> 80/64-bit/Normal/
> Thu Aug 25 UTC 22:10:30 2011
>
> SQL_DRIVER_NAME:Adaptive Server Enterprise
> SQL_DRIVER_ODBC_VER:03.51
> SQL_DRIVER_VER:15.7.0.80
>
> NULL is returned not only for the image that I inserted
> (using bcp) but also for "pic" column (image type) in
> pubs2.au_pix (User Tables) the sample table generated at
> ASE installation.
>
> In my ODBC application (& not in a ODBCTest), I am doing
> following steps:
> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> 2) SQLExec(); // execute the prepared statement
> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
>
> When I check the str_len_ind value, I get -1 & the buffer
> has nulls.
>
> My this same code sequence works fine for SQL_C_CHAR type
> columns for this same installation. Just that binary &
> image columns are having issues.
>
> Should I provide the actual code snippets for you to
> examine?
>
> Thanks and Regards.
> -------------
> > Hi
> >
> > sybase.public.connectivity.odbc is the correct forum.
> >
> > What is the exact driver version and exactly what are
> > you doing in ODBC Test?
> > I haven't tried this in x64 machine but should work. I
> > don't know how OdbcTest handles retrieval of
> > the data when it's image - should printout a bunch of
> > binary numbers.
> >
> > I did simple test on x86 machine using 15.7.104.0 Driver
> > and it seems to work okay but didn't do this on real
> > large image.
> >
> > -Paul
> >
> >
> >
> > <bganes> wrote in message
> > > news:4f3c76bc.44fb.1681692777@sybase.com... Dear All,
> > > I am new to Sybase ASE. I am trying to fetch image,
> > > binary data stored in Sybase ASE DB (on Windows7
> > > 64bit) using ODBC (C++) from Windows7 64bit.
> > > Data can be seen by right click & selecting "View data
> > > in Interactive SQL" from "Sybase Central" - which is
> > > nothing but "select * from <tablename>.
> > > But, same query ran thru SQLExecDirect from ODBC app,
> > > gives NULL data. Data buffer is SQLBindCol with
> > > SQL_C_BINARY data type.
> > > I am using 64bit ODBC driver.
> > >
> > > Sorry if this is not the correct forum for ODBC
> > questions. >
> > > Can you please help me know, how can I get the image
> > > data correctly in ODBC application?
> > >
> > > Thanks.
> >
> >


Paul Vero [Sybase] Posted on 2012-02-21 16:39:22.0Z
From: "Paul Vero [Sybase]" <pvero@nospam.com>
Newsgroups: sybase.public.ase.general
References: <4f3db4e8.7835.1681692777@sybase.com> <4f41f026.4d32.1681692777@sybase.com>
Subject: Re: select image, binary data from ASE using ODBC Windows64
Lines: 118
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f43c8ba$1@forums-1-dub>
Date: 21 Feb 2012 08:39:22 -0800
X-Trace: forums-1-dub 1329842362 10.22.241.152 (21 Feb 2012 08:39:22 -0800)
X-Original-Trace: 21 Feb 2012 08:39:22 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30933
Article PK: 73820

Hi,

You should be able to download the ESD#1 (104 build) from the Sybase
Downloads website - it's under the Software Develop Kit.

If you have license for ASE 15.7 then you are eligible for this release.

You might want to provide code snippets so I can take a look or it might be
best for you to start case with Tech Support for further assistance.

Thank you,
-Paul

<Bganes> wrote in message news:4f41f026.4d32.1681692777@sybase.com...
> Dear Paul
>
> Can you please help me know if this is a issue with 64 bit
> ODBC driver or do I need to upgrade the ODBC driver on my
> server from 15.7.0.80.1008 to 15.7.104.0?
>
> How / from where can I get the driver 15.7.104.0 for X64
> Windows 7?
>
> Please guide.
>
> Thanks for your help.
>
> Best Regards.
>
>> Hi,
>>
>> Driver details are as below:
>>
>> C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
>> SybaseACE
>> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
>> /P/X64/Windows Server/ase157/282
>> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
>> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC 21:01:39
>> 2011
>> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC 01:00:28
>> 2011
>>
>> > odbcversion.exe -fullversion
>> Sybase ASE ODBC
>> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
>> 80/64-bit/Normal/
>> Thu Aug 25 UTC 22:10:30 2011
>>
>> SQL_DRIVER_NAME:Adaptive Server Enterprise
>> SQL_DRIVER_ODBC_VER:03.51
>> SQL_DRIVER_VER:15.7.0.80
>>
>> NULL is returned not only for the image that I inserted
>> (using bcp) but also for "pic" column (image type) in
>> pubs2.au_pix (User Tables) the sample table generated at
>> ASE installation.
>>
>> In my ODBC application (& not in a ODBCTest), I am doing
>> following steps:
>> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
>> 2) SQLExec(); // execute the prepared statement
>> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
>>
>> When I check the str_len_ind value, I get -1 & the buffer
>> has nulls.
>>
>> My this same code sequence works fine for SQL_C_CHAR type
>> columns for this same installation. Just that binary &
>> image columns are having issues.
>>
>> Should I provide the actual code snippets for you to
>> examine?
>>
>> Thanks and Regards.
>> -------------
>> > Hi
>> >
>> > sybase.public.connectivity.odbc is the correct forum.
>> >
>> > What is the exact driver version and exactly what are
>> > you doing in ODBC Test?
>> > I haven't tried this in x64 machine but should work. I
>> > don't know how OdbcTest handles retrieval of
>> > the data when it's image - should printout a bunch of
>> > binary numbers.
>> >
>> > I did simple test on x86 machine using 15.7.104.0 Driver
>> > and it seems to work okay but didn't do this on real
>> > large image.
>> >
>> > -Paul
>> >
>> >
>> >
>> > <bganes> wrote in message
>> > > news:4f3c76bc.44fb.1681692777@sybase.com... Dear All,
>> > > I am new to Sybase ASE. I am trying to fetch image,
>> > > binary data stored in Sybase ASE DB (on Windows7
>> > > 64bit) using ODBC (C++) from Windows7 64bit.
>> > > Data can be seen by right click & selecting "View data
>> > > in Interactive SQL" from "Sybase Central" - which is
>> > > nothing but "select * from <tablename>.
>> > > But, same query ran thru SQLExecDirect from ODBC app,
>> > > gives NULL data. Data buffer is SQLBindCol with
>> > > SQL_C_BINARY data type.
>> > > I am using 64bit ODBC driver.
>> > >
>> > > Sorry if this is not the correct forum for ODBC
>> > questions. >
>> > > Can you please help me know, how can I get the image
>> > > data correctly in ODBC application?
>> > >
>> > > Thanks.
>> >
>> >


bganes Posted on 2012-02-22 06:35:16.0Z
Sender: 48f9.4f44892c.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f448ca4.49be.1681692777@sybase.com>
References: <4f43c8ba$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 21 Feb 2012 22:35:16 -0800
X-Trace: forums-1-dub 1329892516 172.20.134.41 (21 Feb 2012 22:35:16 -0800)
X-Original-Trace: 21 Feb 2012 22:35:16 -0800, 172.20.134.41
Lines: 155
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30937
Article PK: 73828

Dear Paul,

Thanks for the response.

Code snippet which reads image column in 64bit ODBC
application:
(This same code works for other DBs like DB2, Oracle,
MySQL).
// prepare query:
wchar_t *query = _T("select * from mytable NOLOCK;");
SQLRETURN ret = 0;
ret = SQLPrepare(stmt, query, SQL_NTS);
if (!SQL_SUCCEEDED(ret))
{
TRACE("SybAse:SQLprepare failed.");
DbException::sqlErrorInfo(SQL_HANDLE_STMT, stmt);
throw DbException(std::string(""));
}
// bind to column:
SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
m_colValue[0], m_len, &m_LenInd[0]);
// Execute query:
ret = SQLExecute(stmt);
// fetch rows
if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO == ret)
{
do {
ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT, 0);
// handle data per row here...
} while(SQL_SUCCEEDED(ret));
}

Thanks and Regards.
------------------------------------------------------

> Hi,
>
> You should be able to download the ESD#1 (104 build) from
> the Sybase Downloads website - it's under the Software
> Develop Kit.
>
> If you have license for ASE 15.7 then you are eligible for
> this release.
>
> You might want to provide code snippets so I can take a
> look or it might be best for you to start case with Tech
> Support for further assistance.
>
> Thank you,
> -Paul
>
> <Bganes> wrote in message
> > news:4f41f026.4d32.1681692777@sybase.com... Dear Paul
> >
> > Can you please help me know if this is a issue with 64
> > bit ODBC driver or do I need to upgrade the ODBC driver
> > on my server from 15.7.0.80.1008 to 15.7.104.0?
> >
> > How / from where can I get the driver 15.7.104.0 for X64
> > Windows 7?
> >
> > Please guide.
> >
> > Thanks for your help.
> >
> > Best Regards.
> >
> >> Hi,
> >>
> >> Driver details are as below:
> >>
> >> C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
> >> SybaseACE
> >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
> >> /P/X64/Windows Server/ase157/282
> >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC
> 21:01:39 >> 2011
> >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC
> 01:00:28 >> 2011
> >>
> >> > odbcversion.exe -fullversion
> >> Sybase ASE ODBC
> >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
> >> 80/64-bit/Normal/
> >> Thu Aug 25 UTC 22:10:30 2011
> >>
> >> SQL_DRIVER_NAME:Adaptive Server Enterprise
> >> SQL_DRIVER_ODBC_VER:03.51
> >> SQL_DRIVER_VER:15.7.0.80
> >>
> >> NULL is returned not only for the image that I inserted
> >> (using bcp) but also for "pic" column (image type) in
> >> pubs2.au_pix (User Tables) the sample table generated
> at >> ASE installation.
> >>
> >> In my ODBC application (& not in a ODBCTest), I am
> doing >> following steps:
> >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> >> 2) SQLExec(); // execute the prepared statement
> >> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
> >>
> >> When I check the str_len_ind value, I get -1 & the
> buffer >> has nulls.
> >>
> >> My this same code sequence works fine for SQL_C_CHAR
> type >> columns for this same installation. Just that
> binary & >> image columns are having issues.
> >>
> >> Should I provide the actual code snippets for you to
> >> examine?
> >>
> >> Thanks and Regards.
> >> -------------
> >> > Hi
> >> >
> >> > sybase.public.connectivity.odbc is the correct forum.
> >> >
> >> > What is the exact driver version and exactly what are
> >> > you doing in ODBC Test?
> >> > I haven't tried this in x64 machine but should work.
> I >> > don't know how OdbcTest handles retrieval of
> >> > the data when it's image - should printout a bunch of
> >> > binary numbers.
> >> >
> >> > I did simple test on x86 machine using 15.7.104.0
> Driver >> > and it seems to work okay but didn't do this
> on real >> > large image.
> >> >
> >> > -Paul
> >> >
> >> >
> >> >
> >> > <bganes> wrote in message
> >> > > news:4f3c76bc.44fb.1681692777@sybase.com... Dear
> All, >> > > I am new to Sybase ASE. I am trying to fetch
> image, >> > > binary data stored in Sybase ASE DB (on
> Windows7 >> > > 64bit) using ODBC (C++) from Windows7
> 64bit. >> > > Data can be seen by right click & selecting
> "View data >> > > in Interactive SQL" from "Sybase
> Central" - which is >> > > nothing but "select * from
> <tablename>. >> > > But, same query ran thru SQLExecDirect
> from ODBC app, >> > > gives NULL data. Data buffer is
> SQLBindCol with >> > > SQL_C_BINARY data type.
> >> > > I am using 64bit ODBC driver.
> >> > >
> >> > > Sorry if this is not the correct forum for ODBC
> >> > questions. >
> >> > > Can you please help me know, how can I get the
> image >> > > data correctly in ODBC application?
> >> > >
> >> > > Thanks.
> >> >
> >> >
>
>


bganes Posted on 2012-02-23 07:27:50.0Z
Sender: 1401.4f45e90c.1804289383@sybase.com
From: Bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f45ea76.1476.1681692777@sybase.com>
References: <4f448ca4.49be.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 22 Feb 2012 23:27:50 -0800
X-Trace: forums-1-dub 1329982070 172.20.134.41 (22 Feb 2012 23:27:50 -0800)
X-Original-Trace: 22 Feb 2012 23:27:50 -0800, 172.20.134.41
Lines: 172
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30942
Article PK: 73831

Respected Paul Sir,

I tested my application today with 32bit SybaseASE (15.7 -
developer edition) also and I got same behaviour with this
32bit ODBC driver (version 15.7.0.80) also.

I think this could b an issue with this version of ODBC
driver.
I tried to download the higher version of ODBC driver that
you mentioned, but I could not find that on sybase website.

Which is the correct URL to use for accessing this download?

Please help

Thanks and Regards
-------------------------------

> Dear Paul,
>
> Thanks for the response.
>
> Code snippet which reads image column in 64bit ODBC
> application:
> (This same code works for other DBs like DB2, Oracle,
> MySQL).
> // prepare query:
> wchar_t *query = _T("select * from mytable NOLOCK;");
> SQLRETURN ret = 0;
> ret = SQLPrepare(stmt, query, SQL_NTS);
> if (!SQL_SUCCEEDED(ret))
> {
> TRACE("SybAse:SQLprepare failed.");
> DbException::sqlErrorInfo(SQL_HANDLE_STMT, stmt);
> throw DbException(std::string(""));
> }
> // bind to column:
> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
> m_colValue[0], m_len, &m_LenInd[0]);
> // Execute query:
> ret = SQLExecute(stmt);
> // fetch rows
> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO == ret)
> {
> do {
> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT, 0);
> // handle data per row here...
> } while(SQL_SUCCEEDED(ret));
> }
>
> Thanks and Regards.
> ------------------------------------------------------
> > Hi,
> >
> > You should be able to download the ESD#1 (104 build)
> > from the Sybase Downloads website - it's under the
> > Software Develop Kit.
> >
> > If you have license for ASE 15.7 then you are eligible
> > for this release.
> >
> > You might want to provide code snippets so I can take a
> > look or it might be best for you to start case with
> > Tech Support for further assistance.
> >
> > Thank you,
> > -Paul
> >
> > <Bganes> wrote in message
> > > news:4f41f026.4d32.1681692777@sybase.com... Dear Paul
> > >
> > > Can you please help me know if this is a issue with 64
> > > bit ODBC driver or do I need to upgrade the ODBC
> > > driver on my server from 15.7.0.80.1008 to 15.7.104.0?
> > >
> > > How / from where can I get the driver 15.7.104.0 for
> > > X64 Windows 7?
> > >
> > > Please guide.
> > >
> > > Thanks for your help.
> > >
> > > Best Regards.
> > >
> > >> Hi,
> > >>
> > >> Driver details are as below:
> > >>
> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
> > >> SybaseACE
> > >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
> > >> /P/X64/Windows Server/ase157/282
> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC
> > 21:01:39 >> 2011
> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC
> > 01:00:28 >> 2011
> > >>
> > >> > odbcversion.exe -fullversion
> > >> Sybase ASE ODBC
> > >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
> > >> 80/64-bit/Normal/
> > >> Thu Aug 25 UTC 22:10:30 2011
> > >>
> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
> > >> SQL_DRIVER_ODBC_VER:03.51
> > >> SQL_DRIVER_VER:15.7.0.80
> > >>
> > >> NULL is returned not only for the image that I
> > inserted >> (using bcp) but also for "pic" column (image
> > type) in >> pubs2.au_pix (User Tables) the sample table
> > generated at >> ASE installation.
> > >>
> > >> In my ODBC application (& not in a ODBCTest), I am
> > doing >> following steps:
> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> > >> 2) SQLExec(); // execute the prepared statement
> > >> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
> > >>
> > >> When I check the str_len_ind value, I get -1 & the
> > buffer >> has nulls.
> > >>
> > >> My this same code sequence works fine for SQL_C_CHAR
> > type >> columns for this same installation. Just that
> > binary & >> image columns are having issues.
> > >>
> > >> Should I provide the actual code snippets for you to
> > >> examine?
> > >>
> > >> Thanks and Regards.
> > >> -------------
> > >> > Hi
> > >> >
> > >> > sybase.public.connectivity.odbc is the correct
> > forum. >> >
> > >> > What is the exact driver version and exactly what
> > are >> > you doing in ODBC Test?
> > >> > I haven't tried this in x64 machine but should
> > work. I >> > don't know how OdbcTest handles retrieval
> > of >> > the data when it's image - should printout a
> > bunch of >> > binary numbers.
> > >> >
> > >> > I did simple test on x86 machine using 15.7.104.0
> > Driver >> > and it seems to work okay but didn't do
> > this on real >> > large image.
> > >> >
> > >> > -Paul
> > >> >
> > >> >
> > >> >
> > >> > <bganes> wrote in message
> > >> > > news:4f3c76bc.44fb.1681692777@sybase.com... Dear
> > All, >> > > I am new to Sybase ASE. I am trying to fetch
> > image, >> > > binary data stored in Sybase ASE DB (on
> > Windows7 >> > > 64bit) using ODBC (C++) from Windows7
> > 64bit. >> > > Data can be seen by right click &
> > selecting "View data >> > > in Interactive SQL" from
> > "Sybase Central" - which is >> > > nothing but "select *
> > from <tablename>. >> > > But, same query ran thru
> > SQLExecDirect from ODBC app, >> > > gives NULL data.
> > Data buffer is SQLBindCol with >> > > SQL_C_BINARY data
> > type. >> > > I am using 64bit ODBC driver.
> > >> > >
> > >> > > Sorry if this is not the correct forum for ODBC
> > >> > questions. >
> > >> > > Can you please help me know, how can I get the
> > image >> > > data correctly in ODBC application?
> > >> > >
> > >> > > Thanks.
> > >> >
> > >> >
> >
> >


Paul Vero [Sybase] Posted on 2012-02-27 21:15:46.0Z
From: "Paul Vero [Sybase]" <pvero@nospam.com>
Newsgroups: sybase.public.ase.general
References: <4f448ca4.49be.1681692777@sybase.com> <4f45ea76.1476.1681692777@sybase.com>
Subject: Re: select image, binary data from ASE using ODBC Windows64
Lines: 198
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f4bf282$1@forums-1-dub>
Date: 27 Feb 2012 13:15:46 -0800
X-Trace: forums-1-dub 1330377346 10.22.241.152 (27 Feb 2012 13:15:46 -0800)
X-Original-Trace: 27 Feb 2012 13:15:46 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30947
Article PK: 73837

Hi

You may need to open a tech support case so this can be investigated.

The Sybase url is www.sybase.com

Go to the Support tab and look for under Downlads "EBFs/Maintenance"

Then look for Software Developer Kit

Then look under the platform of the SDK you're developing under. If your
licensing is setup for this you'll see it otherwise you can only use the
developer's edition.

I'm thinking a tech support case might help.

Thank you,
-Paul


www.sybase.com

Then under

<Bganes> wrote in message news:4f45ea76.1476.1681692777@sybase.com...
> Respected Paul Sir,
>
> I tested my application today with 32bit SybaseASE (15.7 -
> developer edition) also and I got same behaviour with this
> 32bit ODBC driver (version 15.7.0.80) also.
>
> I think this could b an issue with this version of ODBC
> driver.
> I tried to download the higher version of ODBC driver that
> you mentioned, but I could not find that on sybase website.
>
> Which is the correct URL to use for accessing this download?
>
> Please help
>
> Thanks and Regards
> -------------------------------
>> Dear Paul,
>>
>> Thanks for the response.
>>
>> Code snippet which reads image column in 64bit ODBC
>> application:
>> (This same code works for other DBs like DB2, Oracle,
>> MySQL).
>> // prepare query:
>> wchar_t *query = _T("select * from mytable NOLOCK;");
>> SQLRETURN ret = 0;
>> ret = SQLPrepare(stmt, query, SQL_NTS);
>> if (!SQL_SUCCEEDED(ret))
>> {
>> TRACE("SybAse:SQLprepare failed.");
>> DbException::sqlErrorInfo(SQL_HANDLE_STMT, stmt);
>> throw DbException(std::string(""));
>> }
>> // bind to column:
>> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
>> m_colValue[0], m_len, &m_LenInd[0]);
>> // Execute query:
>> ret = SQLExecute(stmt);
>> // fetch rows
>> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO == ret)
>> {
>> do {
>> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT, 0);
>> // handle data per row here...
>> } while(SQL_SUCCEEDED(ret));
>> }
>>
>> Thanks and Regards.
>> ------------------------------------------------------
>> > Hi,
>> >
>> > You should be able to download the ESD#1 (104 build)
>> > from the Sybase Downloads website - it's under the
>> > Software Develop Kit.
>> >
>> > If you have license for ASE 15.7 then you are eligible
>> > for this release.
>> >
>> > You might want to provide code snippets so I can take a
>> > look or it might be best for you to start case with
>> > Tech Support for further assistance.
>> >
>> > Thank you,
>> > -Paul
>> >
>> > <Bganes> wrote in message
>> > > news:4f41f026.4d32.1681692777@sybase.com... Dear Paul
>> > >
>> > > Can you please help me know if this is a issue with 64
>> > > bit ODBC driver or do I need to upgrade the ODBC
>> > > driver on my server from 15.7.0.80.1008 to 15.7.104.0?
>> > >
>> > > How / from where can I get the driver 15.7.104.0 for
>> > > X64 Windows 7?
>> > >
>> > > Please guide.
>> > >
>> > > Thanks for your help.
>> > >
>> > > Best Regards.
>> > >
>> > >> Hi,
>> > >>
>> > >> Driver details are as below:
>> > >>
>> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe -connect
>> > >> SybaseACE
>> > >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
>> > >> /P/X64/Windows Server/ase157/282
>> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
>> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC
>> > 21:01:39 >> 2011
>> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC
>> > 01:00:28 >> 2011
>> > >>
>> > >> > odbcversion.exe -fullversion
>> > >> Sybase ASE ODBC
>> > >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
>> > >> 80/64-bit/Normal/
>> > >> Thu Aug 25 UTC 22:10:30 2011
>> > >>
>> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
>> > >> SQL_DRIVER_ODBC_VER:03.51
>> > >> SQL_DRIVER_VER:15.7.0.80
>> > >>
>> > >> NULL is returned not only for the image that I
>> > inserted >> (using bcp) but also for "pic" column (image
>> > type) in >> pubs2.au_pix (User Tables) the sample table
>> > generated at >> ASE installation.
>> > >>
>> > >> In my ODBC application (& not in a ODBCTest), I am
>> > doing >> following steps:
>> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
>> > >> 2) SQLExec(); // execute the prepared statement
>> > >> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
>> > >>
>> > >> When I check the str_len_ind value, I get -1 & the
>> > buffer >> has nulls.
>> > >>
>> > >> My this same code sequence works fine for SQL_C_CHAR
>> > type >> columns for this same installation. Just that
>> > binary & >> image columns are having issues.
>> > >>
>> > >> Should I provide the actual code snippets for you to
>> > >> examine?
>> > >>
>> > >> Thanks and Regards.
>> > >> -------------
>> > >> > Hi
>> > >> >
>> > >> > sybase.public.connectivity.odbc is the correct
>> > forum. >> >
>> > >> > What is the exact driver version and exactly what
>> > are >> > you doing in ODBC Test?
>> > >> > I haven't tried this in x64 machine but should
>> > work. I >> > don't know how OdbcTest handles retrieval
>> > of >> > the data when it's image - should printout a
>> > bunch of >> > binary numbers.
>> > >> >
>> > >> > I did simple test on x86 machine using 15.7.104.0
>> > Driver >> > and it seems to work okay but didn't do
>> > this on real >> > large image.
>> > >> >
>> > >> > -Paul
>> > >> >
>> > >> >
>> > >> >
>> > >> > <bganes> wrote in message
>> > >> > > news:4f3c76bc.44fb.1681692777@sybase.com... Dear
>> > All, >> > > I am new to Sybase ASE. I am trying to fetch
>> > image, >> > > binary data stored in Sybase ASE DB (on
>> > Windows7 >> > > 64bit) using ODBC (C++) from Windows7
>> > 64bit. >> > > Data can be seen by right click &
>> > selecting "View data >> > > in Interactive SQL" from
>> > "Sybase Central" - which is >> > > nothing but "select *
>> > from <tablename>. >> > > But, same query ran thru
>> > SQLExecDirect from ODBC app, >> > > gives NULL data.
>> > Data buffer is SQLBindCol with >> > > SQL_C_BINARY data
>> > type. >> > > I am using 64bit ODBC driver.
>> > >> > >
>> > >> > > Sorry if this is not the correct forum for ODBC
>> > >> > questions. >
>> > >> > > Can you please help me know, how can I get the
>> > image >> > > data correctly in ODBC application?
>> > >> > >
>> > >> > > Thanks.
>> > >> >
>> > >> >
>> >
>> >


bganes Posted on 2012-02-28 07:12:48.0Z
Sender: 67ea.4f4c484e.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f4c7e70.76b9.1681692777@sybase.com>
References: <4f4bf282$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 27 Feb 2012 23:12:48 -0800
X-Trace: forums-1-dub 1330413168 172.20.134.41 (27 Feb 2012 23:12:48 -0800)
X-Original-Trace: 27 Feb 2012 23:12:48 -0800, 172.20.134.41
Lines: 213
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30948
Article PK: 73838

Dear Paul,

As Im evaluating which database to you for our application,
I've been testing with a developer edition (an evaluation
copy) & so is not able to download this new odbc driver
referred by you.

Can I get the eval copy or developer edition of this new
odbc driver version, so that I can test with it if it works?

Thanks and Best Regards.

----------------

> Hi
>
> You may need to open a tech support case so this can be
> investigated.
>
> The Sybase url is www.sybase.com
>
> Go to the Support tab and look for under Downlads
> "EBFs/Maintenance"
>
> Then look for Software Developer Kit
>
> Then look under the platform of the SDK you're developing
> under. If your licensing is setup for this you'll see it
> otherwise you can only use the developer's edition.
>
> I'm thinking a tech support case might help.
>
> Thank you,
> -Paul
>
>
> www.sybase.com
>
> Then under
> <Bganes> wrote in message
> > news:4f45ea76.1476.1681692777@sybase.com... Respected
> Paul Sir, >
> > I tested my application today with 32bit SybaseASE (15.7
> > - developer edition) also and I got same behaviour with
> > this 32bit ODBC driver (version 15.7.0.80) also.
> >
> > I think this could b an issue with this version of ODBC
> > driver.
> > I tried to download the higher version of ODBC driver
> > that you mentioned, but I could not find that on sybase
> website. >
> > Which is the correct URL to use for accessing this
> download? >
> > Please help
> >
> > Thanks and Regards
> > -------------------------------
> >> Dear Paul,
> >>
> >> Thanks for the response.
> >>
> >> Code snippet which reads image column in 64bit ODBC
> >> application:
> >> (This same code works for other DBs like DB2, Oracle,
> >> MySQL).
> >> // prepare query:
> >> wchar_t *query = _T("select * from mytable NOLOCK;");
> >> SQLRETURN ret = 0;
> >> ret = SQLPrepare(stmt, query, SQL_NTS);
> >> if (!SQL_SUCCEEDED(ret))
> >> {
> >> TRACE("SybAse:SQLprepare failed.");
> >> DbException::sqlErrorInfo(SQL_HANDLE_STMT, stmt);
> >> throw DbException(std::string(""));
> >> }
> >> // bind to column:
> >> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
> >> m_colValue[0], m_len, &m_LenInd[0]);
> >> // Execute query:
> >> ret = SQLExecute(stmt);
> >> // fetch rows
> >> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO == ret)
> >> {
> >> do {
> >> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT, 0);
> >> // handle data per row here...
> >> } while(SQL_SUCCEEDED(ret));
> >> }
> >>
> >> Thanks and Regards.
> >> ------------------------------------------------------
> >> > Hi,
> >> >
> >> > You should be able to download the ESD#1 (104 build)
> >> > from the Sybase Downloads website - it's under the
> >> > Software Develop Kit.
> >> >
> >> > If you have license for ASE 15.7 then you are
> eligible >> > for this release.
> >> >
> >> > You might want to provide code snippets so I can take
> a >> > look or it might be best for you to start case
> with >> > Tech Support for further assistance.
> >> >
> >> > Thank you,
> >> > -Paul
> >> >
> >> > <Bganes> wrote in message
> >> > > news:4f41f026.4d32.1681692777@sybase.com... Dear
> Paul >> > >
> >> > > Can you please help me know if this is a issue with
> 64 >> > > bit ODBC driver or do I need to upgrade the ODBC
> >> > > driver on my server from 15.7.0.80.1008 to
> 15.7.104.0? >> > >
> >> > > How / from where can I get the driver 15.7.104.0
> for >> > > X64 Windows 7?
> >> > >
> >> > > Please guide.
> >> > >
> >> > > Thanks for your help.
> >> > >
> >> > > Best Regards.
> >> > >
> >> > >> Hi,
> >> > >>
> >> > >> Driver details are as below:
> >> > >>
> >> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe
> -connect >> > >> SybaseACE
> >> > >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
> >> > >> /P/X64/Windows Server/ase157/282
> >> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> >> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC
> >> > 21:01:39 >> 2011
> >> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC
> >> > 01:00:28 >> 2011
> >> > >>
> >> > >> > odbcversion.exe -fullversion
> >> > >> Sybase ASE ODBC
> >> > >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
> >> > >> 80/64-bit/Normal/
> >> > >> Thu Aug 25 UTC 22:10:30 2011
> >> > >>
> >> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
> >> > >> SQL_DRIVER_ODBC_VER:03.51
> >> > >> SQL_DRIVER_VER:15.7.0.80
> >> > >>
> >> > >> NULL is returned not only for the image that I
> >> > inserted >> (using bcp) but also for "pic" column
> (image >> > type) in >> pubs2.au_pix (User Tables) the
> sample table >> > generated at >> ASE installation.
> >> > >>
> >> > >> In my ODBC application (& not in a ODBCTest), I am
> >> > doing >> following steps:
> >> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> >> > >> 2) SQLExec(); // execute the prepared statement
> >> > >> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
> >> > >>
> >> > >> When I check the str_len_ind value, I get -1 & the
> >> > buffer >> has nulls.
> >> > >>
> >> > >> My this same code sequence works fine for
> SQL_C_CHAR >> > type >> columns for this same
> installation. Just that >> > binary & >> image columns are
> having issues. >> > >>
> >> > >> Should I provide the actual code snippets for you
> to >> > >> examine?
> >> > >>
> >> > >> Thanks and Regards.
> >> > >> -------------
> >> > >> > Hi
> >> > >> >
> >> > >> > sybase.public.connectivity.odbc is the correct
> >> > forum. >> >
> >> > >> > What is the exact driver version and exactly
> what >> > are >> > you doing in ODBC Test?
> >> > >> > I haven't tried this in x64 machine but should
> >> > work. I >> > don't know how OdbcTest handles
> retrieval >> > of >> > the data when it's image - should
> printout a >> > bunch of >> > binary numbers.
> >> > >> >
> >> > >> > I did simple test on x86 machine using
> 15.7.104.0 >> > Driver >> > and it seems to work okay but
> didn't do >> > this on real >> > large image.
> >> > >> >
> >> > >> > -Paul
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > <bganes> wrote in message
> >> > >> > > news:4f3c76bc.44fb.1681692777@sybase.com...
> Dear >> > All, >> > > I am new to Sybase ASE. I am trying
> to fetch >> > image, >> > > binary data stored in Sybase
> ASE DB (on >> > Windows7 >> > > 64bit) using ODBC (C++)
> from Windows7 >> > 64bit. >> > > Data can be seen by right
> click & >> > selecting "View data >> > > in Interactive
> SQL" from >> > "Sybase Central" - which is >> > > nothing
> but "select * >> > from <tablename>. >> > > But, same
> query ran thru >> > SQLExecDirect from ODBC app, >> > >
> gives NULL data. >> > Data buffer is SQLBindCol with >> >
> > SQL_C_BINARY data >> > type. >> > > I am using 64bit
> ODBC driver. >> > >> > >
> >> > >> > > Sorry if this is not the correct forum for
> ODBC >> > >> > questions. >
> >> > >> > > Can you please help me know, how can I get the
> >> > image >> > > data correctly in ODBC application?
> >> > >> > >
> >> > >> > > Thanks.
> >> > >> >
> >> > >> >
> >> >
> >> >
>
>


Paul Vero [Sybase] Posted on 2012-02-28 23:22:44.0Z
From: "Paul Vero [Sybase]" <pvero@nospam.com>
Newsgroups: sybase.public.ase.general
References: <4f4bf282$1@forums-1-dub> <4f4c7e70.76b9.1681692777@sybase.com>
Subject: Re: select image, binary data from ASE using ODBC Windows64
Lines: 221
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f4d61c4$1@forums-1-dub>
Date: 28 Feb 2012 15:22:44 -0800
X-Trace: forums-1-dub 1330471364 10.22.241.152 (28 Feb 2012 15:22:44 -0800)
X-Original-Trace: 28 Feb 2012 15:22:44 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30955
Article PK: 73845

You have a relatively currect version - 15.7.0.80. When I get a chance I
can check out the code - what platform is this - is it Windows ODBC Driver?

-Paul

<bganes> wrote in message news:4f4c7e70.76b9.1681692777@sybase.com...
> Dear Paul,
>
> As Im evaluating which database to you for our application,
> I've been testing with a developer edition (an evaluation
> copy) & so is not able to download this new odbc driver
> referred by you.
>
> Can I get the eval copy or developer edition of this new
> odbc driver version, so that I can test with it if it works?
>
> Thanks and Best Regards.
>
> ----------------
>> Hi
>>
>> You may need to open a tech support case so this can be
>> investigated.
>>
>> The Sybase url is www.sybase.com
>>
>> Go to the Support tab and look for under Downlads
>> "EBFs/Maintenance"
>>
>> Then look for Software Developer Kit
>>
>> Then look under the platform of the SDK you're developing
>> under. If your licensing is setup for this you'll see it
>> otherwise you can only use the developer's edition.
>>
>> I'm thinking a tech support case might help.
>>
>> Thank you,
>> -Paul
>>
>>
>> www.sybase.com
>>
>> Then under
>> <Bganes> wrote in message
>> > news:4f45ea76.1476.1681692777@sybase.com... Respected
>> Paul Sir, >
>> > I tested my application today with 32bit SybaseASE (15.7
>> > - developer edition) also and I got same behaviour with
>> > this 32bit ODBC driver (version 15.7.0.80) also.
>> >
>> > I think this could b an issue with this version of ODBC
>> > driver.
>> > I tried to download the higher version of ODBC driver
>> > that you mentioned, but I could not find that on sybase
>> website. >
>> > Which is the correct URL to use for accessing this
>> download? >
>> > Please help
>> >
>> > Thanks and Regards
>> > -------------------------------
>> >> Dear Paul,
>> >>
>> >> Thanks for the response.
>> >>
>> >> Code snippet which reads image column in 64bit ODBC
>> >> application:
>> >> (This same code works for other DBs like DB2, Oracle,
>> >> MySQL).
>> >> // prepare query:
>> >> wchar_t *query = _T("select * from mytable NOLOCK;");
>> >> SQLRETURN ret = 0;
>> >> ret = SQLPrepare(stmt, query, SQL_NTS);
>> >> if (!SQL_SUCCEEDED(ret))
>> >> {
>> >> TRACE("SybAse:SQLprepare failed.");
>> >> DbException::sqlErrorInfo(SQL_HANDLE_STMT, stmt);
>> >> throw DbException(std::string(""));
>> >> }
>> >> // bind to column:
>> >> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
>> >> m_colValue[0], m_len, &m_LenInd[0]);
>> >> // Execute query:
>> >> ret = SQLExecute(stmt);
>> >> // fetch rows
>> >> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO == ret)
>> >> {
>> >> do {
>> >> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT, 0);
>> >> // handle data per row here...
>> >> } while(SQL_SUCCEEDED(ret));
>> >> }
>> >>
>> >> Thanks and Regards.
>> >> ------------------------------------------------------
>> >> > Hi,
>> >> >
>> >> > You should be able to download the ESD#1 (104 build)
>> >> > from the Sybase Downloads website - it's under the
>> >> > Software Develop Kit.
>> >> >
>> >> > If you have license for ASE 15.7 then you are
>> eligible >> > for this release.
>> >> >
>> >> > You might want to provide code snippets so I can take
>> a >> > look or it might be best for you to start case
>> with >> > Tech Support for further assistance.
>> >> >
>> >> > Thank you,
>> >> > -Paul
>> >> >
>> >> > <Bganes> wrote in message
>> >> > > news:4f41f026.4d32.1681692777@sybase.com... Dear
>> Paul >> > >
>> >> > > Can you please help me know if this is a issue with
>> 64 >> > > bit ODBC driver or do I need to upgrade the ODBC
>> >> > > driver on my server from 15.7.0.80.1008 to
>> 15.7.104.0? >> > >
>> >> > > How / from where can I get the driver 15.7.104.0
>> for >> > > X64 Windows 7?
>> >> > >
>> >> > > Please guide.
>> >> > >
>> >> > > Thanks for your help.
>> >> > >
>> >> > > Best Regards.
>> >> > >
>> >> > >> Hi,
>> >> > >>
>> >> > >> Driver details are as below:
>> >> > >>
>> >> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe
>> -connect >> > >> SybaseACE
>> >> > >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
>> >> > >> /P/X64/Windows Server/ase157/282
>> >> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
>> >> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25 UTC
>> >> > 21:01:39 >> 2011
>> >> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26 UTC
>> >> > 01:00:28 >> 2011
>> >> > >>
>> >> > >> > odbcversion.exe -fullversion
>> >> > >> Sybase ASE ODBC
>> >> > >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
>> >> > >> 80/64-bit/Normal/
>> >> > >> Thu Aug 25 UTC 22:10:30 2011
>> >> > >>
>> >> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
>> >> > >> SQL_DRIVER_ODBC_VER:03.51
>> >> > >> SQL_DRIVER_VER:15.7.0.80
>> >> > >>
>> >> > >> NULL is returned not only for the image that I
>> >> > inserted >> (using bcp) but also for "pic" column
>> (image >> > type) in >> pubs2.au_pix (User Tables) the
>> sample table >> > generated at >> ASE installation.
>> >> > >>
>> >> > >> In my ODBC application (& not in a ODBCTest), I am
>> >> > doing >> following steps:
>> >> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
>> >> > >> 2) SQLExec(); // execute the prepared statement
>> >> > >> 3) SQLFetchScroll(); // fetch a rowset of 5 rows
>> >> > >>
>> >> > >> When I check the str_len_ind value, I get -1 & the
>> >> > buffer >> has nulls.
>> >> > >>
>> >> > >> My this same code sequence works fine for
>> SQL_C_CHAR >> > type >> columns for this same
>> installation. Just that >> > binary & >> image columns are
>> having issues. >> > >>
>> >> > >> Should I provide the actual code snippets for you
>> to >> > >> examine?
>> >> > >>
>> >> > >> Thanks and Regards.
>> >> > >> -------------
>> >> > >> > Hi
>> >> > >> >
>> >> > >> > sybase.public.connectivity.odbc is the correct
>> >> > forum. >> >
>> >> > >> > What is the exact driver version and exactly
>> what >> > are >> > you doing in ODBC Test?
>> >> > >> > I haven't tried this in x64 machine but should
>> >> > work. I >> > don't know how OdbcTest handles
>> retrieval >> > of >> > the data when it's image - should
>> printout a >> > bunch of >> > binary numbers.
>> >> > >> >
>> >> > >> > I did simple test on x86 machine using
>> 15.7.104.0 >> > Driver >> > and it seems to work okay but
>> didn't do >> > this on real >> > large image.
>> >> > >> >
>> >> > >> > -Paul
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > <bganes> wrote in message
>> >> > >> > > news:4f3c76bc.44fb.1681692777@sybase.com...
>> Dear >> > All, >> > > I am new to Sybase ASE. I am trying
>> to fetch >> > image, >> > > binary data stored in Sybase
>> ASE DB (on >> > Windows7 >> > > 64bit) using ODBC (C++)
>> from Windows7 >> > 64bit. >> > > Data can be seen by right
>> click & >> > selecting "View data >> > > in Interactive
>> SQL" from >> > "Sybase Central" - which is >> > > nothing
>> but "select * >> > from <tablename>. >> > > But, same
>> query ran thru >> > SQLExecDirect from ODBC app, >> > >
>> gives NULL data. >> > Data buffer is SQLBindCol with >> >
>> > SQL_C_BINARY data >> > type. >> > > I am using 64bit
>> ODBC driver. >> > >> > >
>> >> > >> > > Sorry if this is not the correct forum for
>> ODBC >> > >> > questions. >
>> >> > >> > > Can you please help me know, how can I get the
>> >> > image >> > > data correctly in ODBC application?
>> >> > >> > >
>> >> > >> > > Thanks.
>> >> > >> >
>> >> > >> >
>> >> >
>> >> >
>>
>>


bganes Posted on 2012-02-29 01:23:57.0Z
Sender: 3776.4f4d7da4.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f4d7e2d.379b.1681692777@sybase.com>
References: <4f4d61c4$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 28 Feb 2012 17:23:57 -0800
X-Trace: forums-1-dub 1330478637 172.20.134.41 (28 Feb 2012 17:23:57 -0800)
X-Original-Trace: 28 Feb 2012 17:23:57 -0800, 172.20.134.41
Lines: 229
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30957
Article PK: 73848

Dear Sir,

Yes, this is a Windows 64bit ODBC driver, being tested on
Windows 7 64bit.

Thanks
---------------

> You have a relatively currect version - 15.7.0.80. When I
> get a chance I can check out the code - what platform is
> this - is it Windows ODBC Driver?
>
> -Paul
>
> <bganes> wrote in message
> > news:4f4c7e70.76b9.1681692777@sybase.com... Dear Paul,
> >
> > As Im evaluating which database to you for our
> > application, I've been testing with a developer edition
> > (an evaluation copy) & so is not able to download this
> > new odbc driver referred by you.
> >
> > Can I get the eval copy or developer edition of this new
> > odbc driver version, so that I can test with it if it
> works? >
> > Thanks and Best Regards.
> >
> > ----------------
> >> Hi
> >>
> >> You may need to open a tech support case so this can be
> >> investigated.
> >>
> >> The Sybase url is www.sybase.com
> >>
> >> Go to the Support tab and look for under Downlads
> >> "EBFs/Maintenance"
> >>
> >> Then look for Software Developer Kit
> >>
> >> Then look under the platform of the SDK you're
> developing >> under. If your licensing is setup for this
> you'll see it >> otherwise you can only use the
> developer's edition. >>
> >> I'm thinking a tech support case might help.
> >>
> >> Thank you,
> >> -Paul
> >>
> >>
> >> www.sybase.com
> >>
> >> Then under
> >> <Bganes> wrote in message
> >> > news:4f45ea76.1476.1681692777@sybase.com... Respected
> >> Paul Sir, >
> >> > I tested my application today with 32bit SybaseASE
> (15.7 >> > - developer edition) also and I got same
> behaviour with >> > this 32bit ODBC driver (version
> 15.7.0.80) also. >> >
> >> > I think this could b an issue with this version of
> ODBC >> > driver.
> >> > I tried to download the higher version of ODBC driver
> >> > that you mentioned, but I could not find that on
> sybase >> website. >
> >> > Which is the correct URL to use for accessing this
> >> download? >
> >> > Please help
> >> >
> >> > Thanks and Regards
> >> > -------------------------------
> >> >> Dear Paul,
> >> >>
> >> >> Thanks for the response.
> >> >>
> >> >> Code snippet which reads image column in 64bit ODBC
> >> >> application:
> >> >> (This same code works for other DBs like DB2, Oracle
> , >> >> MySQL).
> >> >> // prepare query:
> >> >> wchar_t *query = _T("select * from mytable NOLOCK;")
> ; >> >> SQLRETURN ret = 0;
> >> >> ret = SQLPrepare(stmt, query, SQL_NTS);
> >> >> if (!SQL_SUCCEEDED(ret))
> >> >> {
> >> >> TRACE("SybAse:SQLprepare failed.");
> >> >> DbException::sqlErrorInfo(SQL_HANDLE_STMT,
> stmt); >> >> throw DbException(std::string(""));
> >> >> }
> >> >> // bind to column:
> >> >> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
> >> >> m_colValue[0], m_len, &m_LenInd[0]);
> >> >> // Execute query:
> >> >> ret = SQLExecute(stmt);
> >> >> // fetch rows
> >> >> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO ==
> ret) >> >> {
> >> >> do {
> >> >> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT,
> 0); >> >> // handle data per row here...
> >> >> } while(SQL_SUCCEEDED(ret));
> >> >> }
> >> >>
> >> >> Thanks and Regards.
> >> >>
> ------------------------------------------------------ >>
> >> > Hi, >> >> >
> >> >> > You should be able to download the ESD#1 (104
> build) >> >> > from the Sybase Downloads website - it's
> under the >> >> > Software Develop Kit.
> >> >> >
> >> >> > If you have license for ASE 15.7 then you are
> >> eligible >> > for this release.
> >> >> >
> >> >> > You might want to provide code snippets so I can
> take >> a >> > look or it might be best for you to start
> case >> with >> > Tech Support for further assistance.
> >> >> >
> >> >> > Thank you,
> >> >> > -Paul
> >> >> >
> >> >> > <Bganes> wrote in message
> >> >> > > news:4f41f026.4d32.1681692777@sybase.com... Dear
> >> Paul >> > >
> >> >> > > Can you please help me know if this is a issue
> with >> 64 >> > > bit ODBC driver or do I need to upgrade
> the ODBC >> >> > > driver on my server from 15.7.0.80.1008
> to >> 15.7.104.0? >> > >
> >> >> > > How / from where can I get the driver 15.7.104.0
> >> for >> > > X64 Windows 7?
> >> >> > >
> >> >> > > Please guide.
> >> >> > >
> >> >> > > Thanks for your help.
> >> >> > >
> >> >> > > Best Regards.
> >> >> > >
> >> >> > >> Hi,
> >> >> > >>
> >> >> > >> Driver details are as below:
> >> >> > >>
> >> >> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe
> >> -connect >> > >> SybaseACE
> >> >> > >> Adaptive Server Enterprise/15.7.0/EBF 19496 SMP
> >> >> > >> /P/X64/Windows Server/ase157/282
> >> >> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> >> >> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25
> UTC >> >> > 21:01:39 >> 2011
> >> >> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26
> UTC >> >> > 01:00:28 >> 2011
> >> >> > >>
> >> >> > >> > odbcversion.exe -fullversion
> >> >> > >> Sybase ASE ODBC
> >> >> > >> Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build
> >> >> > >> 80/64-bit/Normal/
> >> >> > >> Thu Aug 25 UTC 22:10:30 2011
> >> >> > >>
> >> >> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
> >> >> > >> SQL_DRIVER_ODBC_VER:03.51
> >> >> > >> SQL_DRIVER_VER:15.7.0.80
> >> >> > >>
> >> >> > >> NULL is returned not only for the image that I
> >> >> > inserted >> (using bcp) but also for "pic" column
> >> (image >> > type) in >> pubs2.au_pix (User Tables) the
> >> sample table >> > generated at >> ASE installation.
> >> >> > >>
> >> >> > >> In my ODBC application (& not in a ODBCTest), I
> am >> >> > doing >> following steps:
> >> >> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> >> >> > >> 2) SQLExec(); // execute the prepared statement
> >> >> > >> 3) SQLFetchScroll(); // fetch a rowset of 5
> rows >> >> > >>
> >> >> > >> When I check the str_len_ind value, I get -1 &
> the >> >> > buffer >> has nulls.
> >> >> > >>
> >> >> > >> My this same code sequence works fine for
> >> SQL_C_CHAR >> > type >> columns for this same
> >> installation. Just that >> > binary & >> image columns
> are >> having issues. >> > >>
> >> >> > >> Should I provide the actual code snippets for
> you >> to >> > >> examine?
> >> >> > >>
> >> >> > >> Thanks and Regards.
> >> >> > >> -------------
> >> >> > >> > Hi
> >> >> > >> >
> >> >> > >> > sybase.public.connectivity.odbc is the
> correct >> >> > forum. >> >
> >> >> > >> > What is the exact driver version and exactly
> >> what >> > are >> > you doing in ODBC Test?
> >> >> > >> > I haven't tried this in x64 machine but
> should >> >> > work. I >> > don't know how OdbcTest
> handles >> retrieval >> > of >> > the data when it's image
> - should >> printout a >> > bunch of >> > binary numbers.
> >> >> > >> >
> >> >> > >> > I did simple test on x86 machine using
> >> 15.7.104.0 >> > Driver >> > and it seems to work okay
> but >> didn't do >> > this on real >> > large image.
> >> >> > >> >
> >> >> > >> > -Paul
> >> >> > >> >
> >> >> > >> >
> >> >> > >> >
> >> >> > >> > <bganes> wrote in message
> >> >> > >> > > news:4f3c76bc.44fb.1681692777@sybase.com...
> >> Dear >> > All, >> > > I am new to Sybase ASE. I am
> trying >> to fetch >> > image, >> > > binary data stored
> in Sybase >> ASE DB (on >> > Windows7 >> > > 64bit) using
> ODBC (C++) >> from Windows7 >> > 64bit. >> > > Data can be
> seen by right >> click & >> > selecting "View data >> > >
> in Interactive >> SQL" from >> > "Sybase Central" - which
> is >> > > nothing >> but "select * >> > from <tablename>.
> >> > > But, same >> query ran thru >> > SQLExecDirect from
> ODBC app, >> > > >> gives NULL data. >> > Data buffer is
> SQLBindCol with >> > >> > SQL_C_BINARY data >> > type. >>
> > > I am using 64bit >> ODBC driver. >> > >> > >
> >> >> > >> > > Sorry if this is not the correct forum for
> >> ODBC >> > >> > questions. >
> >> >> > >> > > Can you please help me know, how can I get
> the >> >> > image >> > > data correctly in ODBC
> application? >> >> > >> > >
> >> >> > >> > > Thanks.
> >> >> > >> >
> >> >> > >> >
> >> >> >
> >> >> >
> >>
> >>
>
>


bganes Posted on 2012-03-05 03:15:27.0Z
Sender: 280b.4f541ec0.1804289383@sybase.com
From: bganes
Newsgroups: sybase.public.ase.general
Subject: Re: select image, binary data from ASE using ODBC Windows64
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f542fcf.2a9e.1681692777@sybase.com>
References: <4f4d7e2d.379b.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 4 Mar 2012 19:15:27 -0800
X-Trace: forums-1-dub 1330917327 172.20.134.41 (4 Mar 2012 19:15:27 -0800)
X-Original-Trace: 4 Mar 2012 19:15:27 -0800, 172.20.134.41
Lines: 245
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30978
Article PK: 73865

Dear Paul,

Did you get a chance to look at this?

Meanwhile, I found that binary data could be fetched
properly, but in somewhat tedious way.

If I use "convert(binary, <columname>)" function in select
statement, then only the hex encoded data can be fetched
correctly.
Why is this dependency?
Can you please shed some light?

Thanks and Regards.
--------------

> Dear Sir,
>
> Yes, this is a Windows 64bit ODBC driver, being tested on
> Windows 7 64bit.
>
> Thanks
> ---------------
> > You have a relatively currect version - 15.7.0.80. When
> > I get a chance I can check out the code - what platform
> > is this - is it Windows ODBC Driver?
> >
> > -Paul
> >
> > <bganes> wrote in message
> > > news:4f4c7e70.76b9.1681692777@sybase.com... Dear Paul,
> > >
> > > As Im evaluating which database to you for our
> > > application, I've been testing with a developer
> > > edition (an evaluation copy) & so is not able to
> > > download this new odbc driver referred by you.
> > >
> > > Can I get the eval copy or developer edition of this
> > > new odbc driver version, so that I can test with it if
> > it works? >
> > > Thanks and Best Regards.
> > >
> > > ----------------
> > >> Hi
> > >>
> > >> You may need to open a tech support case so this can
> > be >> investigated.
> > >>
> > >> The Sybase url is www.sybase.com
> > >>
> > >> Go to the Support tab and look for under Downlads
> > >> "EBFs/Maintenance"
> > >>
> > >> Then look for Software Developer Kit
> > >>
> > >> Then look under the platform of the SDK you're
> > developing >> under. If your licensing is setup for
> > this you'll see it >> otherwise you can only use the
> > developer's edition. >>
> > >> I'm thinking a tech support case might help.
> > >>
> > >> Thank you,
> > >> -Paul
> > >>
> > >>
> > >> www.sybase.com
> > >>
> > >> Then under
> > >> <Bganes> wrote in message
> > >> > news:4f45ea76.1476.1681692777@sybase.com...
> > Respected >> Paul Sir, >
> > >> > I tested my application today with 32bit SybaseASE
> > (15.7 >> > - developer edition) also and I got same
> > behaviour with >> > this 32bit ODBC driver (version
> > 15.7.0.80) also. >> >
> > >> > I think this could b an issue with this version of
> > ODBC >> > driver.
> > >> > I tried to download the higher version of ODBC
> > driver >> > that you mentioned, but I could not find
> > that on sybase >> website. >
> > >> > Which is the correct URL to use for accessing this
> > >> download? >
> > >> > Please help
> > >> >
> > >> > Thanks and Regards
> > >> > -------------------------------
> > >> >> Dear Paul,
> > >> >>
> > >> >> Thanks for the response.
> > >> >>
> > >> >> Code snippet which reads image column in 64bit
> > ODBC >> >> application:
> > >> >> (This same code works for other DBs like DB2,
> > Oracle , >> >> MySQL).
> > >> >> // prepare query:
> > >> >> wchar_t *query = _T("select * from mytable NOLOCK
> > ;") ; >> >> SQLRETURN ret = 0;
> > >> >> ret = SQLPrepare(stmt, query, SQL_NTS);
> > >> >> if (!SQL_SUCCEEDED(ret))
> > >> >> {
> > >> >> TRACE("SybAse:SQLprepare failed.");
> > >> >> DbException::sqlErrorInfo(SQL_HANDLE_STMT,
> > stmt); >> >> throw DbException(std::string(""));
> > >> >> }
> > >> >> // bind to column:
> > >> >> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
> > >> >> m_colValue[0], m_len, &m_LenInd[0]);
> > >> >> // Execute query:
> > >> >> ret = SQLExecute(stmt);
> > >> >> // fetch rows
> > >> >> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO ==
> > ret) >> >> {
> > >> >> do {
> > >> >> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT,
> > 0); >> >> // handle data per row here...
> > >> >> } while(SQL_SUCCEEDED(ret));
> > >> >> }
> > >> >>
> > >> >> Thanks and Regards.
> > >> >>
> > ------------------------------------------------------
> > >> >> > Hi, >> >> >
> > >> >> > You should be able to download the ESD#1 (104
> > build) >> >> > from the Sybase Downloads website - it's
> > under the >> >> > Software Develop Kit.
> > >> >> >
> > >> >> > If you have license for ASE 15.7 then you are
> > >> eligible >> > for this release.
> > >> >> >
> > >> >> > You might want to provide code snippets so I can
> > take >> a >> > look or it might be best for you to
> > start case >> with >> > Tech Support for further
> > assistance. >> >> >
> > >> >> > Thank you,
> > >> >> > -Paul
> > >> >> >
> > >> >> > <Bganes> wrote in message
> > >> >> > > news:4f41f026.4d32.1681692777@sybase.com...
> > Dear >> Paul >> > >
> > >> >> > > Can you please help me know if this is a issue
> > with >> 64 >> > > bit ODBC driver or do I need to
> > upgrade the ODBC >> >> > > driver on my server from
> > 15.7.0.80.1008 to >> 15.7.104.0? >> > >
> > >> >> > > How / from where can I get the driver
> > 15.7.104.0 >> for >> > > X64 Windows 7?
> > >> >> > >
> > >> >> > > Please guide.
> > >> >> > >
> > >> >> > > Thanks for your help.
> > >> >> > >
> > >> >> > > Best Regards.
> > >> >> > >
> > >> >> > >> Hi,
> > >> >> > >>
> > >> >> > >> Driver details are as below:
> > >> >> > >>
> > >> >> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe
> > >> -connect >> > >> SybaseACE
> > >> >> > >> Adaptive Server Enterprise/15.7.0/EBF 19496
> > SMP >> >> > >> /P/X64/Windows Server/ase157/282
> > >> >> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
> > >> >> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25
> > UTC >> >> > 21:01:39 >> 2011
> > >> >> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26
> > UTC >> >> > 01:00:28 >> 2011
> > >> >> > >>
> > >> >> > >> > odbcversion.exe -fullversion
> > >> >> > >> Sybase ASE ODBC
> > >> >> > >>
> > Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build >> >> >
> > >> 80/64-bit/Normal/ >> >> > >> Thu Aug 25 UTC 22:10:30
> > 2011 >> >> > >>
> > >> >> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
> > >> >> > >> SQL_DRIVER_ODBC_VER:03.51
> > >> >> > >> SQL_DRIVER_VER:15.7.0.80
> > >> >> > >>
> > >> >> > >> NULL is returned not only for the image that
> > I >> >> > inserted >> (using bcp) but also for "pic"
> > column >> (image >> > type) in >> pubs2.au_pix (User
> > Tables) the >> sample table >> > generated at >> ASE
> > installation. >> >> > >>
> > >> >> > >> In my ODBC application (& not in a ODBCTest),
> > I am >> >> > doing >> following steps:
> > >> >> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
> > >> >> > >> 2) SQLExec(); // execute the prepared
> > statement >> >> > >> 3) SQLFetchScroll(); // fetch a
> > rowset of 5 rows >> >> > >>
> > >> >> > >> When I check the str_len_ind value, I get -1
> > & the >> >> > buffer >> has nulls.
> > >> >> > >>
> > >> >> > >> My this same code sequence works fine for
> > >> SQL_C_CHAR >> > type >> columns for this same
> > >> installation. Just that >> > binary & >> image
> > columns are >> having issues. >> > >>
> > >> >> > >> Should I provide the actual code snippets for
> > you >> to >> > >> examine?
> > >> >> > >>
> > >> >> > >> Thanks and Regards.
> > >> >> > >> -------------
> > >> >> > >> > Hi
> > >> >> > >> >
> > >> >> > >> > sybase.public.connectivity.odbc is the
> > correct >> >> > forum. >> >
> > >> >> > >> > What is the exact driver version and
> > exactly >> what >> > are >> > you doing in ODBC Test?
> > >> >> > >> > I haven't tried this in x64 machine but
> > should >> >> > work. I >> > don't know how OdbcTest
> > handles >> retrieval >> > of >> > the data when it's
> > image - should >> printout a >> > bunch of >> > binary
> > numbers. >> >> > >> >
> > >> >> > >> > I did simple test on x86 machine using
> > >> 15.7.104.0 >> > Driver >> > and it seems to work
> > okay but >> didn't do >> > this on real >> > large
> > image. >> >> > >> >
> > >> >> > >> > -Paul
> > >> >> > >> >
> > >> >> > >> >
> > >> >> > >> >
> > >> >> > >> > <bganes> wrote in message
> > >> >> > >> > >
> > news:4f3c76bc.44fb.1681692777@sybase.com... >> Dear >> >
> > All, >> > > I am new to Sybase ASE. I am trying >> to
> > fetch >> > image, >> > > binary data stored in Sybase >>
> > ASE DB (on >> > Windows7 >> > > 64bit) using ODBC (C++)
> > >> from Windows7 >> > 64bit. >> > > Data can be seen by
> > right >> click & >> > selecting "View data >> > > in
> > Interactive >> SQL" from >> > "Sybase Central" - which
> > is >> > > nothing >> but "select * >> > from
> <tablename>. >> > > But, same >> query ran thru >> >
> > SQLExecDirect from ODBC app, >> > > >> gives NULL data.
> > >> > Data buffer is SQLBindCol with >> > >> >
> > > > SQL_C_BINARY data >> > type. >> I am using 64bit >>
> > ODBC driver. >> > >> > > >> >> > >> > > Sorry if this is
> > not the correct forum for >> ODBC >> > >> > questions. >
> > >> >> > >> > > Can you please help me know, how can I
> > get the >> >> > image >> > > data correctly in ODBC
> > application? >> >> > >> > >
> > >> >> > >> > > Thanks.
> > >> >> > >> >
> > >> >> > >> >
> > >> >> >
> > >> >> >
> > >>
> > >>
> >
> >


Paul Vero [Sybase] Posted on 2012-03-05 23:21:27.0Z
From: "Paul Vero [Sybase]" <pvero@nospam.com>
Newsgroups: sybase.public.ase.general
References: <4f4d7e2d.379b.1681692777@sybase.com> <4f542fcf.2a9e.1681692777@sybase.com>
Subject: Re: select image, binary data from ASE using ODBC Windows64
Lines: 287
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f554a77$1@forums-1-dub>
Date: 5 Mar 2012 15:21:27 -0800
X-Trace: forums-1-dub 1330989687 10.22.241.152 (5 Mar 2012 15:21:27 -0800)
X-Original-Trace: 5 Mar 2012 15:21:27 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30981
Article PK: 73871

Hi,

How are you using ODBC Test?

If I use SQLExecDirect and get data all:

(I am using a simple test case)

Get Data All:
"c2"
0x12345678
1 row fetched from 1 column.

I can also use SQLBindCol using SQL_C_BINARY

I am using an image column to do this test.

I also have a .NET test application to load an image and in selecting from
odbc test:

(ODBCTest is truncating it for it's internal buffers):

SQLExecDirect:
In: hstmt = 0x00981BB8, szSqlStr = "select * from blobtest",
cbSqlStr = -3
Return: SQL_SUCCESS=0

Get Data All:
"blobId", "blobData"
1, TRUNC:
0xffd8ffe000104a46494600010200006400640000ffec00114475636b7900010004000000530000ffee000e41646f62650064c000000001ffdb008400020101010201020202020302020203030302020303040303030303040504040404040405050606070606050808090908080c0b0b0b0c0c0c0c0c0c0c0c0c0c0c01020202040404080505080b0907090b0d0d0d0d0d0d0d0c0c0c0c0c0d0d0c0c0c0c0c0c0d0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0cffc000110800cc010403011100021101031101ffc400c40000020203010101010000000000000000050604070203080100090a0100020301010101000000000000000000040502030601000708100001030205020403050407050508030001020304110500211206073113412214085161157181913223a1425216b1d16233241709c1e1433418f17292b253f082a2c293a34425543526110001030203030a040306050402030000010002031104211205f0314151618191a1d12213140671b1c115e132a2f1425262232492d233160782c24325638372e244ffda000c03010002110311003f00fcd3dc10512273ef493ae4b8e294e3aa4871454a035798d0d2b8ce4f3baabf41d9e9b049135ce68afc07725cb85a1849254aaa4f401a4d6bf8e2e82e1d440de6950b9f94003a077216bb2b9ddf22c007e2d8febc5dea1c96cba1c5c83b3b96b7ad5a5650e10bcb2a200cfedae26c9c938a0dda1c6780ecee40af7b6e494ea484804e4287e071679a96dce88d0301b75252bac67e3c8295a87dd5c5d03ea5269b4bcbbf6ec509c9cea455073ad33197f4e0a413ed5ad5f19b2346a5a814fc00ceb8f2164685be2f79c6f5a5440f90cffa71e5c65be658b9126a564f7174fb3fdf8f2bfedb51bb6ea5a56eca49cdc5fe1fefc7952fb02d52ade5c0e12b795422832f1afdb89c7bd571c02b8a20d32559870abe447fbf172bbd3b57b245c3b4120a680e5d6b8f2a668001828ce7ae48a929fc31e43794b0ef4bfe329f9a4949fc463d96aa0f6502fbbb33ff0059dffeaab1cf2d54be2e4bff00d65ffef2ca87e0698f64a29b1b52b2664be85d54eac839790e93f8d71d56f94a4b6653a40429d51eb42e1feac741a2eb6d339a229036e5de414a6a523a9256a565d3a5314cb2a7367a193b7e09c6cbc60d9652aeefea53cd54d453efc2e9a5c1696dbdb98d4edd898ed5b09949d25c0b34fca84e957df805f7995686d3dacc770dba93359b8d8eb4aaaa483954a943ff002d30aeff00543970e5db8ad3da7b2d8e38b78727ff00aa70b46dab042355d5c734d33717419835cc9f87c30abee8fdbf6a7907b5608f7b4750ee44666ed5331436cbda003401199e87c4149c45da83dd855336e8d6db830750ee41e44edcf2144f756e367302abad7e399562d8ee24e5f9a5
1 row fetched from 2 columns.

What happens when you do the ODBCTest ?

-Paul

<bganes> wrote in message news:4f542fcf.2a9e.1681692777@sybase.com...
> Dear Paul,
>
> Did you get a chance to look at this?
>
> Meanwhile, I found that binary data could be fetched
> properly, but in somewhat tedious way.
>
> If I use "convert(binary, <columname>)" function in select
> statement, then only the hex encoded data can be fetched
> correctly.
> Why is this dependency?
> Can you please shed some light?
>
> Thanks and Regards.
> --------------
>> Dear Sir,
>>
>> Yes, this is a Windows 64bit ODBC driver, being tested on
>> Windows 7 64bit.
>>
>> Thanks
>> ---------------
>> > You have a relatively currect version - 15.7.0.80. When
>> > I get a chance I can check out the code - what platform
>> > is this - is it Windows ODBC Driver?
>> >
>> > -Paul
>> >
>> > <bganes> wrote in message
>> > > news:4f4c7e70.76b9.1681692777@sybase.com... Dear Paul,
>> > >
>> > > As Im evaluating which database to you for our
>> > > application, I've been testing with a developer
>> > > edition (an evaluation copy) & so is not able to
>> > > download this new odbc driver referred by you.
>> > >
>> > > Can I get the eval copy or developer edition of this
>> > > new odbc driver version, so that I can test with it if
>> > it works? >
>> > > Thanks and Best Regards.
>> > >
>> > > ----------------
>> > >> Hi
>> > >>
>> > >> You may need to open a tech support case so this can
>> > be >> investigated.
>> > >>
>> > >> The Sybase url is www.sybase.com
>> > >>
>> > >> Go to the Support tab and look for under Downlads
>> > >> "EBFs/Maintenance"
>> > >>
>> > >> Then look for Software Developer Kit
>> > >>
>> > >> Then look under the platform of the SDK you're
>> > developing >> under. If your licensing is setup for
>> > this you'll see it >> otherwise you can only use the
>> > developer's edition. >>
>> > >> I'm thinking a tech support case might help.
>> > >>
>> > >> Thank you,
>> > >> -Paul
>> > >>
>> > >>
>> > >> www.sybase.com
>> > >>
>> > >> Then under
>> > >> <Bganes> wrote in message
>> > >> > news:4f45ea76.1476.1681692777@sybase.com...
>> > Respected >> Paul Sir, >
>> > >> > I tested my application today with 32bit SybaseASE
>> > (15.7 >> > - developer edition) also and I got same
>> > behaviour with >> > this 32bit ODBC driver (version
>> > 15.7.0.80) also. >> >
>> > >> > I think this could b an issue with this version of
>> > ODBC >> > driver.
>> > >> > I tried to download the higher version of ODBC
>> > driver >> > that you mentioned, but I could not find
>> > that on sybase >> website. >
>> > >> > Which is the correct URL to use for accessing this
>> > >> download? >
>> > >> > Please help
>> > >> >
>> > >> > Thanks and Regards
>> > >> > -------------------------------
>> > >> >> Dear Paul,
>> > >> >>
>> > >> >> Thanks for the response.
>> > >> >>
>> > >> >> Code snippet which reads image column in 64bit
>> > ODBC >> >> application:
>> > >> >> (This same code works for other DBs like DB2,
>> > Oracle , >> >> MySQL).
>> > >> >> // prepare query:
>> > >> >> wchar_t *query = _T("select * from mytable NOLOCK
>> > ;") ; >> >> SQLRETURN ret = 0;
>> > >> >> ret = SQLPrepare(stmt, query, SQL_NTS);
>> > >> >> if (!SQL_SUCCEEDED(ret))
>> > >> >> {
>> > >> >> TRACE("SybAse:SQLprepare failed.");
>> > >> >> DbException::sqlErrorInfo(SQL_HANDLE_STMT,
>> > stmt); >> >> throw DbException(std::string(""));
>> > >> >> }
>> > >> >> // bind to column:
>> > >> >> SQLBindCol(stmtHdl, columnNumber, SQL_C_BINARY,
>> > >> >> m_colValue[0], m_len, &m_LenInd[0]);
>> > >> >> // Execute query:
>> > >> >> ret = SQLExecute(stmt);
>> > >> >> // fetch rows
>> > >> >> if (SQL_SUCCESS == ret || SQL_SUCCESS_WITH_INFO ==
>> > ret) >> >> {
>> > >> >> do {
>> > >> >> ret = SQLFetchScroll(m_stmt, SQL_FETCH_NEXT,
>> > 0); >> >> // handle data per row here...
>> > >> >> } while(SQL_SUCCEEDED(ret));
>> > >> >> }
>> > >> >>
>> > >> >> Thanks and Regards.
>> > >> >>
>> > ------------------------------------------------------
>> > >> >> > Hi, >> >> >
>> > >> >> > You should be able to download the ESD#1 (104
>> > build) >> >> > from the Sybase Downloads website - it's
>> > under the >> >> > Software Develop Kit.
>> > >> >> >
>> > >> >> > If you have license for ASE 15.7 then you are
>> > >> eligible >> > for this release.
>> > >> >> >
>> > >> >> > You might want to provide code snippets so I can
>> > take >> a >> > look or it might be best for you to
>> > start case >> with >> > Tech Support for further
>> > assistance. >> >> >
>> > >> >> > Thank you,
>> > >> >> > -Paul
>> > >> >> >
>> > >> >> > <Bganes> wrote in message
>> > >> >> > > news:4f41f026.4d32.1681692777@sybase.com...
>> > Dear >> Paul >> > >
>> > >> >> > > Can you please help me know if this is a issue
>> > with >> 64 >> > > bit ODBC driver or do I need to
>> > upgrade the ODBC >> >> > > driver on my server from
>> > 15.7.0.80.1008 to >> 15.7.104.0? >> > >
>> > >> >> > > How / from where can I get the driver
>> > 15.7.104.0 >> for >> > > X64 Windows 7?
>> > >> >> > >
>> > >> >> > > Please guide.
>> > >> >> > >
>> > >> >> > > Thanks for your help.
>> > >> >> > >
>> > >> >> > > Best Regards.
>> > >> >> > >
>> > >> >> > >> Hi,
>> > >> >> > >>
>> > >> >> > >> Driver details are as below:
>> > >> >> > >>
>> > >> >> > >> C:\Sybase\DataAccess64\bin> odbcversion.exe
>> > >> -connect >> > >> SybaseACE
>> > >> >> > >> Adaptive Server Enterprise/15.7.0/EBF 19496
>> > SMP >> >> > >> /P/X64/Windows Server/ase157/282
>> > >> >> > >> 0/64-bit/OPT/Thu Sep 15 21:32:03 2011
>> > >> >> > >> ODBC MDA Scripts : 15.7.0.80.1008/Thu Aug 25
>> > UTC >> >> > 21:01:39 >> 2011
>> > >> >> > >> OLEDB MDA Scripts : 15.7.0.80.1008/Fri Aug 26
>> > UTC >> >> > 01:00:28 >> 2011
>> > >> >> > >>
>> > >> >> > >> > odbcversion.exe -fullversion
>> > >> >> > >> Sybase ASE ODBC
>> > >> >> > >>
>> > Driver/15.7.0/GA/P/AMD64/Windows/drvmain/Build >> >> >
>> > >> 80/64-bit/Normal/ >> >> > >> Thu Aug 25 UTC 22:10:30
>> > 2011 >> >> > >>
>> > >> >> > >> SQL_DRIVER_NAME:Adaptive Server Enterprise
>> > >> >> > >> SQL_DRIVER_ODBC_VER:03.51
>> > >> >> > >> SQL_DRIVER_VER:15.7.0.80
>> > >> >> > >>
>> > >> >> > >> NULL is returned not only for the image that
>> > I >> >> > inserted >> (using bcp) but also for "pic"
>> > column >> (image >> > type) in >> pubs2.au_pix (User
>> > Tables) the >> sample table >> > generated at >> ASE
>> > installation. >> >> > >>
>> > >> >> > >> In my ODBC application (& not in a ODBCTest),
>> > I am >> >> > doing >> following steps:
>> > >> >> > >> 1) SQLBindCol(SQL_C_BINARY, &str_len_ind);
>> > >> >> > >> 2) SQLExec(); // execute the prepared
>> > statement >> >> > >> 3) SQLFetchScroll(); // fetch a
>> > rowset of 5 rows >> >> > >>
>> > >> >> > >> When I check the str_len_ind value, I get -1
>> > & the >> >> > buffer >> has nulls.
>> > >> >> > >>
>> > >> >> > >> My this same code sequence works fine for
>> > >> SQL_C_CHAR >> > type >> columns for this same
>> > >> installation. Just that >> > binary & >> image
>> > columns are >> having issues. >> > >>
>> > >> >> > >> Should I provide the actual code snippets for
>> > you >> to >> > >> examine?
>> > >> >> > >>
>> > >> >> > >> Thanks and Regards.
>> > >> >> > >> -------------
>> > >> >> > >> > Hi
>> > >> >> > >> >
>> > >> >> > >> > sybase.public.connectivity.odbc is the
>> > correct >> >> > forum. >> >
>> > >> >> > >> > What is the exact driver version and
>> > exactly >> what >> > are >> > you doing in ODBC Test?
>> > >> >> > >> > I haven't tried this in x64 machine but
>> > should >> >> > work. I >> > don't know how OdbcTest
>> > handles >> retrieval >> > of >> > the data when it's
>> > image - should >> printout a >> > bunch of >> > binary
>> > numbers. >> >> > >> >
>> > >> >> > >> > I did simple test on x86 machine using
>> > >> 15.7.104.0 >> > Driver >> > and it seems to work
>> > okay but >> didn't do >> > this on real >> > large
>> > image. >> >> > >> >
>> > >> >> > >> > -Paul
>> > >> >> > >> >
>> > >> >> > >> >
>> > >> >> > >> >
>> > >> >> > >> > <bganes> wrote in message
>> > >> >> > >> > >
>> > news:4f3c76bc.44fb.1681692777@sybase.com... >> Dear >> >
>> > All, >> > > I am new to Sybase ASE. I am trying >> to
>> > fetch >> > image, >> > > binary data stored in Sybase >>
>> > ASE DB (on >> > Windows7 >> > > 64bit) using ODBC (C++)
>> > >> from Windows7 >> > 64bit. >> > > Data can be seen by
>> > right >> click & >> > selecting "View data >> > > in
>> > Interactive >> SQL" from >> > "Sybase Central" - which
>> > is >> > > nothing >> but "select * >> > from
>> <tablename>. >> > > But, same >> query ran thru >> >
>> > SQLExecDirect from ODBC app, >> > > >> gives NULL data.
>> > >> > Data buffer is SQLBindCol with >> > >> >
>> > > > SQL_C_BINARY data >> > type. >> I am using 64bit >>
>> > ODBC driver. >> > >> > > >> >> > >> > > Sorry if this is
>> > not the correct forum for >> ODBC >> > >> > questions. >
>> > >> >> > >> > > Can you please help me know, how can I
>> > get the >> >> > image >> > > data correctly in ODBC
>> > application? >> >> > >> > >
>> > >> >> > >> > > Thanks.
>> > >> >> > >> >
>> > >> >> > >> >
>> > >> >> >
>> > >> >> >
>> > >>
>> > >>
>> >
>> >