Questions tagged [tadoquery]

119 questions
8
votes
2 answers

Delphi : Setting OnGetText Event Handler for fields of a dynamic query

I want to set my own procedure to OnGetText event of fields in a dynamic query My procedure is like this : procedure TMainFrm.MyFieldGetText(Sender: TField; var Text: String; DisplayText: Boolean); begin ... end; "...Captions" are String…
Mahmoud_Mehri
  • 1,643
  • 2
  • 20
  • 38
7
votes
8 answers

Delphi Performance: Reading all values under a field in a dataset

We're trying to find out some performance fixes reading from a TADOQuery. Currently, we loop through the records using 'while not Q.eof do begin ... Q.next method. For each, we read ID and Value of each record, and add each to a combobox list. Is…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
7
votes
3 answers

ADO components CommandTimeout

I have a problem with settings of the query execution timeout with TADOQuery, TADOCommand or TADODataSet (I've tried it with each one). I have a tiny application, which connects to the database and periodically executes stored procedures, which…
user532231
7
votes
1 answer

Asynchronous TADOQuery's OnFetchComplete not synchronized to main thread

When using TADOQuery with [eoAsyncFetchNonBlocking] and attaching to OnFetchComplete event I found that OnFetchComplete is not executing in the main thread (tested in XE4 and XE8). I assume this a bug*, since most of us will do work in the UI on…
6
votes
1 answer

Is it possible to show the records from an ADOQuery whilst opening it?

I have an ADOQuery linked to a DBGrid by a DataSource. The ADOQuery and the DataSource are in a DataModule and the connection is in another form. Is there any way to make my application show rows while the query is fetching the records? Like MSSQL…
Ronie M
  • 71
  • 4
6
votes
2 answers

Handling of Unicode Characters using Delphi 6

I have a polling application developed in Delphi 6. It reads a file, parse the file according to specification, performs validation and uploads into database (SQL Server 2008 Express Edition) We had to provide support for Operating Systems having…
Abhineet
  • 403
  • 4
  • 14
5
votes
0 answers

Calling the OnDrawColumnCell procedure Delphi DBGrid

I have DBGrid which stores client information and the expiry dates of memberships. I am using the following code on the OnDrawColumnCell event of the DBGrid to color rows which include memberships which are expiring (teal) or expired…
Turtle254
  • 115
  • 3
  • 9
4
votes
4 answers

How to pass parameters to an ADOQuery object?

I am using ADOQuery in Delphi 7 and Oracle. I am getting error while passing parameters to ADOQuery. I have used following line. Please help me to identify error. ADOQuery.Sql.text:= 'select * from temp_table '+ 'where column1 in (select…
Nalu
  • 1,107
  • 4
  • 20
  • 43
4
votes
3 answers

Delphi - Why am I getting this Access Violation? Is there a limit to ADOQuery parameteres?

I have this code that is returning an Access Violation ('Access violation at address 74417E44 in module 'sqloledb.dll'. Read of address 786E3552') and I can't identify where is the problem. My only guess is that ADOQuery has a limit for the number…
4
votes
1 answer

TADOQuery Temp Table Lost if it has a parameter in query

I have a TADOQuery that generates a tempTable if I hard code the "Where parameter, it works fine, but if I use a TADO Parameter the next query doesn't know about the temp table. What am I doing wrong? I wish I could simplify this example but here it…
runfastman
  • 927
  • 2
  • 11
  • 31
4
votes
4 answers

How to achieve independent cloned TADODataSet?

The scenarios is like this: We have some SQL table. We are performing an SQL query on this table and we have results in TADOQuery object. var qryOryginal, qryClone: TADOQuery; begin //setup all the things here qryOryginal.Active := True; …
Wodzu
  • 6,932
  • 10
  • 65
  • 105
3
votes
2 answers

How can I export only some columns from that ADOQuery to Excel using Delphi (any version)?

I have an ADOQuery (TADOQuery, bound to other visual components) with multiple columns (fields), in Delphi. I can export all the data (rows and columns) to an Excel file. I'm using OleVariant, something like ovRange.CopyFromRecordset (Data, Rows,…
Elton
  • 33
  • 4
3
votes
2 answers

ADOQuery.Locate Slow, Create Index

I have following line to Locate a row in a Query . if Query.Locate('Line;Hour;Minute',VarArrayOf([Line-400,AHour,minuteof(Start)]),[]) = true then This is slow, now I remember that one can add Indexes to the Query so that the Locate itself is…
user1937012
  • 1,031
  • 11
  • 20
3
votes
3 answers

DELPHI ADOQuery - detect if dataset will be returned

I'm struggling with correct procedure for executing SQL query. Basically, I have text field where user can enter SQL code and program will execute it. Unfortunately, I don't know if the dataset will be returned, so I cant tell which function to…
Arthur
  • 43
  • 1
  • 4
3
votes
0 answers

Too many fields in TAdoQuery giving Out of Memory error - Delphi/SQL Server

I am using Delphi XE7 and connecting to a SQL Server 2012 Express Database using TAdoQuery and TAdoDataSet to query a database. The connection is made through a TADOConnection object and a OLEDB UDL file (with the connection string of the…
Tim Bowers
  • 41
  • 3
1
2 3 4 5 6 7 8