I have JOIN fields in my dbSQL with the same fieldnames from different
tables. When I use ASP to open the query, duplicated names are being returned
and the origin of the fields are lost. How does ASPdb handle this ?
Look at the following sample code –
<%
SQLSTR= "SELECT Job.JobNumber as j1, JobStatus.Description as d1, JobType.Description as d2"
SQLSTR = SQLSTR & "FROM (Job INNER JOIN JobStatus ON Job.JobStatusCode = JobStatus.JobStatusCode) INNER JOIN JobType ON Job.JobTypeCode = JobType.JobTypeCode"
Set X = Server.CreateObject("ASP.DB")
X.dbquickprops="1;d:\vbx\testdir\test.mdb;test;grid;4"
X.dbSQL = SQLSTR
X.dbFilterFlds = "0,d1,d2"
X.dbnamemap = "j1,Job_Number,,Job.jobnumber; 1,Job_Status,,JobStatus.Description; 2,Job_Type,,JobType.Description"
X.dbNavigationItem = "top, prev, next, bottom, reload, filter"
X.ASPdb
%>
Follow the following procedures –