List:MySQL on Win32« Previous MessageNext Message »
From:Nick Randell Date:July 20 2004 7:01am
Subject:RE: Using a Blob with the ByteFX data provider
View as plain text  
I also found a problem with Packet.ReadLenInteger.

It was using the values for shortLen, intLen and longLen to read the length
of the blob that is sent across. As Packet.LongInts had been set to try,
this meant that it was using 4 bytes to read the length when it should have
been using 3. I changed ReadLenInteger to the following

		public long ReadLenInteger()
		{
			byte c  = (byte)ReadByte();

			switch(c) 
			{
				case 251 : return NULL_LEN; 
				case 252 : return ReadInteger(2);
				case 253 : return ReadInteger(3);
				case 254 : return ReadInteger(8);
				default  : return c;
			}
		}

This is working for me, so hopefully this was the correct thing to do.

Regards

Nick
 

-----Original Message-----
From: Reggie Burnett [mailto:rykr@stripped] 
Sent: 19 July 2004 22:05
To: 'Nick Randell'; win32@stripped
Subject: RE: Using a Blob with the ByteFX data provider

Nick

This is a valid change.  In fact, we have already made that change in our
source repository so this bug will be fixed in the forthcoming beta release.

-reggie

> -----Original Message-----
> From: Nick Randell [mailto:nick@stripped]
> Sent: Friday, July 16, 2004 12:45 AM
> To: win32@stripped
> Subject: Using a Blob with the ByteFX data provider
> 
> I'm trying to use a blob to read into a typed dataset using the ByteFX 
> data provider, but this gives an 'Inconvertable type mismatch' error.
> 
> I've managed to hack this to work by converting the GetFieldType 
> method in Field.cs to return 'typeof(byte[])' for binary blobs instead 
> of 'typeof(System.Array)'.
> 
> Is this a valid change, or am I doing something else wrong?
> 
> Thanks
> 
> Nick
> 


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=1



Thread
Using a Blob with the ByteFX data providerNick Randell16 Jul
  • RE: Using a Blob with the ByteFX data providerReggie Burnett19 Jul
    • RE: Using a Blob with the ByteFX data providerNick Randell20 Jul
      • Suggested settings for dual processor machine?East Bay Technologies20 Jul
      • RE: Using a Blob with the ByteFX data providerReggie Burnett20 Jul
      • Should I use myISAM or InnoDB??East Bay Technologies21 Jul
      • Should I use myISAM or InnoDB??East Bay Technologies23 Jul
      • Suggested settings for dual processor machine?East Bay Technologies23 Jul
RE: Should I use myISAM or InnoDB??PF: MySQL23 Jul
  • Question about Insert StatementDanny Willis23 Jul
    • Re: Question about Insert StatementTata Respecia24 Jul
      • Ignoring or filtering ' charCadbury30 Jul
        • Strange site error.Danny Willis30 Jul
        • Re: Ignoring or filtering ' charTiago Serafim30 Jul
          • Re: Ignoring or filtering ' charCadbury4 Aug
            • Re: Ignoring or filtering ' charTiago Serafim4 Aug
              • Re: Ignoring or filtering ' charCadbury5 Aug
        • Re: Ignoring or filtering ' charPetr Vileta30 Jul
          • Re: Ignoring or filtering ' charTiago Serafim30 Jul
Re: Question about Insert StatementRandy Clamons24 Jul