![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 11 total |
![]() |
Thu, Apr 19 2007 7:40 PM | Permanent Link |
"Lance R" | I tried a test and am not catching what I did wrong.
Am I not setting the parameter right? I even tried wrapping the value set to the param by Engine.QuotedSQLStr('General') Lance ==== // Code that doesn't work DataMod.MBDQuery.Close; DataMod.MBDQuery.SQL.Clear; DataMod.MBDQuery.Params.Clear; DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', DB.ptInput); DataMod.MBDQuery.SQL.Text:= ' SELECT ' + ' taddresstype.AddressTypeID,' + ' taddresstype."Description" ' + ' FROM ' + ' taddresstype ' + ' WHERE ' + ' (taddresstype.isActive=TRUE) and (taddresstype."Description"=:AdrType)'; DataMod.MBDQuery.Prepare; DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; DataMod.MBDQuery.Open; if (DataMod.MBDQuery.RecordCount>0) then begin //Am not getting here end; DataMod.MBDQuery.Close; // Code that works below DataMod.MBDQuery.Close; DataMod.MBDQuery.SQL.Clear; DataMod.MBDQuery.Params.Clear; DataMod.MBDQuery.SQL.Text:= ' SELECT ' + ' taddresstype.AddressTypeID,' + ' taddresstype."Description" ' + ' FROM ' + ' taddresstype ' + ' WHERE ' + ' (taddresstype.isActive=TRUE) and (taddresstype."Description"=''General'')'; DataMod.MBDQuery.Prepare; DataMod.MBDQuery.Open; if (DataMod.MBDQuery.RecordCount>0) then begin //Am getting here end; DataMod.MBDQuery.Close; |
Fri, Apr 20 2007 2:27 AM | Permanent Link |
Steve Forbes ![]() | Hi Lance,
Try DataMod.MBDQuery.ParamByName('AdrType').AsString := 'General'; rather than .Value -- Best regards Steve "Lance R" <lance@cdesoftware.com> wrote in message news:9B6C81EE-E074-4974-B0CA-2937F801A728@news.elevatesoft.com... >I tried a test and am not catching what I did wrong. > > Am I not setting the parameter right? I even tried wrapping the value set > to the param by Engine.QuotedSQLStr('General') > > Lance > > > ==== > // Code that doesn't work > DataMod.MBDQuery.Close; > DataMod.MBDQuery.SQL.Clear; > DataMod.MBDQuery.Params.Clear; > DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', > DB.ptInput); > DataMod.MBDQuery.SQL.Text:= ' SELECT ' + > ' taddresstype.AddressTypeID,' + > ' taddresstype."Description" ' + > ' FROM ' + > ' taddresstype ' + > ' WHERE ' + > ' (taddresstype.isActive=TRUE) and > (taddresstype."Description"=:AdrType)'; > DataMod.MBDQuery.Prepare; > DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; > DataMod.MBDQuery.Open; > if (DataMod.MBDQuery.RecordCount>0) then begin > //Am not getting here > end; > DataMod.MBDQuery.Close; > > // Code that works below > DataMod.MBDQuery.Close; > DataMod.MBDQuery.SQL.Clear; > DataMod.MBDQuery.Params.Clear; > DataMod.MBDQuery.SQL.Text:= ' SELECT ' + > ' taddresstype.AddressTypeID,' + > ' taddresstype."Description" ' + > ' FROM ' + > ' taddresstype ' + > ' WHERE ' + > ' (taddresstype.isActive=TRUE) and > (taddresstype."Description"=''General'')'; > DataMod.MBDQuery.Prepare; > DataMod.MBDQuery.Open; > if (DataMod.MBDQuery.RecordCount>0) then begin > //Am getting here > end; > DataMod.MBDQuery.Close; > |
Fri, Apr 20 2007 2:16 PM | Permanent Link |
"Lance R" | Steve,
thank. I just caught Alfred Ghazzi's post earlier and he was having same issues. I did try the .AsString... Still doesn't work. Thanks! BTW - Any luck on Fastreports 4 -> ElevateDB? Lance "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message news:33E45A6A-8A3C-407C-BD05-A24B3359BFFF@news.elevatesoft.com... > Hi Lance, > > Try > > DataMod.MBDQuery.ParamByName('AdrType').AsString := 'General'; > > rather than .Value > > -- > Best regards > > Steve > > "Lance R" <lance@cdesoftware.com> wrote in message > news:9B6C81EE-E074-4974-B0CA-2937F801A728@news.elevatesoft.com... >>I tried a test and am not catching what I did wrong. >> >> Am I not setting the parameter right? I even tried wrapping the value >> set to the param by Engine.QuotedSQLStr('General') >> >> Lance >> >> >> ==== >> // Code that doesn't work >> DataMod.MBDQuery.Close; >> DataMod.MBDQuery.SQL.Clear; >> DataMod.MBDQuery.Params.Clear; >> DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', >> DB.ptInput); >> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >> ' taddresstype.AddressTypeID,' + >> ' taddresstype."Description" ' + >> ' FROM ' + >> ' taddresstype ' + >> ' WHERE ' + >> ' (taddresstype.isActive=TRUE) and >> (taddresstype."Description"=:AdrType)'; >> DataMod.MBDQuery.Prepare; >> DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; >> DataMod.MBDQuery.Open; >> if (DataMod.MBDQuery.RecordCount>0) then begin >> //Am not getting here >> end; >> DataMod.MBDQuery.Close; >> >> // Code that works below >> DataMod.MBDQuery.Close; >> DataMod.MBDQuery.SQL.Clear; >> DataMod.MBDQuery.Params.Clear; >> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >> ' taddresstype.AddressTypeID,' + >> ' taddresstype."Description" ' + >> ' FROM ' + >> ' taddresstype ' + >> ' WHERE ' + >> ' (taddresstype.isActive=TRUE) and >> (taddresstype."Description"=''General'')'; >> DataMod.MBDQuery.Prepare; >> DataMod.MBDQuery.Open; >> if (DataMod.MBDQuery.RecordCount>0) then begin >> //Am getting here >> end; >> DataMod.MBDQuery.Close; >> > > |
Fri, Apr 20 2007 4:57 PM | Permanent Link |
"Lance R" | I uploaded to the binaries a client / server parameter test showing that I
can't get parameterized queries to work. I used Ole's (thank you!!) Northwind convert and added it to the server. Maybee I'm doing it wrong. I show 2 tests I tried and one that isn't parameterized that works. Lance Rasmussen |
Sat, Apr 21 2007 10:07 AM | Permanent Link |
Steve Forbes ![]() | Hi Lance,
> BTW - Any luck on Fastreports 4 -> ElevateDB? I have the DBISAM 3 and 4 components working well in D6 and D7 (and earlier probably), but get an AV in the designer at runtime with BDS2006. I traced the problem to some unprotected code in the FR core, and have sent an email to them with details of what is needed to patch it (the components work correctly in BDS2006 after patching). I am reluctant to release the components until they fix the problem or suggest a workaround that does not require users to recompile FR with the minor code change. However, if you are interested and are still using D7 (or lower) you are welcome to try out the components. Send me an email (just remove the spamfree) I am still working on the EDB components, but expect that they will have the same AV problem in DBS2006 (and D2007 I guess). I should have them done in about a week -- Best regards Steve "Lance R" <lance@cdesoftware.com> wrote in message news:9A51BB12-5D62-4AAC-8433-B21AF5011304@news.elevatesoft.com... > Steve, > > thank. I just caught Alfred Ghazzi's post earlier and he was having same > issues. > > I did try the .AsString... Still doesn't work. > > Thanks! > > BTW - Any luck on Fastreports 4 -> ElevateDB? > > Lance > > > "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message > news:33E45A6A-8A3C-407C-BD05-A24B3359BFFF@news.elevatesoft.com... >> Hi Lance, >> >> Try >> >> DataMod.MBDQuery.ParamByName('AdrType').AsString := 'General'; >> >> rather than .Value >> >> -- >> Best regards >> >> Steve >> >> "Lance R" <lance@cdesoftware.com> wrote in message >> news:9B6C81EE-E074-4974-B0CA-2937F801A728@news.elevatesoft.com... >>>I tried a test and am not catching what I did wrong. >>> >>> Am I not setting the parameter right? I even tried wrapping the value >>> set to the param by Engine.QuotedSQLStr('General') >>> >>> Lance >>> >>> >>> ==== >>> // Code that doesn't work >>> DataMod.MBDQuery.Close; >>> DataMod.MBDQuery.SQL.Clear; >>> DataMod.MBDQuery.Params.Clear; >>> DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', >>> DB.ptInput); >>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>> ' taddresstype.AddressTypeID,' + >>> ' taddresstype."Description" ' + >>> ' FROM ' + >>> ' taddresstype ' + >>> ' WHERE ' + >>> ' (taddresstype.isActive=TRUE) and >>> (taddresstype."Description"=:AdrType)'; >>> DataMod.MBDQuery.Prepare; >>> DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; >>> DataMod.MBDQuery.Open; >>> if (DataMod.MBDQuery.RecordCount>0) then begin >>> //Am not getting here >>> end; >>> DataMod.MBDQuery.Close; >>> >>> // Code that works below >>> DataMod.MBDQuery.Close; >>> DataMod.MBDQuery.SQL.Clear; >>> DataMod.MBDQuery.Params.Clear; >>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>> ' taddresstype.AddressTypeID,' + >>> ' taddresstype."Description" ' + >>> ' FROM ' + >>> ' taddresstype ' + >>> ' WHERE ' + >>> ' (taddresstype.isActive=TRUE) and >>> (taddresstype."Description"=''General'')'; >>> DataMod.MBDQuery.Prepare; >>> DataMod.MBDQuery.Open; >>> if (DataMod.MBDQuery.RecordCount>0) then begin >>> //Am getting here >>> end; >>> DataMod.MBDQuery.Close; >>> >> >> > > |
Sat, Apr 21 2007 9:28 PM | Permanent Link |
Lance Rasmussen Jazzie Software ![]() | Thanks Steve,
I'll send you an email. I only have one project now in D7. The rest is in D2006 and moving to D2007. If you don't have D2007 and need me to test or make a package for you, just let me know and I'd be glad to help. Worse comes to worse... When I start getting into the reports part of this project I'm working on, I don't have a problem modifying the FR source if they wont fix it. Thanks Lance "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message news:7F382C73-9204-40DF-A547-B1F0471FE95A@news.elevatesoft.com... > Hi Lance, > >> BTW - Any luck on Fastreports 4 -> ElevateDB? > > I have the DBISAM 3 and 4 components working well in D6 and D7 (and > earlier probably), but get an AV in the designer at runtime with BDS2006. > I traced the problem to some unprotected code in the FR core, and have > sent an email to them with details of what is needed to patch it (the > components work correctly in BDS2006 after patching). I am reluctant to > release the components until they fix the problem or suggest a workaround > that does not require users to recompile FR with the minor code change. > However, if you are interested and are still using D7 (or lower) you are > welcome to try out the components. Send me an email (just remove the > spamfree) > > I am still working on the EDB components, but expect that they will have > the same AV problem in DBS2006 (and D2007 I guess). I should have them > done in about a week > > -- > Best regards > > Steve > > "Lance R" <lance@cdesoftware.com> wrote in message > news:9A51BB12-5D62-4AAC-8433-B21AF5011304@news.elevatesoft.com... >> Steve, >> >> thank. I just caught Alfred Ghazzi's post earlier and he was having same >> issues. >> >> I did try the .AsString... Still doesn't work. >> >> Thanks! >> >> BTW - Any luck on Fastreports 4 -> ElevateDB? >> >> Lance >> >> >> "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message >> news:33E45A6A-8A3C-407C-BD05-A24B3359BFFF@news.elevatesoft.com... >>> Hi Lance, >>> >>> Try >>> >>> DataMod.MBDQuery.ParamByName('AdrType').AsString := 'General'; >>> >>> rather than .Value >>> >>> -- >>> Best regards >>> >>> Steve >>> >>> "Lance R" <lance@cdesoftware.com> wrote in message >>> news:9B6C81EE-E074-4974-B0CA-2937F801A728@news.elevatesoft.com... >>>>I tried a test and am not catching what I did wrong. >>>> >>>> Am I not setting the parameter right? I even tried wrapping the value >>>> set to the param by Engine.QuotedSQLStr('General') >>>> >>>> Lance >>>> >>>> >>>> ==== >>>> // Code that doesn't work >>>> DataMod.MBDQuery.Close; >>>> DataMod.MBDQuery.SQL.Clear; >>>> DataMod.MBDQuery.Params.Clear; >>>> DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', >>>> DB.ptInput); >>>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>>> ' taddresstype.AddressTypeID,' + >>>> ' taddresstype."Description" ' + >>>> ' FROM ' + >>>> ' taddresstype ' + >>>> ' WHERE ' + >>>> ' (taddresstype.isActive=TRUE) and >>>> (taddresstype."Description"=:AdrType)'; >>>> DataMod.MBDQuery.Prepare; >>>> DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; >>>> DataMod.MBDQuery.Open; >>>> if (DataMod.MBDQuery.RecordCount>0) then begin >>>> //Am not getting here >>>> end; >>>> DataMod.MBDQuery.Close; >>>> >>>> // Code that works below >>>> DataMod.MBDQuery.Close; >>>> DataMod.MBDQuery.SQL.Clear; >>>> DataMod.MBDQuery.Params.Clear; >>>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>>> ' taddresstype.AddressTypeID,' + >>>> ' taddresstype."Description" ' + >>>> ' FROM ' + >>>> ' taddresstype ' + >>>> ' WHERE ' + >>>> ' (taddresstype.isActive=TRUE) and >>>> (taddresstype."Description"=''General'')'; >>>> DataMod.MBDQuery.Prepare; >>>> DataMod.MBDQuery.Open; >>>> if (DataMod.MBDQuery.RecordCount>0) then begin >>>> //Am getting here >>>> end; >>>> DataMod.MBDQuery.Close; >>>> >>> >>> >> >> > > |
Sat, Apr 21 2007 10:46 PM | Permanent Link |
Steve Forbes ![]() | Hi Lance,
> If you don't have D2007 and need me to test or make a package for you, > just let me know and I'd be glad to help. Thanks! Not having D2007 is a bit of a sore point with me ![]() Enterprise subscription holder, and have seem to have been forgotten by CodeGear with this release. > Worse comes to worse... When I start getting into the reports part of > this project I'm working on, I don't have a problem modifying the FR > source if they wont fix it. It's a very simple change, so it isn't really an issue, just a hassle. I'll wait for you email. -- Best regards Steve "Lance Rasmussen" <lance at lance.ws> wrote in message news:DC48AEE1-9ED1-4019-A770-BB109622ED96@news.elevatesoft.com... > Thanks Steve, > > I'll send you an email. I only have one project now in D7. The rest is in > D2006 and moving to D2007. > > If you don't have D2007 and need me to test or make a package for you, > just let me know and I'd be glad to help. > > Worse comes to worse... When I start getting into the reports part of > this project I'm working on, I don't have a problem modifying the FR > source if they wont fix it. > > Thanks > > Lance > > > "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message > news:7F382C73-9204-40DF-A547-B1F0471FE95A@news.elevatesoft.com... >> Hi Lance, >> >>> BTW - Any luck on Fastreports 4 -> ElevateDB? >> >> I have the DBISAM 3 and 4 components working well in D6 and D7 (and >> earlier probably), but get an AV in the designer at runtime with BDS2006. >> I traced the problem to some unprotected code in the FR core, and have >> sent an email to them with details of what is needed to patch it (the >> components work correctly in BDS2006 after patching). I am reluctant to >> release the components until they fix the problem or suggest a workaround >> that does not require users to recompile FR with the minor code change. >> However, if you are interested and are still using D7 (or lower) you are >> welcome to try out the components. Send me an email (just remove the >> spamfree) >> >> I am still working on the EDB components, but expect that they will have >> the same AV problem in DBS2006 (and D2007 I guess). I should have them >> done in about a week >> >> -- >> Best regards >> >> Steve >> >> "Lance R" <lance@cdesoftware.com> wrote in message >> news:9A51BB12-5D62-4AAC-8433-B21AF5011304@news.elevatesoft.com... >>> Steve, >>> >>> thank. I just caught Alfred Ghazzi's post earlier and he was having >>> same issues. >>> >>> I did try the .AsString... Still doesn't work. >>> >>> Thanks! >>> >>> BTW - Any luck on Fastreports 4 -> ElevateDB? >>> >>> Lance >>> >>> >>> "Steve Forbes" <ozmosys@spamfreeoptusnet.com.au> wrote in message >>> news:33E45A6A-8A3C-407C-BD05-A24B3359BFFF@news.elevatesoft.com... >>>> Hi Lance, >>>> >>>> Try >>>> >>>> DataMod.MBDQuery.ParamByName('AdrType').AsString := 'General'; >>>> >>>> rather than .Value >>>> >>>> -- >>>> Best regards >>>> >>>> Steve >>>> >>>> "Lance R" <lance@cdesoftware.com> wrote in message >>>> news:9B6C81EE-E074-4974-B0CA-2937F801A728@news.elevatesoft.com... >>>>>I tried a test and am not catching what I did wrong. >>>>> >>>>> Am I not setting the parameter right? I even tried wrapping the value >>>>> set to the param by Engine.QuotedSQLStr('General') >>>>> >>>>> Lance >>>>> >>>>> >>>>> ==== >>>>> // Code that doesn't work >>>>> DataMod.MBDQuery.Close; >>>>> DataMod.MBDQuery.SQL.Clear; >>>>> DataMod.MBDQuery.Params.Clear; >>>>> DataMod.MBDQuery.Params.CreateParam(DB.ftString,'AdrType', >>>>> DB.ptInput); >>>>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>>>> ' taddresstype.AddressTypeID,' + >>>>> ' taddresstype."Description" ' + >>>>> ' FROM ' + >>>>> ' taddresstype ' + >>>>> ' WHERE ' + >>>>> ' (taddresstype.isActive=TRUE) >>>>> and (taddresstype."Description"=:AdrType)'; >>>>> DataMod.MBDQuery.Prepare; >>>>> DataMod.MBDQuery.ParamByName('AdrType').Value := 'General'; >>>>> DataMod.MBDQuery.Open; >>>>> if (DataMod.MBDQuery.RecordCount>0) then begin >>>>> //Am not getting here >>>>> end; >>>>> DataMod.MBDQuery.Close; >>>>> >>>>> // Code that works below >>>>> DataMod.MBDQuery.Close; >>>>> DataMod.MBDQuery.SQL.Clear; >>>>> DataMod.MBDQuery.Params.Clear; >>>>> DataMod.MBDQuery.SQL.Text:= ' SELECT ' + >>>>> ' taddresstype.AddressTypeID,' + >>>>> ' taddresstype."Description" ' + >>>>> ' FROM ' + >>>>> ' taddresstype ' + >>>>> ' WHERE ' + >>>>> ' (taddresstype.isActive=TRUE) >>>>> and (taddresstype."Description"=''General'')'; >>>>> DataMod.MBDQuery.Prepare; >>>>> DataMod.MBDQuery.Open; >>>>> if (DataMod.MBDQuery.RecordCount>0) then begin >>>>> //Am getting here >>>>> end; >>>>> DataMod.MBDQuery.Close; >>>>> >>>> >>>> >>> >>> >> >> > |
Sat, Apr 21 2007 11:41 PM | Permanent Link |
Dave M | >Thanks! Not having D2007 is a bit of a sore point with me
![]() >Enterprise subscription holder, and have seem to have been forgotten by >CodeGear with this release. Maybe you have been forgotton. Call customer service 800-523-7070, or your SA person. If i hadn't called I still would be waiting, and waiting.... (meaning I would not have gotten it). Dave M |
Sun, Apr 22 2007 2:50 AM | Permanent Link |
Steve Forbes ![]() | Hi Dave,
> Maybe you have been forgotton. Call customer service 800-523-7070, or > your SA person. > If i hadn't called I still would be waiting, and waiting.... (meaning I > would not have gotten it). Thanks, glad to know I'm not the only one ![]() weeks ago, but didn't get a reply. I'll followup on Monday -- Best regards Steve "Dave M" <mr_mensch@hotmail.com> wrote in message news:189BCB47-F6AD-4E09-AF2D-ACE5B21ECAE2@news.elevatesoft.com... > >Thanks! Not having D2007 is a bit of a sore point with me ![]() > >BDS >>Enterprise subscription holder, and have seem to have been forgotten by >>CodeGear with this release. > > Maybe you have been forgotton. Call customer service 800-523-7070, or > your SA person. > If i hadn't called I still would be waiting, and waiting.... (meaning I > would not have gotten it). > > Dave M > > |
Mon, Apr 23 2007 4:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Lance,
<< I did try the .AsString... Still doesn't work. >> Is this local or a remote connection ? There is an issue with using parameters with remote queries in 1.02 and earlier. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |