Ole Error 80040e21 Delphi
my applications that use ADO, I constantly get ole error 80040E21 errors, I have looked what could be the problem, but I can not find the right answer. I even get the message when I have the following statement: AdoDataset.CommandText := 'Select autonumber, name, firstname from customers'; AdoDataSet.Open; if AdoDataSet.fieldbyname('Autonumber').IsNull =>I get a Delphi exception EOleException at $ACBF949 then .... Any suggestions are more than welcome, because I am out of options. I have mdac 2.8 installed. Thanks, Bernaert Dominique. Viatcheslav V. Vassiliev Delphi Developer 2004-07-28 01:08:21 AM Re:ole error 80040E21 with sql server It is DB_E_ERRORSOCCURRED - "Multiple-step operation generated errors. Check each status value. No work was done." It is quite meaningless error description and this error could occur in many cases. Try Select autonumber from customers and the same for every field to determine which one raises exception. //------------------------------------------ Regards, Vassiliev V. V. www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Bernaert Dominique"
posting. If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: ADO Objects, Get "OLE error 80040E21" when posting. Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded http://www.delphigroups.info/2/6/300557.html Mode 07-07-04,16:08 #1 AceOmega View Profile View Forum Posts Registered User Join Date Apr 2004 Location Arizona Posts 75 Unanswered: ADO Objects, Get "OLE error 80040E21" when posting. I am using Delphi and am in the process of replacing the BDE objects with ADO. I am using the XTG Systems ODBC driver. There is no sorce code because I am using all objects (TDBGrig, http://www.dbforums.com/showthread.php?1003782-ADO-Objects-Get-quot-OLE-error-80040E21-quot-when-posting TDBNavigator linked to a TADOQuery wich is using a TADOConnection). I can however give you my connection string, because I think my problem lys within... Provider=MSDASQL.1; User ID=sysdba; Data Source=FBWord; Mode=ReadWrite; Extended Properties="DSN=FBWord;UID=sysdba;PWD=masterkey;;; " Ok, my problem is that when ever I make a change in the grid and try to post using the Navigator, I get an "OLE error 80040E21". I tryed searching for what the possible problems are and most people say that I am trying to put in information that is wider than my column. If I was not trying to edit in a DBGrid I would look at it but being that I am editing not inserting and I am not doing it through code rather a component, I can not see how this is. Others have said that it is how I am connected so I have been trying to mess with my connection string and TADOQuer and TADOConnection properties for the last two days and there are so many different settings that it would take me forever to try all of them. If some one could help me out I would very much appriciate i
a SQL Server database. There are several BIGINT fields in the database. To retrieve data from one of the fields, we use the following code: function GetBytesAsMB: Real; begin Result:=DMMSSQL.QryServers.FieldByName('BytesPerLimit').AsFloat/1048576; 6; end; Now, for 90% of our customers, this works just fine. We can't http://www.devsuperpage.com/search/Articles.asp?ArtID=1009541 retrieve using "AsInteger" because the number can easily be larger than the number supported by the Integer type. However, a few installations return the following error: exception class : EOleException exception message : OLE error 80040E21. The exception is raised at line 4199 in ADODB.pas: DataConvert(Field, @C, Buffer, True) else First question: Is there a SQL Server setting that could be preventing this from working? Second question: Is there a safer way to do this? Thanks, Dan From: ole error Dan Cumpian Subject: Re: OLE error 80040E21 reading BIGINT using AsFloat NewsGroup: borland.public.delphi.database.ado Date Posted: 12-Sep-2006 at 7:27:59 PST On 9/12/2006 4:29:16 AM, "Guillem" wrote: > >my suggestion: check if the OLE DB provider is the same you have on >those computers where it works. > >Also check if the MDAC version is the appropiate and/or is broken in >those computers where it fails. For this you can use > >http://www.microsoft.com/downloads/details.aspx?FamilyId=8F0A8DF6-4A21-4 >B43-BF53-14332EF092C9&displaylang=en > >or > >http://tinyurl.com/62nvo ole error 80040e21 > >For example, it could be you have MDAC 2.8 SP1 installed on the >machines where it works and MDAC 2.8 on the machines where it doesn't >work. There is really a difference if the SP is installed or not, as we >discovered some time ago... sigh > >Also check my reply to John. I hope something of all this can help you > Thanks for the link to the component checker. I'd not seen that before and I think it will be really useful. I saw your reply to John and might try that, but reading the data using AsVariant into a Real variable seems to have worked. Again, thanks for your help. Dan From: Guillem Subject: Re: OLE error 80040E21 reading BIGINT using AsFloat NewsGroup: borland.public.delphi.database.ado Date Posted: 12-Sep-2006 at 1:29:14 PST Dan Cumpian wrote: > > I saw those on Google and they really didn't point to a specific > problem or workaround. I think I'll try reading the data using > AsVariant and see if that will solve the problem. I'm not sure what > else to try. > > Thanks, > Dan my suggestion: check if the OLE DB provider is the same you have on those computers where it works. Also check if the MDAC version is the appropiate and/or is broken in those computers where it fails. For this you can use http://www.microsoft.com/downloads/details.aspx?FamilyId=8F0A8