Im writtin' a program, a minor and very simple, for my exam. However, i have one database with three tables in it and have created relations between them.
now my problem is that I can search in the individual tables, but not in all of the through the relations.
My program looks as follows:
Code:
<%
Dim SoegeStreng, skjult, strCriteria, sqlsoeg
SoegeStreng=Request.Form("personnummer")
Set rs = Server.CreateObject("ADODB.Recordset")
strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ieusr2\users$\XXXXXX\XXXXXXX\writeaccess\databace.mdb"
sqlsoeg = "SELECT * FROM Patientoplysning WHERE Personnummer LIKE '%" & SoegeStreng & "%'"
AND
sqlsoeg = "SELECT * FROM Sygdom WHERE Personnummer LIKE '%" & SoegeStreng & "%'"
rs.Open sqlsoeg, strDSN
Response.write RecToTable(rs)
rs.Close
set rs=nothing
%>
The Xs in the strDSN is replacesments from the original, because it is private.
Can anybody please help me, i don't know what to do
