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.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > ADO Objects, Get "OLE error 80040E21" when posting.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-07-04, 16:08
AceOmega AceOmega is offline
Registered User
 
Join Date: Apr 2004
Location: Arizona
Posts: 49
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, 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 it.

Her are my settings on the TADOConnection...

xaCommitRetaining = True
xaAbortRetaining = False
CommandTimeout = 30
Connected = True
ConnectionString = {See Above}
ConnectionTimeout = 15
ConnectionOptions = coConnectUnspecified
ConnectionLocation = clUseClient
DefaultDatabase = {Null}
IsolationLevel = ilReadCommitted
KeepConnection = True
LoginPrompt = False
Mode = cmReadWrite
Name = ADOConnection1
Provider = MSDASQL.1
Tag = 0

I know that my IsolationLevel and Mode are set for optimal performance, but at this point I was trying anything to get it to work. It does work if I use BDE components but I am trying to get away from the BDE.

Thanks for any input.



-----------------------------------------------------------------------------------------------



Just an update on this problem...

Things I have tryed are....

Updateing using the FireBird ODBC instead of XTG Systems.
Updateing My MDAC.


I have found that when setting my "modes" equal to "Share Exclusive" (so that I can do the equivalent to a request live) in my connection string and try to to connect, I get the same error. It as if the ODBC will not let me record lock the database for updates.

So, I went off and try to do the record locking at the ADOQuery by setting the Cursor Type to ctDynamic but every time I open the ADOQuery it automatically resets back to ctStatic.

Can any one tell me why this is happening and how to prevent it?
Reply With Quote
  #2 (permalink)  
Old 08-23-04, 19:51
AceOmega AceOmega is offline
Registered User
 
Join Date: Apr 2004
Location: Arizona
Posts: 49
Update to the Problem

I got rid of the error byt setting the Lock Type to "ltBatchOptimistic". The only problem now is that none of my posts are commiting.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On