Click to See Complete Forum and Search --> : ADODC


cyseng10
April 23rd, 2001, 10:11 PM
hi!i'm wilson. I need help on ADODC control. i using the ADODC control to get the database and the data displayed on the datagrid.

i need to link 2 tables and displayed the all data on same datagrid. can it be done ?

FYI, i usign SQL command which written in the property page SQL Command field in the ADODC control - RecordSource. The 2 tables are using same data type and fields. Now, i able to connect one table. how i write the SQL command to coonnect 2 tables? Is that other way to solve the problem?

Here the SQL Command (call one table)

SELECT CUSTOMERID,MSISDN,DEVICETYPE, SERVICECODE,IN_DATETIME, OUT_DATETIME, MESSAGE_STATUS,CSN,HOSTSTAN, MESSAGEID,USERID,STAN,GATEWAYID, DEVICE_MSG,DEVICE_MSG_LENGTH,HOST_MSG,HOST_MSG_LENGTH, RESPONSE_MSG, RESPONSE_MSG_LENGTH,RAW_MESSAGE,BATCH_NO, RETRY_NO,ERROR_CODE,ERROR_MSG,BROKERID FROM GWTRANSACTION

Regards,
Wilson Chai

d.paulson
April 24th, 2001, 07:34 AM
This is an example of a join. This is joining two tables named AcctsReceivable and Province.

SELECT * FROM AcctsReceivable Left JOIN Province ON AcctsReceivable.ProvinceID=Province.ProvinceID ORDER BY CustName

David Paulson

vchapran
April 24th, 2001, 07:42 AM
Use UNION:
"SELECT CUSTOMERID,MSISDN FROM GWTRANSACTION
UNION SELECT CUSTOMERID,MSISDN FROM SECONDTABLENAME"

Vlad