Questions tagged [tadoquery]

119 questions
1
vote
0 answers

varchar returning from tado query but dont know what to create my dataset field to for this varchar

Not sure if anyone can help me. I am new to delphi. And my objective is to write data returning of a TADO query to a dataset. I have created a SQL TADO Query and in that query I am returning integers, Date and Varchars. on the TADO Query, I needed…
Fly
  • 43
  • 1
  • 8
1
vote
2 answers

How do you use NOLOCK with TADOQuery and TADOTable?

I have the SQL text "SELECT * FROM TABLE1 WITH (NOLOCK)". Two questions: How do I make my TADOQuery use the NOLOCK hint without having to include that in the SQL text? I have literally thousands of TADOQuery's with their SQL dynamically built, and…
C. Smith
  • 149
  • 5
1
vote
1 answer

Adoquery1 missing sql property - Delphi

I'm trying to add some data in an access database. But I'm having trouble because this returning the error: ADOQuery1 missing sql property Realized several modifications to the code and so far nothing has worked . What am I doing wrong ? try …
abcd
  • 441
  • 6
  • 24
1
vote
1 answer

is there a way to update or insert TADOQuery from TADOQuery1

i have nou 2 query´s TADOQuery and TADOQuery1 and i wouth like to update TADOQuery record´s from TADOQuery1 via code is it possible ?? they have the same field´s Thank´s Ml
ml.
  • 163
  • 1
  • 4
  • 15
1
vote
1 answer

Delphi TADOQuery: Format data before SavetoFile

I have an application that allows a user to run a query over a remote database using a TADOQuery component. The query results are then saved to an XML file using the TADOQuery's SaveToFile method. I've recently run into an issue whereby if a line…
Jeedee
  • 548
  • 5
  • 24
1
vote
0 answers

delphi - Access Violation error when execute Open method of ADOQuery

This is my code: procedure TfrmServerMain.CmdHndler_GetOrderProdDatesCommand(ASender: TIdCommand); begin if Assigned(ASender.Params) then with TADOQuery.Create(nil) do begin Connection := ADOConnection1; SQL.Clear; …
Farshad H.
  • 303
  • 4
  • 16
1
vote
2 answers

Delphi TADOQuery SaveToFile problem

I have written an application that allows a user to create and run a query, then save the report to file. They can load the report from file at a later date and view on screen. I use a TADOQuery component to run the query, and call SaveToFile when…
Jeedee
  • 548
  • 5
  • 24
1
vote
1 answer

Delphi 7 Syntax error (comma) in ADO query

I'm trying to create a record in a database using a SQL query in Delphi 7. I'm using an ADO Query and I've tried both with and without parameters, but to no avail. The error occurs between ShowMessage 1 and 2. sName := ledName.Text; sSurname :=…
DearVolt
  • 358
  • 3
  • 13
1
vote
1 answer

Delphi, MS Access, ADO: "a query to a query with parameters" doesn't give proper result

Please help me to understand what is happening. Suppose there are following items in an Access database: table MyTable: IDLine (auto-increment field), a, b (integers), and there is a line with IDLine = 4 in this table. query MyQuery: SELECT IDLine,…
1
vote
3 answers

SQL Server 2008 Master/Detail ( Using Delphi and ADOQuery )

I have a SQL Server 2008 DataBase with 2 Table : Master and Detail Master Fields : ID and ... ; Detail Fields : ID , MasterID and ... ; I have been set the relationship between Master and Detail in SQL Server I want when I Select a record in Master…
Mahmoud_Mehri
  • 1,643
  • 2
  • 20
  • 38
1
vote
0 answers

Can I change TAdoQuery results after I have selected them from database

I have a gridview which is connected to a TAdoQuery. I would like to change the values of a column for all the rows that I have filtered out. Something like "check all" so it changes all the values for a column called "active" to True. How would I…
Joe
  • 2,675
  • 3
  • 21
  • 26
1
vote
0 answers

Delphi ADOQuery parameters access violation

Why this does not work any longer on WinXP but works on Win7 and others? qryS.SQL.Add('SELECT column'); qryS.SQL.Add(' FROM some_table'); qryS.SQL.Add(' WHERE param = :param1'); qryS.Parameters.ParamByName('param1').DataType :=…
1
vote
3 answers

ADO - Can I edit results of a complex query with multiple join statements?

I'm working on a data conversion utility which can push data from one master database out to a number of different databases. The utility its self will have no knowledge of how data is kept in the destination (table structure), but I would like to…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
1
vote
2 answers

Array parameter for TADOQuery in Delphi 2010

I need to execute a simple query: SELECT * FROM MyTable WHERE Id IN (:ids) Obviously, it returns the set of records which have their primary key 'Id' in the given list. How can I pass an array of integer IDs into ADOQuery.Parameters for parameter…
Dingo
  • 149
  • 1
  • 10
1
vote
0 answers

"Object was open" when connecting to SQL Server Compact Edition

I'm hoping someone can help me with this as I am ripping my hair out. I am creating an application that uses a SQL Server Compact to store a set of data. I am using TADOQuery to connect to the server which is working fine and I am able to create…
AlyD
  • 11
  • 3