Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and Access (make table query)

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi,

1) I was wondering if it is possible to trigger a make table query from within an asp page?

2) Is it possible to display results from a query on your asp page which queries a query instead of querying a table object in MS Access?

Thanks,
 
Hi

1) It is possible to run a create table query from an asp page.

ex:
<%
Connection.Execute &quot;create table student(no int,name varchar(10))&quot;
%>

2) We can query and database object from as ASP page.

Regards,
balajees
 
hi Balajees,

How do you query an ms access query object?

I have an asp page with the following embedded sql statement which parses fine in access but generates an ODBC connection failed error (and when i query a simpler table in the asp page there are no errors and the results are displayed just fine) is this query too complex for asp as it has aliases to other queries NOT tables?:

strSql=&quot;SELECT DISTINCT report_inv.RETAILER_NO, report_inv.CountOf_STATUS_CD AS bal, rep_report_ship.CountOf_STATUS_CD AS ship, rep_report_at_x1.CountOf_STATUS_CD AS x1, rep_report_at_x2.CountOf_STATUS_CD AS x2, rep_report_misc.CountOfMDU_STATUS_CD AS misc FROM (MAIN_STATUS LEFT JOIN (rep_report_inv LEFT JOIN ((rep_report_ship LEFT JOIN rep_report_at_x2 ON rep_report_ship.RETAILER_NO = rep_report_at_x2.RETAILER_NO) LEFT JOIN rep_report_at_x1 ON rep_report_at_x2.RETAILER_NO = rep_report_at_x1.RETAILER_NO) ON rep_report_inv.RETAILER_NO = rep_report_ship.RETAILER_NO) ON MAIN_STATUS.RETAILER_NO = rep_report_inv.RETAILER_NO) LEFT JOIN rep_report_misc ON rep_report_at_x1.RETAILER_NO = rep_report_misc.RETAILER_NO ORDER BY rep_report_inv.RETAILER_NO&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top