#1  
Old 11th December 2018, 12:04 AM
ftessier ftessier is offline
Junior Member
 
Join Date: Oct 2015
Posts: 2
Default NexusDB.ADOProvider version 4.0.0.321

Hi,


When I try to use GetBytes, i receives the error message "An unhandled exception of type 'System.NotSupportedException' occurred in NexusDB.ADOProvider.dll".


The runtime version is V4.0.30319 et the ddl version is 4.0.0.321.

Can someone help me?

Regards,
Fran?ois Tessier
  #2  
Old 11th December 2018, 07:53 AM
Eivind Eivind is offline
Administrator
 
Join Date: Mar 2008
Posts: 169
Default

Quote:
Originally Posted by ftessier View Post
Hi,


When I try to use GetBytes, i receives the error message "An unhandled exception of type 'System.NotSupportedException' occurred in NexusDB.ADOProvider.dll".


The runtime version is V4.0.30319 et the ddl version is 4.0.0.321.

Can someone help me?

Regards,
Fran?ois Tessier
Could you show the full line of code that is failing?
  #3  
Old 11th December 2018, 01:20 PM
ftessier ftessier is offline
Junior Member
 
Join Date: Oct 2015
Posts: 2
Default

Hello,

here the code:

clientele = (IDataRecord)_ClienteleEPXml;
FileStream fs; // Writes the BLOB to a file (*.bmp).
BinaryWriter bw; // Streams the BLOB to the FileStream object.
int bufferSize = 100; // Size of the BLOB buffer.
byte[] outbyte = new byte[bufferSize]; // The BLOB byte[] buffer to be filled by GetBytes.
long retval; // The bytes returned from GetBytes. .

long startIndex = 0; // The starting position in the BLOB output

fs = new FileStream(@"c:\fmp\Clienteletest.zip", FileMode.OpenOrCreate, FileAccess.Write);
bw = new BinaryWriter(fs);

// Reset the starting byte for the new BLOB.
startIndex = 0;


retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0, bufferSize);

// Continue reading and writing while there are bytes beyond the size of the buffer.
while (retval == bufferSize)
{
bw.Write(outbyte);
bw.Flush();

// Reposition the start index to the end of the last buffer and fill the buffer.
startIndex += bufferSize;
retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0, bufferSize);
}
  #4  
Old 18th December 2018, 09:05 AM
Eivind Eivind is offline
Administrator
 
Join Date: Mar 2008
Posts: 169
Default

Quote:
Originally Posted by ftessier View Post
Hello,

here the code:

clientele = (IDataRecord)_ClienteleEPXml;
FileStream fs; // Writes the BLOB to a file (*.bmp).
BinaryWriter bw; // Streams the BLOB to the FileStream object.
int bufferSize = 100; // Size of the BLOB buffer.
byte[] outbyte = new byte[bufferSize]; // The BLOB byte[] buffer to be filled by GetBytes.
long retval; // The bytes returned from GetBytes. .

long startIndex = 0; // The starting position in the BLOB output

fs = new FileStream(@"c:\fmp\Clienteletest.zip", FileMode.OpenOrCreate, FileAccess.Write);
bw = new BinaryWriter(fs);

// Reset the starting byte for the new BLOB.
startIndex = 0;


retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0, bufferSize);

// Continue reading and writing while there are bytes beyond the size of the buffer.
while (retval == bufferSize)
{
bw.Write(outbyte);
bw.Flush();

// Reposition the start index to the end of the last buffer and fill the buffer.
startIndex += bufferSize;
retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0, bufferSize);
}
Thanks, we'll have a look.
  #5  
Old 18th December 2018, 11:00 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: NexusDB.ADOProvider version 4.0.0.321

Eivind wrote:

>
> ftessier;111650 Wrote:
> > Hello,
> >
> > here the code:
> >
> > clientele = (IDataRecord)_ClienteleEPXml;
> > FileStream fs; // Writes the BLOB to a
> > file (*.bmp).
> > BinaryWriter bw; // Streams the BLOB to the
> > FileStream object.
> > int bufferSize = 100; // Size of the BLOB
> > buffer.
> > byte[] outbyte = new byte[bufferSize]; // The BLOB byte[] buffer
> > to be filled by GetBytes.
> > long retval; // The bytes returned from
> > GetBytes. .
> >
> > long startIndex = 0; // The starting position
> > in the BLOB output
> >
> > fs = new FileStream(@"c:\fmp\Clienteletest.zip",
> > FileMode.OpenOrCreate, FileAccess.Write);
> > bw = new BinaryWriter(fs);
> >
> > // Reset the starting byte for the new BLOB.
> > startIndex = 0;
> >
> >
> > retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0,
> > bufferSize);
> >
> > // Continue reading and writing while there are bytes beyond the
> > size of the buffer.
> > while (retval == bufferSize)
> > {
> > bw.Write(outbyte);
> > bw.Flush();
> >
> > // Reposition the start index to the end of the last buffer and
> > fill the buffer.
> > startIndex += bufferSize;
> > retval = _ClienteleEPXml.GetBytes(1, startIndex, outbyte, 0,
> > bufferSize);
> > }

>
> Thanks, we'll have a look.


I haven't tried it, but simply calling GetValue(int i) on the
DbDataReader should return a byte array. Please let us know if that
works for you.

--
Eivind Bakkestuen [NDD]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NexusDB.AdoProvider V4.0.30319 and DLL denisprince nexusdb.public.support.adoprovider 1 24th November 2018 01:08 AM
NexusDB.ADOProvider NxDataReader NotSupportedException: GetBytes atempela nexusdb.public.support.adoprovider 1 3rd February 2018 11:48 PM
AV in ADOProvider 242 boman nexusdb.public.support.adoprovider 9 22nd June 2016 08:06 PM
Ann: NexusDB version 1 Client/Server database - FREE Dcu version Eivind Bakkestuen [NDD] nexusdb.public.support 3 18th February 2006 02:31 AM
Unable to load DLL (NexusDB.ADOProvider.NexusDBV1.dll) G. Campbell nexusdb.public.support 5 20th May 2005 01:19 PM


All times are GMT +11. The time now is 08:17 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.