
kitesmite
Posts: 12
|
| Posted: 06/02/2008, 10:59 AM |
|
Hello,
I'm trying to display a value in a grid that comes from another database.
I have 3 connections set in my project and all connections are up.
ehorst_crm which is pointing to the crm database.
ehort_intranet which is ponting to the ehorst_intranet database
ehorst_beheer which is pointing to the ehorst database.
I tried the before show and before show row on a grid called BasicGrid, but none is working.
This is my code.
global $DBehorst_crm;
global $BasicGrid;
$BasicGrid->project_klant_id->SetValue(CCDLookUp("bd_naam", "bedrijven", " bd_id=".
$DBehorst_crm->ToSQL($BasicGrid->project_klant_id->GetValue(), ccsText), $DBehorst_crm));
The main connection in this grid is the ehorst_intranet connection.
Advice in this is really appreciated.
Regards,
Frans
_________________
Official user from 2002 as member Travel-Net.
Official user from 2007 member as Kitesmite
Using PHP, MySQL, Apache
Origin: NL, Timezone GMT+1 (Forumtime +9) |
 |
 |
kitesmite
Posts: 12
|
| Posted: 06/02/2008, 12:26 PM |
|
SOLVED!
Thanks to WKempees. Found the solution in
http://forums.codecharge.com/posts.php?post_id=74077&s_...++%24db+%3D+new
and did the BEST SOLUTION OF ALL
in my case:
BeforeShow on the label
add the "DLookup" action
and set the properties:
Expression: "bd_naam"
Domain: "bedrijven"
Criteria: "bd_id=".$BasicGrid->project_klant_id->GetValue()
Connection: ehorst_crm
Convert result to: Text
Type of target: Control
Target: project_klant_id
_________________
Official user from 2002 as member Travel-Net.
Official user from 2007 member as Kitesmite
Using PHP, MySQL, Apache
Origin: NL, Timezone GMT+1 (Forumtime +9) |
 |
 |
wkempees
Posts: 1679
|
| Posted: 06/02/2008, 4:36 PM |
|
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
|

|
|
|
|