[DUG] Interbase Blobs in Delphi 2010
Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Sounds like a Unicode issue. The default string in D2010 is a unicode string. Can you use: IBQuery1.ParamByName('blobby').AsString := 'blah blah blah'; ? Colin On 4 March 2010 11:08, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
well, the thing is, this IS a blob field not a string field. but I will give it a try Jeremy On Thu, Mar 4, 2010 at 2:17 PM, Colin Johnsun colin.a...@gmail.com wrote: Sounds like a Unicode issue. The default string in D2010 is a unicode string. Can you use: IBQuery1.ParamByName('blobby').AsString := 'blah blah blah'; ? Colin On 4 March 2010 11:08, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Well alternatively, you can try passing in an AnsiString into your blob field. I haven't tried it myself but it may be worth a go. Colin On 4 March 2010 12:21, Jeremy Coulter jscoul...@gmail.com wrote: well, the thing is, this IS a blob field not a string field. but I will give it a try Jeremy On Thu, Mar 4, 2010 at 2:17 PM, Colin Johnsun colin.a...@gmail.comwrote: Sounds like a Unicode issue. The default string in D2010 is a unicode string. Can you use: IBQuery1.ParamByName('blobby').AsString := 'blah blah blah'; ? Colin On 4 March 2010 11:08, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
yeah I tried that and it didnt like it. Jeremy On Thu, Mar 4, 2010 at 2:36 PM, Colin Johnsun colin.a...@gmail.com wrote: Well alternatively, you can try passing in an AnsiString into your blob field. I haven't tried it myself but it may be worth a go. Colin On 4 March 2010 12:21, Jeremy Coulter jscoul...@gmail.com wrote: well, the thing is, this IS a blob field not a string field. but I will give it a try Jeremy On Thu, Mar 4, 2010 at 2:17 PM, Colin Johnsun colin.a...@gmail.comwrote: Sounds like a Unicode issue. The default string in D2010 is a unicode string. Can you use: IBQuery1.ParamByName('blobby').AsString := 'blah blah blah'; ? Colin On 4 March 2010 11:08, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Use the new BytesOf functions in the SysUtils unit. TBytes is just an array of TByte. There is also a PlatformBytesOf function that you could use. You may also want to investigate the TEncoding class while you are at it. On Thu, Mar 4, 2010 at 11:08 AM, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Can we do IBQuery1.ParamByName('blobby').Value := 'asdfdas'; Edward Koryagin --- On Thu, 4/3/10, Jeremy North jeremy.no...@gmail.com wrote: From: Jeremy North jeremy.no...@gmail.com Subject: Re: [DUG] Interbase Blobs in Delphi 2010 To: NZ Borland Developers Group - Delphi List delphi@delphi.org.nz Received: Thursday, 4 March, 2010, 3:00 PM Use the new BytesOf functions in the SysUtils unit. TBytes is just an array of TByte. There is also a PlatformBytesOf function that you could use. You may also want to investigate the TEncoding class while you are at it. On Thu, Mar 4, 2010 at 11:08 AM, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Ok cool will take a look. I have finish something, then I will see what happens. Jeremy On Thu, Mar 4, 2010 at 3:08 PM, Edward Koryagin ed_iv2...@yahoo.co.nzwrote: Can we do IBQuery1.ParamByName('blobby').Value := 'asdfdas'; Edward Koryagin --- On Thu, 4/3/10, Jeremy North jeremy.no...@gmail.com wrote: From: Jeremy North jeremy.no...@gmail.com Subject: Re: [DUG] Interbase Blobs in Delphi 2010 To: NZ Borland Developers Group - Delphi List delphi@delphi.org.nz Received: Thursday, 4 March, 2010, 3:00 PM Use the new BytesOf functions in the SysUtils unit. TBytes is just an array of TByte. There is also a PlatformBytesOf function that you could use. You may also want to investigate the TEncoding class while you are at it. On Thu, Mar 4, 2010 at 11:08 AM, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] Interbase Blobs in Delphi 2010
Jeremy N.'s idea of BytesOf() did the trick. Thanks, Jeremy (C) On Thu, Mar 4, 2010 at 3:22 PM, Jeremy Coulter jscoul...@gmail.com wrote: Ok cool will take a look. I have finish something, then I will see what happens. Jeremy On Thu, Mar 4, 2010 at 3:08 PM, Edward Koryagin ed_iv2...@yahoo.co.nzwrote: Can we do IBQuery1.ParamByName('blobby').Value := 'asdfdas'; Edward Koryagin --- On Thu, 4/3/10, Jeremy North jeremy.no...@gmail.com wrote: From: Jeremy North jeremy.no...@gmail.com Subject: Re: [DUG] Interbase Blobs in Delphi 2010 To: NZ Borland Developers Group - Delphi List delphi@delphi.org.nz Received: Thursday, 4 March, 2010, 3:00 PM Use the new BytesOf functions in the SysUtils unit. TBytes is just an array of TByte. There is also a PlatformBytesOf function that you could use. You may also want to investigate the TEncoding class while you are at it. On Thu, Mar 4, 2010 at 11:08 AM, Jeremy Coulter jscoul...@gmail.com wrote: Hi All. I am just working thru converting a D2007 app to D2010. Its taken me most of the moring to get updated controls, install them, convert strings etc.etc. but this one has stumpted me. I am inserting some data into a blob field in Interbase like so (or similar) IBQuery1.ParamByName('blobby').AsBlob := 'This is the data to go into the blob field'; Now interesingly enough, this works fine In D7 and D2007, but D2010 says [DCC Error] untWebEPortal.pas(2223): E2010 Incompatible types: 'TBytes' and 'string' I guess I now have to do something else, can someone point me in the right direction? Jeremy ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe