26

(9 replies, posted in Script)

This is what i used and get an error.

procedure Jobfiles_TableGrid2_OnCellDoubleClick (Sender: TObject; ACol, ARow: Integer);
begin

jobfiles.edit3.text:=jobfiles.TableGrid2.cells[jobfiles.TableGrid2.SelectedRow,1] ;

end;

27

(9 replies, posted in Script)

This is what i used and get an error.

procedure Jobfiles_TableGrid2_OnCellDoubleClick (Sender: TObject; ACol, ARow: Integer);
begin

jobfiles.edit3.text:=jobfiles.TableGrid2.cells[jobfiles.TableGrid2.SelectedRow,1] ;

end;

28

(9 replies, posted in Script)

Hi,

Can you show me the exact script you used please.

Many thanks

John

Many thanks,

This is what i used

SQLexecute('update jobs  set cust_short = (SELECT address.short FROM address WHERE  jobs.record_count = "'+jobfiles.edit25.text+'"  AND address.id = '+jobfiles.Combobox1.sqlvalue+')');

And it worked fine except it still nulled all the other fields in the cust_short column, how ever it did enter it in the correct position.

Kindest regards
John

Could anyone look at this, the edit25 thats a text box in a form and tell me what syntax i need, tried every combination i can think off.

update jobs  set cust_short = (select address.short from address where address.id = ('+jobfiles.Combobox1.sqlvalue+') and jobs.record_count = edit25 )

31

(3 replies, posted in General)

Thanks Derek.

Can do that, but this is the problem.

SQLExecute ('update temp set var1 = (select address.short from address where address.id = ('+jobfiles.Combobox1.sqlvalue+')) ');

SQLExecute ('update jobs set cust_short = (select var1 from temp where var10 = jobs.id ) ');

Here i'm just updating one line, putting the address id into a temp file, this updates jobs, but nulls all the columns except the columns i'm updating.

32

(3 replies, posted in General)

Hi all,

As you will gather i'm a little new to this.
I'm writing a program that basically has 3 main tables, address, jobfiles, stock.
The stockfile collects data from address and stock to produce invoices.
The jobfile stores an invoice address and delivery address selected from the address table.
For the life of me i can't seem to copy an address file into the jobfile however i code it.
I can select the address id but loose the jobfile id, or the other way round, i've tried everything.
Now i'm sure there is a variable that stores an id after focus but no idea what it is, if i could get the whole sql command in one line then it would work.
Then all i will need is a command in the script to refresh the jobfile form.
Hope i have explained this clearly, and again many thanks in advance.

John

33

(2 replies, posted in General)

Many thanks Derek, i will give it a try.

As you can see i know very little sql
I am displaying a database address.* and want to copy an address into a database jobs.*
Any help would be greatly appreciated.



insert into jobs (cust_n)
   values ("edit4")

35

(187 replies, posted in General)

Hi All,

Anyone on here know how to execute an external program, for example a database full of pdf and tiff files names and drive location, On click load pdf viewer and display the filename stored in the database.

Thanks in advance.

36

(5 replies, posted in General)

Derek,

Many thanks, that was most helpful.

Kind regards

John

37

(5 replies, posted in General)

Hi Everyone,

Can anyone please tell me why this SQL script doesn't work.

SELECT
comp_name_address

FROM Companydata

WHERE comp_name_address like "{searchcompany}"

Many thanks in advance.

John

38

(5 replies, posted in General)

Ok, i have paid for the product, where do i get a key?