Questions tagged [tadoquery]

119 questions
1
vote
4 answers

is there a way to find who fired OnExecuteComplete event of TADOConnection?

I am trying to write an ADO Database profiler in Delphi 7. it is part of a Delphi project. I am using OnExecuteComplete event, but on some PCs i get "MSADO15.DLL" Access Violation error. I have researched and underestand some win version is…
You-See
  • 81
  • 2
  • 7
1
vote
1 answer

TADOQuery Error While Executing The SQL Second Time

I am getting a strange behavior by TADOQuery component in Delphi 7 on Windows XP and Windows7 operating system. Following issue works fine on Windows7 oprating system, but it gives an error on XP operating system. Let me explain the scenario, I…
Vishal Tiwari
  • 739
  • 2
  • 12
  • 28
0
votes
1 answer

how to connect dbgrid with adoquery with paramaters

I'm trying to use Adoquery with parameter (start day and end day ) in delphi 7 but the problem is when i click button filter (with suppose to filter the dbgrid using sdateedit1.date and sdateedit2.date) i got an empty rows , Please help me I try…
0
votes
0 answers

How can i append record to TAdoQuery without clearing its fields?

I am using TAdoQuery with BatchOptimistic lock type. If the select command has some fields that are calculated on database server the returned fields has property ReadOnly = true, so i must change them to false so i can modify them in my query. I am…
0
votes
1 answer

Storing TTreeView inside SQL Server database table

Am trying to store my TTreeView inside SQL Server database table by using the next procedure: procedure Save; var BlobField :TBlobField; Query:TADOQuery; Stream:TStream; begin Stream := TMemoryStream.Create; Query :=…
Issam
  • 133
  • 8
0
votes
1 answer

First login attempt works if it's correct, but if it's incorrect then other correct attempts don't work

void __fastcall TFormLogin::btnLoginClick(TObject *Sender) { UnicodeString query = "select * from admin where korisnickoIme = '" + editKorisnicko->Text + "' AND lozinka = '" + editLozinka->Text + "'"; AnsiString…
Lovro
  • 3
  • 1
0
votes
0 answers

Delphi ADOConnection / ADOQuery (SELECT) to Access database file is freezing when another user is editing a record in the table

Using: Delphi 10.2.3 Tokyo Enterprise / VCL forms application I've written an application that connects via TADOConnection (JET 4.0 provider) to an existing Access back-end database (*.MDB) file that is located on a network shared drive (Z:). This…
Steve F
  • 1,527
  • 1
  • 29
  • 55
0
votes
2 answers

How can I load Field1 and Field2 from TADOQuery to TTreeView?

I want information from TADOQuery to be loaded into a TTreeView. For example, I want it to be loaded as Field1->Add in Table1 and as Field2->AddChild with buttonClick. But when I run the code, I am getting an error: Access violation at adress…
sadimba
  • 1
  • 3
0
votes
1 answer

how to get rid of "ADOQuery Field name not found" error in Delphi? (Using MS Access, and ADOQuery)

im trying to display a (For example): UserCode and Password that is already set in my MS Access Database for Delphi if there is any fix for this i would appreciate it. this is part of my code that im using to obtain the infos and display them into a…
0
votes
0 answers

SQL function to find last occurrence of substring in a string in Delphi 10.3

I need to find the index of the last delimiter in a string using SQL. I am using Delphi 10.3 with the TADO components to connect to MS Access. I have found several solutions that work in Access but doesn't work in my TADOquery. Here is a query that…
0
votes
2 answers

Delphi - ADO query and FillChar generates errors

I have the following code: var wqry:TAdoQuery; ... FillChar(wSpaces,cSpacesAfter,' '); try wqry := TADOQuery.Create(nil);//here the error wqry.Connection:=... cSpacesAfter is a constant and has the value 1035. wSpaces is a local string…
RBA
  • 12,337
  • 16
  • 79
  • 126
0
votes
2 answers

TADOQuery Including blank rows

When using the 'while not TADOQuery.Eof' with an microsoft Excel Workbook, it's including rows which are completely empty. Is there a way to stop including any rows that are completely blank as I don't need them?
Wiliam Cardoso
  • 434
  • 1
  • 8
  • 23
0
votes
0 answers

How can I write to a lookup field in a TADOQuery?

I have a TADOQuery with a Lookup field that references a string field in another TADOQuery. I've connected a TcxDBTextEdit to the lookup field, but the value in the lookup table in the database is not getting updated. Is it even possible to use a…
Magnus
  • 17,157
  • 19
  • 104
  • 189
0
votes
1 answer

Function with Variant Parameter

I created a function to Refresh a Query with Parameters, and then Locate a Specific field . function RefreshQuery(AQuery : TADOQuery; AField : string; AValue : integer; AParam : string; AParamValue : Variant) : boolean; overload; When the AValue is…
user1937012
  • 1,031
  • 11
  • 20
0
votes
1 answer

ADOQuery AfterScroll not Triggered with One Record / No Record

I have a MasterQry and a SlaveQry on the form . The MasterQry is something like this : select * from Header where Active = 1 . On it's AfterScroll event I have following : select * from Slave where HeadID=:Header.ID Now if I do : if…
user1937012
  • 1,031
  • 11
  • 20