Can you create sql join statements for datasets. I know you can make relationships between table in the dataset but I was wondering if a join was possible and what the code would look like if it was possible?
Printable View
Can you create sql join statements for datasets. I know you can make relationships between table in the dataset but I was wondering if a join was possible and what the code would look like if it was possible?
if you want to do an INNER JOIN, its easy as Access
"SELET * FROM Table1 INNER JOIN Table2 ON Table1.id = Table2.id;"
Yes I did that but I was really lazy, I created a Dataview in the Data Designer and then just used the Dataview. Mind you, you have a lot of fun when you go and try and update the underlying tables the help text says it can be done but I just could not figure it out and ended up using executenonquery to update the underlying tables, will have to revisit parameter based queries when I have the time (sigh)
unfortunatly Im not using access Im using oracle so I bet that it gets really complicated
ah yes I guess it does, however I am using sql server via adodb and although I've notresearched it, found what I wanted and used, I had the impression that ado0db was for use by the drivers that were developed specifically for ado. I guess though if yu are suing orascle via odbc then you can't use the datadesigner or can you? - because if so, that's all I did was to createw the dataview in the designer and use that
Im not sure I know you can hook access to an odbc and it lets you build quires that use joins as far as the data designer it joins tables usid where tablekey1 = table2key1 and no join and when I copy these statements to any thing besides the data designer they done work. But I think that proablly the easiest way to solve my prob is with a view in oracle