Delphi XE Access violation in module 'dbxfb.dll' #2

Hi to all.

I'm forced to migrate a Delphi 2007 application to Delphi XE using DbExpress and the dbxfb.dll driver. I had to make a trick for loading Blob fields into a TRichEdit.

I got enforced to write this code:
{code}
procedure TForm1.LoadMemo(id: Integer);
var
  I: Integer;
  strText: AnsiString;
  myStream: TMemoryStream;
begin
    SQLQuery1.Close;
    SQLQuery1.Sql.Text :=
      'SELECT id, txt_field FROM my_table WHERE id = ' + IntToStr(id);
    SQLQuery1.Open;
    strText := SQLQuery1.FieldByName('txt_field').AsString;
    myStream := TMemoryStream.Create;
    try
      for I := 1 to Length(strText) do
        myStream.Write(strText[I], 1);
      myStream.Seek(0, soFromBeginning);
      TRichEdit1.Lines.LoadFromStream(myStream);
    finally
      myStream.Free;
    end;
end;
{code}

because this other one generates an "access violation in module dbxfb.dll"
{code}
procedure TForm1.LoadMemo(id: Integer);
var
  myStream: TStream;
begin
    SQLQuery1.Close;
    SQLQuery1.Sql.Text :=
      'SELECT id, txt_field FROM my_table WHERE id = ' + IntToStr(id);
    SQLQuery1.Open;
    myStream := SQLQuery1.CreateBlobStream(SQLQuery1.FieldByName('txt_field'), bmRead);
    try
      myStream.Seek(0, soFromBeginning);
      TRichEdit1.Lines.LoadFromStream(myStream);
    finally
      myStream.Free;
    end;
end;
{code}

The code was tested in both Delphi 2007 (no access violation) but within Delphi XE it simply doesn't work.

I believe I already solved the issue but I wonder what is going wrong with it. Could it be a dbxfb.dll bug?

Hernando.
0
Hernando
11/13/2010 12:17:03 AM
embarcadero.delphi.dbexpress 764 articles. 0 followers. Follow

0 Replies
1621 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

Delphi XE Access violation in module 'dbxfb.dll'
Hi to all, I'm testing dbExpress and some times I get an access violation with this code: {code} function TForm1.GetBlobText(id: Integer): String; begin Result := ''; if (id > 0) then try if not SQLConnection1.Connected then SQLConnection1.Connected := True; SQLQuery1.Close; SQLQuery1.Sql.Text := Format('SELECT id, somefield, txt_field FROM my_table WHERE id = %d', [id]); SQLQuery1.Open; Result := SQLQuery1.FieldByName('txt_field').AsString; except ...

Delphi XE Access Violation in 'vclide150.bpl', Read of address 00000048
Been using Delphi XE (part of RAD Studio) for a few months on this machine with no problems. Earlier today, installed latest (December) MS updates for Windows XP but now starting Delphi, I get the following error: Access Violation at address 21280D98 in 'vclide150.bpl'. Read of address 00000048. Clicking OK lets Delphi continue to load but things are not in the right place on screen, particularly view of PAS files goes way below screen where they can't be seen. It's not possible to debug anything either. Clicking Details>> button gives: [21280D98]{vclide150.bpl...

Delphi XE 'import of DLL symbol by ordinal'
I am trying to compile a package that has some DLL calls to the shell32.dll. function SHShutDownDialog; external 'shell32.dll' index 60; function SHRunDialog; external 'shell32.dll' index 61; function SHChangeIconDialog; external 'shell32.dll' index 62; The compiler complains: " [DCC Error] ushldlg.pas(1): E1025 Unsupported language feature: 'import of DLL symbol by ordinal' " Apparently by index is not supported anymore. The problem is I checked the shell32.dll and those functions can only be referenced by index and not by name? Is t...

Problem: The type 'typename' exists in both 'dll-name-1' and 'dll-name-2'
Hi at all!For some strange reason I sometimes (not always) get the following compilation error when starting my ASP.net project:Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type 'ASP.formscontrols_worker_it_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0....

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
For some reason though it appears that one of my class files (_common.cs - in the App_Code directory) is being included in the WAP .dll file as well as when it compiles the App_Code at runtime.error CS0433: The type 'inlinehockey._common' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\assembly\dl3\3657f4e6\cd91aef5_4d5cc601\inlinehockey.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\App_Code.xad_ajc1.dll'  The error was not knowing what dll to use for the type w...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
Hi. Has anyone come across this problem upgrading VS2003 to VS2005:The type '<class>' exists in both '<dll location>' and '<dll location 2>' Thanks! Hi TinaFMills,   Did you finish the process of migrate project form 2003 to 2005?   The error message means duplicate class name in different locations. Such as aspx pages, user controls, custom controls and so on. Please load the solution in Visual Studio IDE try to find the duplicate class. Edit->File and Replace->Find In Files (look in entire solution)    Sincerely,Benson YuMicrosoft Online...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

C++ Replacement or similar keywords for 'is' and 'as' Delphi keys.
hello there, i am a newcomer to C++ Builder so excuse any mistake. My question is (maybe a stupid question) My first language is Delphi and i usually use this type of sentences: if Sender is TEdit then (Sender as TEdit).Text := ''; A replacement or similar keywords exist for C++ Builder? Thanks in advance. Am 27.09.2010 13:37, schrieb finneas finn: > A replacement or similar keywords exist for C++ Builder? TEdit * Edit; if ((Edit = dynamic_cast<TEdit*>(Sender)) != 0) { Edit->Text = ""; } Christian Il Mon, 27 Sep 2010 04:37:55 -0...

INSTALL 'freetyp6.dll' and 'fntcfg2.dll' i
Where can I download these as non yum/rum versions? TIA -- Regards Dave Saville On 03/10/15 11:08 AM, Dave Saville wrote: > Where can I download these as non yum/rum versions? > > TIA > http://rpm.netlabs.org/release/00/zip/ contains all the zip files that have been packaged as zip files. Don't forget about libpng-1_6_16-1_oc00.zip, urpo.dll which needs to be the latest and may have not been packaged and possibly z, bzip, and xv libraries, I haven't tried the newest but Bitwise seems to want to have as many dependencies as possible. Dave ps GCC1.d...

Error 43 The type 'Controls_XX' exists in both '..\App_Web_blah1.dll' and '..\App_Web_blah2.dll'
When I try to publish my website I keep getting these errors which relate to various conflicts present in subdirectories at c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ The problem always relates to a particulate User Control : 'Controls_PgHeader', which is just about the only control which is modified from one compilation to the next. Other than manually deleting the files which are in conflict, what is the solution and source of this problem? Here is a sample error message: Error 43 The type 'Controls_PgHeader' exists in bot...

new user question: Delphi equivalents to BP 'readkey' and 'keypress'
Hi All, Sorry if this is the wrong forum. In the documentations section I already asked for general advice, so let's keep that out to the extent practicable - you be the judge. Background: a relatively experienced Borland Pascal programmer for DOS and DPMI, PhD in math, trying to make a comeback to what once was a dear hobby (game programming) and in need of doing also some scientific programming. A retailer said that CodeGear Delphi is my best bet, so hear I am. Problem: As a first exercise for myself (trying to get the hang of the basics of the IDE) I took up a project of portin...

Delphi XE Unknown driver 'Firebird' exception
Well... I have a Delphi 2007 application running fine since several years ago using dbExpress + dbxint30.dll with a Firebird 1.5 database. It uses a ini file that is read during application's bootstrap and configurates de TSQLConnection parameters before connecting to the database. Now I'm compiling the same application with Delphi XE using dbExpress + dbxfb.dll and the only difference is that in the ini file these parameters change to: DriverName=Firebird LibraryName=dbxfb.dll .... But I get a "Unknown driver Firebird" exception. I did test connecting from the ...

Access Violation at address ... in module 'vcl150.bpl'
Hi I occasionally (too many times) get this error when closing down. I also find the same in my Delphi 7 IDE which I keep for compatibility and support reasons. Any idea why this happens and what I could do to avoid this? I am using Windows 7 RAD Studio XE Regards Bennie Bennie Coetzer wrote: > Hi I occasionally (too many times) get this error when closing down. > I also find the same in my Delphi 7 IDE which I keep for > compatibility and support reasons. Any idea why this happens and > what I could do to avoid this? > > I am using > Windows 7 >...

Web resources about - Delphi XE Access violation in module 'dbxfb.dll' #2 - embarcadero.delphi.dbexpress

Resources last updated: 12/13/2015 11:47:23 PM