Hello,
I have to take several fields from several tables and write the commandtext to make my CrystalReport, but I have problem with connecting the tables. The database I use is Ms Access.
Here is the commandtext I wrote:
string comstring1 = "Select Table1.Rbr, Table1.mbr, MATDAT.PRIME, SIFRAB.IMEZAN, ORGDAT6.IOE, Table1.sifra, Table1.nazivnatema, Table1.propisi, Table1.datumod, Table1.datumdo, Table1.mesto,Table1.izveduvacnaobuka from MATDAT inner join Table1 on MATDAT.MBR=Table1.mbr join ORGDAT6 on MATDAT.PE=ORGDAT6.PE join SIFRAB on SIFRAB.RABMES=MARDAT.RABMES order by Table1.Rbr asc";
but when I run the windows forms application I get an error:
Syntax error (missing operator) in query expression 'MATDAT.MBR=Table1.mbr join ORGDAT6 on MATDAT.PE=ORGDAT6.PE join SIFRAB on SIFRAB.RABMES=MARDAT.RABMES'.
Can anybody help me how to write the commandtext of the command correctly please?
Thank you in advance
Loading

Kunal VaishyaRank #990 · 2K reputationPosted Jul 19, 2013, 12:36 AM EDT
Explain your relation of database.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 19, 2013, 1:17 AM EDT
Try like this
Regards,
Iftikar
NelRank #2,060 · 702 reputationPosted Jul 19, 2013, 1:33 AM EDT
I tried this and I got this error
"Syntax error in JOIN operation."
NelRank #2,060 · 702 reputationPosted Jul 19, 2013, 1:38 AM EDT
Here is the look of the relationships among tables