Queries with parameters fail in Delphi XE3
I have been attempting to move a Delphi XE2 DataSnap server & client project to Delphi XE3. I had to do some minor tweaks like adding the unit IPPeerServer.pas to the uses clause of the server container class but what has really caused me headaches are the parameterised queries. If I try to open a ClientDataSet on the client-side I run into a "Catastrophic failure". Here is the call stack on the client-side at the time:
System.Classes.MoveData((0, 0, 0, ...
System.Classes.TMemoryStream.Write((0, 0, 0, ...
I am trying to build maste/detail page.
1. I have on my page drop down control based on sqldata sources with the concataned fields as follows:
SELECT DISTINCT LastName + ' ' + FirstName AS Expr1 FROM dbo.Table1
It displays First Name space and Last name in the box and works fine.
2. I placed on my form a grIdview
In data source I am trying to use parameter filter in SQL select query and the same query as for drop down as follows:
SELECT LastName + ' ' + SiteFirstName AS Expr1, field1, field2, etc.........Problem with Delphi XE2 using parameters in SQL query [Edit]
I have problem with using SQL with parameters.
This part of code works fine on Delphi 2007, but have Debugger Exception Notification in Delphi XE2
with ADOTmp do *//works fine on Delphi2007 and Delphi XE2, date value is inserted*
*SQL.Add('UPDATE Table SET Date = ''2012-04-03 13:13:13'' ');*
with ADOTmp do *//works fine on Delphi2007*
*SQL.Add('UPDATE Table SET Date = :D1 ');*
Parameters.ParamByName('D1').DataType := ftDateTime;
Parame...Getting parameter not found error at Delphi-SQLite query [Edit]
I am getting error like 'parameter not found' with following SQL query at Delphi
In table emp
usergroup_id :- integer
label, description are string data type.
My code is as follows
SQLQuery31 := TSQLQuery.Create(nil);
sdescription := RzEdit1.Text;
ldescription := RzMemo1.Text;
gid := Integer(RzComboBox1.Items.Objects[RzComboBox1.Items.IndexOf(gname)]);
SQLConnection1.Connected := true;...C# Ado.net Sql query parameter query
I'm trying to pass in a parameter value from an array in a loop that is used in a sql query and the results are populated to an xml file. The trouble is that I'm only getting the colums values in the outputted xml file. So I feel that the paramter is not being read.
So can anyone help as I'm really stuck on this one. The code is as follows :
public void DisplayUserInfo()
ArrayList UserIdArrayList = IdentifyUserID();
foreach(string ShowUserIDString in UserIdArrayList)
SqlConnection SqlConn = new SqlConnection(DBConnString)...FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used
the link in my email from Embarcadero to download the FireDAC components. Then I ra...Query a Query
I have a result set in a query.
Is it possible to query this query?
(no specific SQL dialect, can it be done generically?)
PETROS GAVRIELIDES wrote:
> I have a result set in a query.
> Is it possible to query this query?
> (no specific SQL dialect, can it be done generically?)
There is a generic answer to your question: Yes, there is a construct
called a sub-query that allows you, in 1 SQL statement, to query from a
But, generically speaking, not all DB engines support this construct.
For instance, Firebird only added it just over a y...Query with Parameter
I am trying to use values from query as keys for another query. I have
one main form with tabforms on it. On the main form I have a main query,
query_1. On the tabform I have a query, query_2.
Each record in query_1 will have multiple corresponding records in
query_2. Each time I move the cursor in query_1 I want query_2 to
re-execute and produce a new recordset. I will do this by passing values
from query_1 to query_2 as parameters. I can get the values from query_1
but I am having trouble getting query_2 to execute with the parameters.
I am using SetParameter( ) but to no avail. Co...Query about Queries
As a relatively new user to Sybase I am hoping someone can point me in the
right direction. We are getting ready to go live with our database and I am
wondering what types of queries I should be running for system performance
purposes. If anyone has any suggestions they would be more than appreciated.
Thanks in advance,
I have found a problem with the customizable queries.
In the function SaveQuery in the file AccessDataAccessLayer.cs, there is a foreach loop to go through each query clause and add them in the database.
However, if for example I create a query with two clauses, the boolean operator for the second clause will be the same of the one for the first clause. It seems that the new value is not set properly in the parameter.
Also, the length of the fieldname of the first clause is applied to the fieldname of the second clause and if it is longer, the fieldname is cut, causing an er...Parameters in query
Hello, first of all, if I'm posting in the wrong section fell free to be rude. I apologize.I'm pretty new to mdx and Reporting services, and already got stuck on a pretty stupid problem..I need a table that shows a measure in 2 different times, on columns. Like this:-----|-----| Q1 | Q2 |bla | bla| 200 | 300 |bla | bla| 21 | 32 |bla | bla| 43 | 77 |This is the query i'm using:withmember [Measures].[Q1] as ([Measures].[Number of Machines], [TimeID].[Mon Name].[June 2008])member...query parameter
I have to create a stored procedure where the criteria is: "All", specific value and, all except one value so far this is what I have:@Status varchar (50) -- as parameter from a dropdown boxDECLARE @NewStatus varchar(50)
SET @NewStatus =
WHEN @Status ='All' AND @Status <> 'All but closed' THEN '%'
WHEN @Status <>'All' AND @Status <> 'All but closed' THEN @Status
and in the stored procedure
WHERE Status like @NewStatus I am a little confused as to how could I return all values except those that have the ...How to query a query...
I'm working on converting an Access DB that I created into an ASP.NET application (and attempting to learn ASP at the same time...). One of my queries was very complex and required running a different query first, and then working off of that one. Any suggestions on the best way to do this in ASP?
The following is a sample of code I'm using so you can see the type of data-binding I'm using. Thanks for the help!
myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +"Data Source=" + Server.MapPath("/EquipmentCheckout.mdb"))
I have the following code:
Dim ConnectString As String
Dim MyDataSet As New DataSet
Dim Connect As OleDbConnection = New OleDbConnection
&nbs...How to Query A Query
I have been trying to build a crosstab report that reports everydate
within a selected range across the top and specific row information.
7/1 7/2 7/3 . . .
What I get as output is only the dates that contain information in the
rows. I can get the information I need by using a query within a query
Can a nested query be done in Informaker 5? What about version 6 or 7?
Thanks for your help
Convert your SQL to syntax, and you can write anything you want. So if your