{A_K_A}
-
Posts
19 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by {A_K_A}
-
-
Yes it is now working! Here is the code if any one is intrested
I have one more question. I have created a html form to add records to the access DB and have moved the asp code in to a new file called diplay.asp. one, is this a good idea and two how can I call the file from the html page so the table is displayed?Set rstSimple = cnnSimple.Execute("SELECT * FROM People, Address, Contact_NO where people.ID = Address.ID and people.ID = Contact_NO.ID") -
OK, so I put the 3 tables in separate vars like above and then use SQL a join query? Thanks for the help. I will try to get this working!
-
Hi all,
Sorry tried to attach but the upload failed. Anyway I have the above code to connect to my Access database. Now my database has 3 tables: People, Address and Contact. Currently the only way I know to display all three tables is to have 3 vars, loops etc. I was wandering if there was a better way to display all 3 Access tables? PS, all 3 tables have an ID field which I only want to display once (ID is primary key in people and a foreign key in the other two). Any help would be much appreciated<% Dim cnnSimple ' ADO connection Dim rstSimple ' ADO recordset Set cnnSimple = Server.CreateObject("ADODB.Connection") ' DSNLess cnnSimple.Open ("Provider= Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath("\DB.accdb")) Set rstSimple = cnnSimple.Execute("SELECT * FROM People") 'Set rstSimple1 = cnnSimple.Execute("SELECT * FROM Address")%> <P> Connecting to Access with Ole connection </P><table border="1"> <% Do While Not rstSimple.EOF %> <tr> <td><%= rstSimple.Fields(0).Value %></td> <td><%= rstSimple.Fields(1).Value %></td> <td><%= rstSimple.Fields(2).Value %></td> </tr> <% rstSimple.MoveNext Loop %></table> <% rstSimple.Close Set rstSimple = Nothing cnnSimple.Close Set cnnSimple = Nothing%>
ASP & Access DB connection...help needed
in ASP
Posted
Thanks for the help and info!