Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 8 of 8 total |
Problem porting from BDE to DBIsam 3 |
Thu, Aug 24 2006 9:30 AM | Permanent Link |
"John" | Up to know I have always use TDBIsamTable component without any problem.
Now I have to port a BDE app to DBISAM 3 and this app use TQuery and TUpdateSQL (taht doesn't exist under DBISAM 3). here's the content of the SQL Property. {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ SELECT Ucs_users.USER_NAME, Ucs_userinfo.ADDITIONAL_INFO, Ucs_users.USER_ID, APP_ID FROM Ucs_users, Ucs_userinfo Where Ucs_users.USER_ID = Ucs_userinfo.USER_ID and Ucs_users.USER_ID = :USER_ID and UCS_USERINFO.APP_ID = :APP_ID }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} here's the content of the DeleteSQL property {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ delete from Ucs_userinfo where USER_ID = :OLD_USER_ID and APP_ID = :OLD_APP_ID }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} insertSQL property... {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'' insert into Ucs_userinfo (ADDITIONAL_INFO) values (:ADDITIONAL_INFO) }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} and modifySQL {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ update Ucs_userinfo set ADDITIONAL_INFO = :ADDITIONAL_INFO where USER_ID = :OLD_USER_ID and APP_ID = :OLD_APP_ID }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} the code used in the BDE version is this one {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ if (qryUser.FieldByName('ADDITIONAL_INFO').AsString<>Filter) then begin if not (qryUser.State = dsEdit) then qryUser.Edit; qryUser.FieldByName('ADDITIONAL_INFO').AsString:=Filter; qryUser.Post; if qryUser.Database.InTransaction then begin qryUser.ApplyUpdates; qryUser.CommitUpdates; end else qryUser.Database.ApplyUpdates([qryUser]); end; }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} in my DBISAM version it's this one {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{' with qryUser.Database do begin StartTransaction; try { Perform some updates to the table(s) in this database } qryUser.Edit; qryUser.FieldByName('ADDITIONAL_INFO').AsString := WriteUserRights; qryUser.Post; Commit; except Rollback; end; end; }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} but it as no effect (nothing written on the field). Probably due to the fact that there's no TUpdateSQL. Any idea of how to solve this ? the problem is probably simple to use but I'm not easy with TDBISAMQuery. thanks for your precious help. |
Thu, Aug 24 2006 12:30 PM | Permanent Link |
Jason Lee | Hey! It's the first posting to the wrong newsgroup for ElevateDB.
John wrote: > Up to know I have always use TDBIsamTable component without any problem. > Now I have to port a BDE app to DBISAM 3 and this app use TQuery and > TUpdateSQL (taht doesn't exist under DBISAM 3). > > here's the content of the SQL Property. > > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > SELECT Ucs_users.USER_NAME, Ucs_userinfo.ADDITIONAL_INFO, Ucs_users.USER_ID, > APP_ID > FROM Ucs_users, Ucs_userinfo > Where Ucs_users.USER_ID = Ucs_userinfo.USER_ID > and Ucs_users.USER_ID = :USER_ID > and UCS_USERINFO.APP_ID = :APP_ID > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > > > here's the content of the DeleteSQL property > > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > delete from Ucs_userinfo > where > USER_ID = :OLD_USER_ID and > APP_ID = :OLD_APP_ID > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > > > insertSQL property... > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'' > insert into Ucs_userinfo > (ADDITIONAL_INFO) > values > (:ADDITIONAL_INFO) > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > > > and modifySQL > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > update Ucs_userinfo > set > ADDITIONAL_INFO = :ADDITIONAL_INFO > where > USER_ID = :OLD_USER_ID and > APP_ID = :OLD_APP_ID > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > the code used in the BDE version is this one > > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > > if (qryUser.FieldByName('ADDITIONAL_INFO').AsString<>Filter) then > begin > if not (qryUser.State = dsEdit) then > qryUser.Edit; > qryUser.FieldByName('ADDITIONAL_INFO').AsString:=Filter; > qryUser.Post; > if qryUser.Database.InTransaction then > begin > qryUser.ApplyUpdates; > qryUser.CommitUpdates; > end > else > qryUser.Database.ApplyUpdates([qryUser]); > end; > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > in my DBISAM version it's this one > > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{' > with qryUser.Database do > begin > StartTransaction; > try > { Perform some updates to the table(s) in this database } > qryUser.Edit; > qryUser.FieldByName('ADDITIONAL_INFO').AsString := WriteUserRights; > qryUser.Post; > Commit; > except > Rollback; > end; > end; > }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} > > but it as no effect (nothing written on the field). Probably due to the fact > that there's no TUpdateSQL. > Any idea of how to solve this ? the problem is probably simple to use but > I'm not easy with TDBISAMQuery. > > thanks for your precious help. > > |
Thu, Aug 24 2006 2:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< but it as no effect (nothing written on the field). Probably due to the fact that there's no TUpdateSQL.Any idea of how to solve this ? the problem is probably simple to use but I'm not easy with TDBISAMQuery. >> It is fairly simple - just write event handlers for the BeforePost and BeforeDelete events of the TDBISAMQuery component that you're using, and run the SQL statements that were being run in the TUpdateSQL component before with a different TDBISAMQuery component. That way, every time someone updates the canned result set of the query, the underlying tables will get updated as necessary. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Aug 25 2006 9:38 AM | Permanent Link |
"John" | Thanks Tim for your reply.
There's 3 SQL statement. Wich ones should I use ? |
Fri, Aug 25 2006 9:39 AM | Permanent Link |
"John" | What do you mean, I don't see anymore the previous newsgroup of DBIsam....?
|
Fri, Aug 25 2006 2:42 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< What do you mean, I don't see anymore the previous newsgroup of DBIsam....? >> It was renamed to elevatesoft.public.dbisam.general You can always find the current list of newsgroups here: http://www.elevatesoft.com/scripts/newsgrp.dll?action=nntpgroups -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Aug 25 2006 2:43 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< There's 3 SQL statement. Wich ones should I use ? >> I'm not sure what you mean - are you asking whether to use an UPDATE or DELETE statement ? If so, then you should use an INSERT/UPDATE in a BeforePost event handler, and a DELETE statement in a BeforeDelete event handler. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Aug 28 2006 5:02 AM | Permanent Link |
"John" | Thanks Tim. |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |