![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Feb 13 2018 2:19 PM | Permanent Link |
Ronald | Hi,
If I use this sql in EWB server then I get the expected result (a TGrid is filled): select * from test where No='M030520171643050545494962825252' But if I use parameters like this, I get an error: select * from test where {No=M030520171643050545494962825252} dbisam engine error #11949 parsing error expected column name but instead found 030520171643050545494962825252 in sql select statement What am I doing wrong here? Ronald |
Tue, Feb 13 2018 3:48 PM | Permanent Link |
Richard Harding Wise Nutrition Coaching | Hi Ronald
The "masterdetail" application in the example programs shows how to use parameters to obtain the orders for the selected customer. * Using the Database Manager, select the ExampleData database and CustomerOrders dataset. * The Select statement is defined as SELECT * FROM custord WHERE CustomerID={CustomerID} * The parameter CustomerID is defined by {CustomerID} * Ensure that the Base Table is defined which must contain a primary key. In the application, set the parameters. For example, procedure TMasterDetailDatabase.LoadCustomerOrders; begin CustomerOrders.Params.Clear; CustomerOrders.Params.Add('CustomerID='''+Customers.Columns['CustomerID'].AsString+''''); LoadRows(CustomerOrders); end; Richard |
Wed, Feb 14 2018 3:00 AM | Permanent Link |
Ronald | Richard Harding wrote:
> The Select statement is defined as SELECT * FROM custord WHERE CustomerID={CustomerID} >* The parameter CustomerID is defined by {CustomerID} >* Ensure that the Base Table is defined which must contain a primary key. >CustomerOrders.Params.Add('CustomerID='''+Customers.Columns['CustomerID'].AsString+''''); Hi Richard, Thanks, I misunderstood the {} part, it works fine now. I only changed CustomerOrders.Params.Add('CustomerID='''+Customers.Columns['CustomerID'].AsString+''''); in CustomerOrders.Params.Add('CustomerID='+QuotedStr(Customers.Columns['CustomerID'].AsString)); |
This web page was last updated on Thursday, March 30, 2023 at 08:54 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |