Many thkx for the reply, however, I use qry1 to populate a dbgrid from table1, I then need an extra (lookup) field to qry1 that will get its data from Table2 and display it as a dropdown box in a cell of the dbgrid. Hope my explanation makes sense?
Hannes
I have an ADOQuery qry1 which gets its ConnectionString programmatically. I need to add a Lookup field but, when I double-click the query, Delphi (7) complains there is no ConnectionString. So I need to code in the new field. I get as far as - I hope that's correct -
<code>...
I successfully create a new key and write a value to it. I cannot get to delete the values or the key itself. My code is
<code>
with TRegistry.Create do
try
Val := TStringList.Create;
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('SOFTWARE\VotAfr\', True) then
begin...
Many thanks for the replies. Steve, that's exactly what I'm playing with, something I did once way back with QuickBasic (so how old am I) where it was easy as pie, not that I'm capable of baking one. Haven't thought of cracking it by using compare, tho I suppose one could involve the registry or...
I'm playing around with copy-protection and want to try the following: Assuming I have an application MyApp.exe with a variable assigned the value of "ABCDE' somewhere inside the executable. How can I locate where this value is written in the file? Then, how can I write a new (same size) value...
Back onto my favourite nemesis -- displaying updated data in a DBGrid immediately after inserting data into an Access DB from an Edit box or other non-db aware object.
I have an Access db with one table (City) andone text field (City). The form has a DBGrid, one Edit box, ADOCommand, ADOTable...
I have in fact tried two different ADOConnections as well as two different ADOQuerys. Eventually I left the connection to the 'remote' (different directory, it may be on a server) db as is and moved the 'local' db to the folder where the executable resides. Using ExtractFilePath(Application.exe)...
Dunno if its of any help but, what I do if I have a problem seeing a variable value, I display the value in a temporary label or edt box on the form.
Hannes
With a DBGrid, ADOConnection, ADOQuery and two buttons, my code is
procedure TForm1.btnDB1Click(Sender: TObject);
begin
qryDB1.Active := False;
//DB1 is in a sub-folder
conStr1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
'Data...
I am experiencing two frustrating problems with an ADOQuery:
1) QRY1 uses a ConnectionString to Access db1. QRY2 must use a ConnectionString to another Access db2 in a different folder. However, QRY2 keeps telling me it cannot find db2 in the folder where db1 is located. To at least make the...
I am experiencing two frustrating problems with an ADOQuery:
1) QRY1 uses a ConnectionString to Access db1. QRY2 must use a ConnectionString to another Access db2 in a different folder. However, QRY2 keeps telling me it cannot find db2 in the folder where db1 is located. To at least make the...
Could someone please show me how to close my application if there has been no user input for a specified period of time? I want my program to terminate if the user did not click a key for say 10 minutes. I'm guessing I will need to use a TTimer so I can specify the time, together with...
I'm using ehlib which has served me well over the past. It seems it must be populated from a query to enable sorting by clicking on a column heading. I'll hav a look at the grid from devexpress.
I populate a DBGrid using a ClientDataSet, Provider and DataSource. I cant seem to get the DBGrid to sort when I click on a heading. Must I use an ADOQuery to do this?
Hannes
Thanks for that, in truth, I never set the KeepConnection to False. Matter of fact, I completely missed that property! Tried it and it also works fine. :)
I use Delphi 7 Enterprise.
Hannes
Just to wrap this one up: After reading the database, I did such things as qryData.Active := False, closed datasets, etc, all to no avail. What did work was to make the ConnectionString := ''; as well. This closed the .ldb file.
Hannes
I have been using Delphi7 in Vista 64-bit and now in Windows7 64-bit. I did find that I needed to set Security in the Borland/Delphi7 folder in the Program Files(x68) folder by giving Full Control to specified Users. I did this to the entire folder and sub-folders.
I suspect your usrs will need...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.